Delete content versions between dates

delete

/km/api/v1/content/{answerId}/versions

This method deletes all versions between the dates provided of the specified content from the Oracle Knowledge repository. It will not delete latest or published versions.

This service accepts startDate and endDate as query parameters.

NOTE:The logged-in user must have the DELETE CONTENT VERSIONS BETWEEN DATES privilege to delete documents from the repository.

This method performs the following:

  • Deletes all versions between the dates provided.
  • It will not delete latest or published versions.
  • 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 no content is found by the specified dates..

Example URIs

The example URIs for this method are as follows:

  • http://<IM_REST_API_HOST>/km/api/content/{answerId}/versions?startDate=2025-08-01T02:06:58&endDate=2025-08-01T02:06:58-0400

    This method deletes all versions between the dates provided of the specified content from the Oracle Knowledge repository. It will not delete latest or published versions.

Request

Supported Media Types
Path Parameters
Query Parameters
Back to Top

Response

204 Response

No Content.
Back to Top

Examples

The following example shows how to delete all versions of the specified content, between the dates provided, from the Oracle Knowledge repository. It does not delete latest or published versions.

curl -X "DELETE" "http://<IM_REST_API_HOST>/km/api/v1/content/{answerId}/versions?startDate=2025-10-01T01:06:18&endDate=2025-10-05T02:15:32-0400"

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