Back to Collection Items
' This example assumes the Chilkat API to have been previously unlocked.
' See Global Unlock Sample for sample code.
Dim http As New Chilkat.Http
Dim success As Boolean
' Adds the "Authorization: Bearer <access_token>" header.
http.AuthToken = "<access_token>"
Dim resp As Chilkat.HttpResponse = http.QuickRequest("DELETE","https://your-domain.atlassian.net/wiki/rest/api/template/:contentTemplateId")
If (http.LastMethodSuccess = False) Then
Debug.WriteLine(http.LastErrorText)
Exit Sub
End If
Dim respStatusCode As Integer = resp.StatusCode
Debug.WriteLine("Response Status Code = " & respStatusCode)
If (respStatusCode <> 204) Then
Debug.WriteLine("Response Header:")
Debug.WriteLine(resp.Header)
Debug.WriteLine("Response Body:")
Debug.WriteLine(resp.BodyStr)
Debug.WriteLine("Failed.")
Exit Sub
End If
Debug.WriteLine("Success.")
Curl Command
curl -X DELETE
-H "Authorization: Bearer <access_token>"
https://your-domain.atlassian.net/wiki/rest/api/template/:contentTemplateId
Postman Collection Item JSON
{
"name": "Remove template",
"request": {
"auth": {
"type": "oauth2"
},
"method": "DELETE",
"header": [
],
"url": {
"raw": "{{baseUrl}}/api/template/:contentTemplateId",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"template",
":contentTemplateId"
],
"variable": [
{
"key": "contentTemplateId",
"value": "<string>",
"type": "string",
"description": "(Required) The ID of the template to be deleted."
}
]
},
"description": "Deletes a template. This results in different actions depending on the\ntype of template:\n\n- If the template is a content template, it is deleted.\n- If the template is a modified space-level blueprint template, it reverts\nto the template inherited from the global-level blueprint template.\n- If the template is a modified global-level blueprint template, it reverts\nto the default global-level blueprint template.\n\n Note, unmodified blueprint templates cannot be deleted."
},
"response": [
{
"name": "Returned if the template has been successfully been deleted.",
"originalRequest": {
"method": "DELETE",
"header": [
{
"description": {
"content": "Added as a part of security scheme: oauth2",
"type": "text/plain"
},
"key": "Authorization",
"value": "<token>"
}
],
"url": {
"raw": "{{baseUrl}}/api/template/:contentTemplateId",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"template",
":contentTemplateId"
],
"variable": [
{
"key": "contentTemplateId"
}
]
}
},
"status": "No Content",
"code": 204,
"_postman_previewlanguage": "text",
"header": [
{
"key": "Content-Type",
"value": "text/plain"
}
],
"cookie": [
],
"body": ""
}
]
}