Unpublish this version with comments

post

/km/api/v1/content/versions/{versionId}/unpublishThisVersionWithComments

This method unpublishes a version with comments of Content object having the specified version ID. When a Content version is unpublished, it becomes unavailable to end-users.

Response Errors

Following is the possible error response for this method:

  • OKDOM-GEN0001

    The error occurs when the value of the versionId parameter or localeId parameter is invalid.

Request

Supported Media Types
Path Parameters
Body ()
The comments to be provided for unpublish action.
Root Schema : Comments
Type: object
Title: Comments
Show Source
Back to Top

Response

Supported Media Types

200 Response

OK.
Body ()
Root Schema : ContentKey
Match All
Show Source
Nested Schema : Singular Resource
Type: object
Title: Singular Resource
Oracle base singular resource schema definition.
Show Source
Nested Schema : ContentKey-allOf[1]
Type: object
Show Source
Nested Schema : allTranslations
Type: array

This field will return list of all translated content that the user can view

This field will only be populated if allTranslations query parameter is passed in with value true.

Show Source
Nested Schema : LocaleKey
Match All
Show Source
Nested Schema : LocaleKey-allOf[1]
Type: object
Show Source
Back to Top

Examples

The following example shows how to unpublish the version with comments of the Content object that has the specified version ID by submitting a post request on the REST resource using cURL.

cURL Command

curl -X "POST" "http://<IM_REST_API_HOST>/km/api/latest/content/versions/{versionId}/unpublishThisVersionWithComments"

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 Request Body

{
    "comments": " COMMENTS_VALUE"
}

Example of Response Body

The following shows an example of the response body in JSON format.

