Publish this version

post

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

This method publishes a Content object having the specified version ID.

When a content version is published, it can be published live or published pending. To be published live, the Content object must have today's current date and time within the range of its displayStartDate and displayEndDate fields. When a Content object is published live, it is made available to end-users. To be published pending, the Content object must have its displayStartDate field set to a date in the future. On that future date, the Content is published live and made available to end users. Versions of the Content object that remain in the workflow process are not published.

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

Path Parameters
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 publish a content object that has the specified version ID by submitting a post request on the REST resource using cURL.

cURL Command

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

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 shows an example of the response body in JSON format.

{
  "isForEdit" : true,
  "replacementTokens" : [ {
    "dateModified" : "284852364-01-15T07:07:46EST",
    "replacementText" : "REPLACEMENTTEXT_VALUE",
    "replacementTextNonFormatted" : "REPLACEMENTTEXTNONFORMATTED_VALUE",
    "tokenType" : "TOKENTYPE_VALUE",
    "tokenName" : "TOKENNAME_VALUE",
    "links" : [ {
      "rel" : "canonical",
      "href" : "http://<IM_REST_API_HOST>/km/api/{version}/{resourceURI}",
      "mediaType" : "application/json, application/xml",
      "templated" : true,
      "method" : "GET",
      "profile" : "http://<IM_REST_API_HOST>/km/api/{version}/metadata-catalog/{resourceName}"
    } ]
  } ],
  "categories" : [ {
    "referenceKey" : "REFERENCEKEY_VALUE",
    "name" : "NAME_VALUE",
    "externalType" : "EXTERNALTYPE_VALUE",
    "links" : [ {
      "rel" : "canonical",
      "href" : "http://<IM_REST_API_HOST>/km/api/{version}/{resourceURI}",
      "mediaType" : "application/json, application/xml",
      "templated" : true,
      "method" : "GET",
      "profile" : "http://<IM_REST_API_HOST>/km/api/{version}/metadata-catalog/{resourceName}"
    } ]
  } ],
  "userGroups" : [ {
    "referenceKey" : "REFERENCEKEY_VALUE",
    "name" : "NAME_VALUE",
    "externalType" : "EXTERNALTYPE_VALUE",
    "links" : [ {
      "rel" : "canonical",
      "href" : "http://<IM_REST_API_HOST>/km/api/{version}/{resourceURI}",
      "mediaType" : "application/json, application/xml",
      "templated" : true,
      "method" : "GET",
      "profile" : "http://<IM_REST_API_HOST>/km/api/{version}/metadata-catalog/{resourceName}"
    } ]
  } ],
  "views" : [ {
    "referenceKey" : "REFERENCEKEY_VALUE",
    "name" : "NAME_VALUE",
    "links" : [ {
      "rel" : "canonical",
      "href" : "http://<IM_REST_API_HOST>/km/api/{version}/{resourceURI}",
      "mediaType" : "application/json, application/xml",
      "templated" : true,
      "method" : "GET",
      "profile" : "http://<IM_REST_API_HOST>/km/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://<IM_REST_API_HOST>/km/api/{version}/{resourceURI}",
      "mediaType" : "application/json, application/xml",
      "templated" : true,
      "method" : "GET",
      "profile" : "http://<IM_REST_API_HOST>/km/api/{version}/metadata-catalog/{resourceName}"
    } ]
  },
  "links" : [ {
    "rel" : "canonical",
    "href" : "http://<IM_REST_API_HOST>/km/api/{version}/{resourceURI}",
    "mediaType" : "application/json, application/xml",
    "templated" : true,
    "method" : "GET",
    "profile" : "http://<IM_REST_API_HOST>/km/api/{version}/metadata-catalog/{resourceName}"
  } ],
  "contentType" : {
    "referenceKey" : "REFERENCEKEY_VALUE",
    "name" : "NAME_VALUE",
    "links" : [ {
      "rel" : "canonical",
      "href" : "http://<IM_REST_API_HOST>/km/api/{version}/{resourceURI}",
      "mediaType" : "application/json, application/xml",
      "templated" : true,
      "method" : "GET",
      "profile" : "http://<IM_REST_API_HOST>/km/api/{version}/metadata-catalog/{resourceName}"
    } ]
  },
  "priority" : "PRIORITY_20",
  "createDate" : "2013-04-23T21:06:26EDT",
  "dateAdded" : "2013-04-23T21:06:26EDT",
  "dateModified" : "2013-04-23T21:06:26EDT",
  "displayStartDate" : "2013-04-23T21:06:26EDT",
  "displayEndDate" : "2013-04-23T21:06:26EDT",
  "eventStartDate" : "2013-04-23T21:06:26EDT",
  "eventEndDate" : "2013-04-23T21:06:26EDT",
  "owner" : {
    "name" : "NAME_VALUE",
    "externalId" : 1428416791841,
    "externalType" : "EXTERNALTYPE_VALUE",
    "links" : [ {
      "rel" : "canonical",
      "href" : "http://<IM_REST_API_HOST>/km/api/{version}/{resourceURI}",
      "mediaType" : "application/json, application/xml",
      "templated" : true,
      "method" : "GET",
      "profile" : "http://<IM_REST_API_HOST>/km/api/{version}/metadata-catalog/{resourceName}"
    } ]
  },
  "lastModifier" : {
    "name" : "NAME_VALUE",
    "externalId" : 1428416791859,
    "externalType" : "EXTERNALTYPE_VALUE",
    "links" : [ {
      "rel" : "canonical",
      "href" : "http://<IM_REST_API_HOST>/km/api/{version}/{resourceURI}",
      "mediaType" : "application/json, application/xml",
      "templated" : true,
      "method" : "GET",
      "profile" : "http://<IM_REST_API_HOST>/km/api/{version}/metadata-catalog/{resourceName}"
    } ]
  },
  "creator" : {
    "name" : "NAME_VALUE",
    "externalId" : 1428416791867,
    "externalType" : "EXTERNALTYPE_VALUE",
    "links" : [ {
      "rel" : "canonical",
      "href" : "http://<IM_REST_API_HOST>/km/api/{version}/{resourceURI}",
      "mediaType" : "application/json, application/xml",
      "templated" : true,
      "method" : "GET",
      "profile" : "http://<IM_REST_API_HOST>/km/api/{version}/metadata-catalog/{resourceName}"
    } ]
  },
  "published" : true,
  "displayReviewDate" : "2013-04-23T21:06:26EDT",
  "checkedOut" : true,
  "checkedOutBy" : {
    "name" : "NAME_VALUE",
    "externalType" : "EXTERNALTYPE_VALUE",
    "links" : [ {
      "rel" : "canonical",
      "href" : "http://<IM_REST_API_HOST>/km/api/{version}/{resourceURI}",
      "mediaType" : "application/json, application/xml",
      "templated" : true,
      "method" : "GET",
      "profile" : "http://<IM_REST_API_HOST>/km/api/{version}/metadata-catalog/{resourceName}"
    } ]
  },
  "basedOnVersion" : "BASEDONVERSION_VALUE",
  "publishedVersion" : "PUBLISHEDVERSION_VALUE",
  "basedLocale" : {
    "links" : [ {
      "rel" : "canonical",
      "href" : "http://<IM_REST_API_HOST>/km/api/{version}/{resourceURI}",
      "mediaType" : "application/json, application/xml",
      "templated" : true,
      "method" : "GET",
      "profile" : "http://<IM_REST_API_HOST>/km/api/{version}/metadata-catalog/{resourceName}"
    } ]
  },
  "displayPosition" : "HISTORICAL_USEFULNESS",
  "workflowStep" : {
    "referenceKey" : "REFERENCEKEY_VALUE",
    "name" : "NAME_VALUE",
    "links" : [ {
      "rel" : "canonical",
      "href" : "http://<IM_REST_API_HOST>/km/api/{version}/{resourceURI}",
      "mediaType" : "application/json, application/xml",
      "templated" : true,
      "method" : "GET"
    } ]
  },
  "wfStepNotificationOverride" : "2013-04-23T21:06:26EDT",
  "xml" : "XML_VALUE",
  "metaDataXml" : "METADATAXML_VALUE",
  "resourcePath" : "http://<IM_REST_API_HOST>/okcs/resources/{TENANTID}/content/draft/{CONTENTID}/{CONTENTTEXTID}/{FILENAME_WITH_EXTENSION}?login={USER_NAME}",
  "metaDataResourcePath" : "METADATARESOURCEPATH_VALUE"
}
Back to Top