Delete a category
delete
/content/management/api/v1.1/taxonomies/{id}/categories/{categoryId}
Only categories in a draft taxonomy can be deleted.
Request
Path Parameters
-
categoryId: string
Unique identifier (id) for a category.
-
id: string
id of the taxonomy.
Query Parameters
-
q(optional): string
Query expression.
Header Parameters
-
X-Requested-With: string
A custom header to mitigate CSRF attacks.Allowed Values:
[ "XMLHttpRequest" ]
Response
Supported Media Types
- application/json
204 Response
OK.
400 Response
Bad request.
403 Response
Forbidden.
404 Response
The requested resource was not found.
409 Response
The requested resource operation is temporarily unavailable
500 Response
Internal server error.
Examples
The following example shows how to delete a category and all its descendants by submitting a DELETE request on the REST resource using cURL.
curl -i -X DELETE -H 'X-Requested-With: XMLHttpRequest' 'https://host:port/content/management/api/v1.1/taxonomies/{id}/categories/{categoryId}?q=(status eq \"draft\")'
Example:
This deletes a category and all its descendents.
/content/management/api/v1.1/taxonomies/D7969D6CA0D144AEA9CCA88BA6D2CF81/categories/6F81E244EB8D4E229CBF00A065009598?q=(status eq \"draft\")