Delete all versions of a content in a locale
/km/api/v1/content/{id}/deleteLocalizedVersions/{localeCode}
This method deletes all versions of the specified content in the given locale from the Oracle Knowledge repository. If the specified locale is the base locale all versions in all locales are deleted.
NOTE:The logged-in user must have the DELETE privilege to delete documents from the repository.
This method performs the following:
- Deletes a document in all the versions of the given locale.
- Deletes a document irrespective of the its status such as DRAFT, PENDING PUBLISHED, or PUBLISHED.
- In addition to deleting the content itself, this method will also delete any associated:
- Tasks
- Content Recommendations
- Subscriptions
- Content History
- Survey Results
Response Errors
The service does not display any warning message before deleting a document from the repository. If an error occurs during an attempt to delete, the content is not deleted. The following errors can occur:
- OKDOM-GEN0001
This error occurs when an invalid locale has been given.
- OKDOM-CONT0046
This error occurs when no version of the specified document exist in the given locale.
- OKDOM-CONT0001
This error occurs when the specified document is in checked out state.
Example URIs
The example URIs for this method are as follows:
http://<IM_REST_API_HOST>/km/api/content/{id}/deleteLocalizedVersions/{localeCode}
This method deletes all versions of content for the given contentID in the given LocaleCode.
Request
-
id: string
The content identifier
-
localeCode: string
The locale code identifier
Response
204 Response
Examples
The following example shows how to delete all versions of the specified content in the given locale from the Oracle Knowledge repository:
curl -X "DELETE" "https://<IM_REST_API_HOST>/km/api/latest/content/{id}/deleteLocalizedVersions/{localeCode}" -u "<username:password>" -H "Accept: application/json" -H "Content-Type: application/json"
Example of Response Body
The following shows an example of the response body in JSON format.
This request does not return any response body.