Publish content

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

The possible error response for this method is as follows:

  • 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
Type: object
Title: ContentKey
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 : ArticleStatusKey
Type: object
Title: ArticleStatusKey
Show Source
Nested Schema : LocaleKey
Type: object
Title: LocaleKey
Show Source
Nested Schema : DataForm
Type: object
Title: DataForm
Show Source
Nested Schema : AggregateFormResults
Type: object
Title: AggregateFormResults
Show Source
Nested Schema : schemaAttributes
Type: array

This field will return list of schema attributes associated with the content type of this content.

This field will only be populated if additionalFields query parameter is passed in with value schemaAttributes.

Show Source
Nested Schema : questions
Type: array
To Many Relationship to Question
Show Source
Nested Schema : UserKey
Type: object
Title: UserKey
Show Source
Nested Schema : views
Type: array
To Many Relationship to View
Show Source
Nested Schema : DataFormQuestion
Type: object
Title: DataFormQuestion
Show Source
Nested Schema : answers
Type: array
To Many Relationship to Answer
Show Source
Nested Schema : DataFormKey
Type: object
Title: DataFormKey
Show Source
Nested Schema : DataFormAnswer
Type: object
Title: DataFormAnswer
Show Source
Nested Schema : DataFormQuestionKey
Type: object
Title: DataFormQuestionKey
Show Source
Nested Schema : ViewKey
Type: object
Title: ViewKey
Show Source
Nested Schema : questions
Type: array
To Many Relationship to AggregateQuestionResult
Show Source
Nested Schema : AggregateQuestionResult
Type: object
Title: AggregateQuestionResult
Show Source
Nested Schema : answers
Type: array
To Many Relationship to AggregateAnswerResult
Show Source
Nested Schema : AggregateAnswerResult
Type: object
Title: AggregateAnswerResult
Show Source
Nested Schema : SchemaAttribute
Type: object
Title: SchemaAttribute
Show Source
Nested Schema : children
Type: array
List of child nodes of the current element
Show Source
Nested Schema : localizedAttributes
Type: array
List of LocalizedAttributes of this SchemaAttribute name and description in various Locales
Show Source
Nested Schema : schemaAttributeUserGroupList
Type: array
List of user groups that can be used to secure this attribute. This should be a subset of the list of user groups assigned to the ContentType
Show Source
Nested Schema : LocalizedAttributes
Type: object
Title: LocalizedAttributes
Show Source
Nested Schema : SchemaAttributeUserGroup
Type: object
Title: SchemaAttributeUserGroup
Show Source
Nested Schema : UserGroupKey
Type: object
Title: UserGroupKey
Show Source
Back to Top

Examples

The following example shows how to publish a Content object having the specified version ID:

curl -X POST "https://<IM_REST_API_HOST>/km/api/latest/content/versions/{versionId}/publishThisVersion" -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.

{
  "recordId": "8F4EB443B31D4E569B18374ED39607F3",
  "versionId": "B46EF56032C848FA9B24E74CF2E1595B",
  "documentId": "FAQ13",
  "title": "Q query  Testing",
  "version": "1.0",
  "answerId": 1001003,
  "locale": {
    "recordId": "en_US"
  },
  "dateModified": "2018-11-26T13:31:35+0530",
  "links": [
    {
      "rel": "canonical",
      "href": "https://<IM_REST_API_HOST>/km/api/latest/content/8F4EB443B31D4E569B18374ED39607F3",
      "mediaType": "application/json, application/xml",
      "method": "GET"
    },
    {
      "rel": "collection",
      "href": "https://<IM_REST_API_HOST>/km/api/latest/content",
      "mediaType": "application/json, application/xml",
      "method": "GET",
      "profile": "https://<IM_REST_API_HOST>/km/api/latest/metadata-catalog/content"
    }
  ]
}
Back to Top