{
  "isForEdit" : true,
  "replacementTokens" : [ {
    "dateModified" : "284852364-01-15T17:37:46+0530",
    "replacementText" : "REPLACEMENTTEXT_VALUE",
    "replacementTextNonFormatted" : "REPLACEMENTTEXTNONFORMATTED_VALUE",
    "tokenType" : "TOKENTYPE_VALUE",
    "tokenName" : "TOKENNAME_VALUE",
    "links" : [ {
      "rel" : "canonical",
      "href" : "http://${pageContext.request.serverName}:${pageContext.request.serverPort}${pageContext.request.contextPath}/api/{version}/{resourceURI}",
      "mediaType" : "application/json, application/xml",
      "templated" : true,
      "method" : "GET",
      "profile" : "http://${pageContext.request.serverName}:${pageContext.request.serverPort}${pageContext.request.contextPath}/api/{version}/metadata-catalog/{resourceName}"
    } ]
  } ],
  "categories" : [ {
    "referenceKey" : "REFERENCEKEY_VALUE",
    "name" : "NAME_VALUE",
    "externalType" : "EXTERNALTYPE_VALUE",
    "links" : [ {
      "rel" : "canonical",
      "href" : "http://${pageContext.request.serverName}:${pageContext.request.serverPort}${pageContext.request.contextPath}/api/{version}/{resourceURI}",
      "mediaType" : "application/json, application/xml",
      "templated" : true,
      "method" : "GET",
      "profile" : "http://${pageContext.request.serverName}:${pageContext.request.serverPort}${pageContext.request.contextPath}/api/{version}/metadata-catalog/{resourceName}"
    } ]
  } ],
  "userGroups" : [ {
    "referenceKey" : "REFERENCEKEY_VALUE",
    "name" : "NAME_VALUE",
    "externalType" : "EXTERNALTYPE_VALUE",
    "links" : [ {
      "rel" : "canonical",
      "href" : "http://${pageContext.request.serverName}:${pageContext.request.serverPort}${pageContext.request.contextPath}/api/{version}/{resourceURI}",
      "mediaType" : "application/json, application/xml",
      "templated" : true,
      "method" : "GET",
      "profile" : "http://${pageContext.request.serverName}:${pageContext.request.serverPort}${pageContext.request.contextPath}/api/{version}/metadata-catalog/{resourceName}"
    } ]
  } ],
  "views" : [ {
    "referenceKey" : "REFERENCEKEY_VALUE",
    "name" : "NAME_VALUE",
    "links" : [ {
      "rel" : "canonical",
      "href" : "http://${pageContext.request.serverName}:${pageContext.request.serverPort}${pageContext.request.contextPath}/api/{version}/{resourceURI}",
      "mediaType" : "application/json, application/xml",
      "templated" : true,
      "method" : "GET",
      "profile" : "http://${pageContext.request.serverName}:${pageContext.request.serverPort}${pageContext.request.contextPath}/api/{version}/metadata-catalog/{resourceName}"
    } ]
  } ],
  "versionId" : "VERSIONID_VALUE",
  "documentId" : "DOCUMENTID_VALUE",
  "title" : "TITLE_VALUE",
  "version" : "VERSION_VALUE",
  "answerId" : 1428416791848,
  "locale" : {
    "links" : [ {
      "rel" : "canonical",
      "href" : "http://${pageContext.request.serverName}:${pageContext.request.serverPort}${pageContext.request.contextPath}/api/{version}/{resourceURI}",
      "mediaType" : "application/json, application/xml",
      "templated" : true,
      "method" : "GET",
      "profile" : "http://${pageContext.request.serverName}:${pageContext.request.serverPort}${pageContext.request.contextPath}/api/{version}/metadata-catalog/{resourceName}"
    } ]
  },
  "dateModified" : "2013-04-24T06:36:26+0530",
  "links" : [ {
    "rel" : "canonical",
    "href" : "http://${pageContext.request.serverName}:${pageContext.request.serverPort}${pageContext.request.contextPath}/api/{version}/{resourceURI}",
    "mediaType" : "application/json, application/xml",
    "templated" : true,
    "method" : "GET",
    "profile" : "http://${pageContext.request.serverName}:${pageContext.request.serverPort}${pageContext.request.contextPath}/api/{version}/metadata-catalog/{resourceName}"
  } ],
  "contentType" : {
    "referenceKey" : "REFERENCEKEY_VALUE",
    "name" : "NAME_VALUE",
    "links" : [ {
      "rel" : "canonical",
      "href" : "http://${pageContext.request.serverName}:${pageContext.request.serverPort}${pageContext.request.contextPath}/api/{version}/{resourceURI}",
      "mediaType" : "application/json, application/xml",
      "templated" : true,
      "method" : "GET",
      "profile" : "http://${pageContext.request.serverName}:${pageContext.request.serverPort}${pageContext.request.contextPath}/api/{version}/metadata-catalog/{resourceName}"
    } ]
  },
  "priority" : "PRIORITY_20",
  "createDate" : "2013-04-24T06:36:26+0530",
  "dateAdded" : "2013-04-24T06:36:26+0530",
  "displayStartDate" : "2013-04-24T06:36:26+0530",
  "displayEndDate" : "2013-04-24T06:36:26+0530",
  "eventStartDate" : "2013-04-24T06:36:26+0530",
  "eventEndDate" : "2013-04-24T06:36:26+0530",
  "owner" : {
    "name" : "NAME_VALUE",
    "externalId" : 1428416791841,
    "externalType" : "EXTERNALTYPE_VALUE",
    "links" : [ {
      "rel" : "canonical",
      "href" : "http://${pageContext.request.serverName}:${pageContext.request.serverPort}${pageContext.request.contextPath}/api/{version}/{resourceURI}",
      "mediaType" : "application/json, application/xml",
      "templated" : true,
      "method" : "GET",
      "profile" : "http://${pageContext.request.serverName}:${pageContext.request.serverPort}${pageContext.request.contextPath}/api/{version}/metadata-catalog/{resourceName}"
    } ]
  },
  "lastModifier" : {
    "name" : "NAME_VALUE",
    "externalId" : 1428416791859,
    "externalType" : "EXTERNALTYPE_VALUE",
    "links" : [ {
      "rel" : "canonical",
      "href" : "http://${pageContext.request.serverName}:${pageContext.request.serverPort}${pageContext.request.contextPath}/api/{version}/{resourceURI}",
      "mediaType" : "application/json, application/xml",
      "templated" : true,
      "method" : "GET",
      "profile" : "http://${pageContext.request.serverName}:${pageContext.request.serverPort}${pageContext.request.contextPath}/api/{version}/metadata-catalog/{resourceName}"
    } ]
  },
  "creator" : {
    "name" : "NAME_VALUE",
    "externalId" : 1428416791867,
    "externalType" : "EXTERNALTYPE_VALUE",
    "links" : [ {
      "rel" : "canonical",
      "href" : "http://${pageContext.request.serverName}:${pageContext.request.serverPort}${pageContext.request.contextPath}/api/{version}/{resourceURI}",
      "mediaType" : "application/json, application/xml",
      "templated" : true,
      "method" : "GET",
      "profile" : "http://${pageContext.request.serverName}:${pageContext.request.serverPort}${pageContext.request.contextPath}/api/{version}/metadata-catalog/{resourceName}"
    } ]
  },
  "published" : true,
  "pending" : false,
  "displayReviewDate" : "2013-04-24T06:36:26+0530",
  "checkedOut" : true,
  "checkedOutBy" : {
    "name" : "NAME_VALUE",
    "externalType" : "EXTERNALTYPE_VALUE",
    "links" : [ {
      "rel" : "canonical",
      "href" : "http://${pageContext.request.serverName}:${pageContext.request.serverPort}${pageContext.request.contextPath}/api/{version}/{resourceURI}",
      "mediaType" : "application/json, application/xml",
      "templated" : true,
      "method" : "GET",
      "profile" : "http://${pageContext.request.serverName}:${pageContext.request.serverPort}${pageContext.request.contextPath}/api/{version}/metadata-catalog/{resourceName}"
    } ]
  },
  "basedOnVersion" : "BASEDONVERSION_VALUE",
  "publishedVersion" : "PUBLISHEDVERSION_VALUE",
  "basedLocale" : {
    "links" : [ {
      "rel" : "canonical",
      "href" : "http://${pageContext.request.serverName}:${pageContext.request.serverPort}${pageContext.request.contextPath}/api/{version}/{resourceURI}",
      "mediaType" : "application/json, application/xml",
      "templated" : true,
      "method" : "GET",
      "profile" : "http://${pageContext.request.serverName}:${pageContext.request.serverPort}${pageContext.request.contextPath}/api/{version}/metadata-catalog/{resourceName}"
    } ]
  },
  "displayPosition" : "HISTORICAL_USEFULNESS",
  "suppressNotification" : false,
  "workflowStep" : {
    "referenceKey" : "REFERENCEKEY_VALUE",
    "name" : "NAME_VALUE",
    "links" : [ {
      "rel" : "canonical",
      "href" : "http://${pageContext.request.serverName}:${pageContext.request.serverPort}${pageContext.request.contextPath}/api/{version}/{resourceURI}",
      "mediaType" : "application/json, application/xml",
      "templated" : true,
      "method" : "GET"
    } ]
  },
  "wfStepNotificationOverride" : "2013-04-24T06:36:26+0530",
  "xml" : "XML_VALUE",
  "metaDataXml" : "METADATAXML_VALUE",
  "resourcePath" : "http://${pageContext.request.serverName}:${pageContext.request.serverPort}/okcs/resources/{TENANTID}/content/draft/{CONTENTID}/{CONTENTTEXTID}/{FILENAME_WITH_EXTENSION}?login={USER_NAME}",
  "metaDataResourcePath" : "METADATARESOURCEPATH_VALUE",
  "reasonForEdit" : "REASON_FOR_EDITING_OR_CREATING_CONTENT_RECORD"
}
Back to Top