Delete localized versions

delete

/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
    • AQI Scores

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

Path Parameters
Back to Top

Response

204 Response

No Content.
Back to Top

Examples

The following example shows how to delete all localized versions of the specified content in the specified locale from the Oracle Knowledge repository.

curl -X "DELETE" "http://<IM_REST_API_HOST>/km/api/latest/content/{id}/deleteLocalizedVersions/{localeCode}"

Example of Request Header

The following shows an example of the request header.

-H "kmauthtoken: {\"siteName\":\"ORACLE_KNOWLEDGE\",\"integrationUserToken\":\"\"+eCJYkxKwj5HUaIiJYun0/TpatwT1LmtcsF05W33xnEojifV/AsLDj9RpN0lKuorTMNKeSE1tgC7svVL+BzntqDON4KiM1HFlpxvXEUCB0P2w0Xrs75McygqxdVaDSE9",\"userToken\":\"UoyWTKRG4RpyJCH4Wqjzht2iYUrsDdk5ir+3IpwEkxcwajJkGR9OGSQBTANQVGW0iVT9MFeDzqL+RYdgfzGSK+h5QzDFIDM+rDLgdKeEE19ljWFm3zMCF+kgYp/dJ/Yq5V7Re+aDXqHg6YkHfvprFA==\"}" \
-H "Accept: application/json"

Example of Response Body

The following example shows the contents of the response body in JSON format:

This request does not return any response body.
Back to Top