Publish all versions of content in all locales

post

/km/api/v1/content/{id}/publishAllVersionInAllLocales

This method publishes all versions of all translations of the specified Content object.

When a Content object 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 available to end-users. To be published pending, the Content object must have its displayStartDate field set to a date in the future. On the future date, the Content object 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 responses for this method are as follows:

  • OKDOM-GEN0001

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

Request

Path Parameters
Back to Top

Response

Supported Media Types

200 Response

OK.
Body ()
Root Schema : ResultList ActionResult ContentKey
Type: object
Title: ResultList ActionResult ContentKey
Show Source
Nested Schema : items
Type: array
Show Source
Nested Schema : ActionResult ContentKey
Type: object
Title: ActionResult ContentKey
Show Source
Nested Schema : KMError Collection
Type: array
Title: KMError Collection
Collection of KMErrors
Show Source
Nested Schema : ContentKey
Type: object
Title: ContentKey
Show Source
Nested Schema : KMError
Type: object
Title: KMError
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
  • links
  • The localized name of the ArticleStatus object. The name field can only be used for sorting.

  • The unique identifier of the ArticleStatus object.

  • The reference key for the ArticleStatus object.
    ArticleStatus objects support multiple languages. This field can be used to identify the associated objects for all languages.

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
  • Email of the User object
  • The ExternalId is the Id of the corresponding User from an external system. It, along with ExternalType, can be used to bridge the gap between a User from this system and a User from an external system.
  • The ExternalType is the type of the corresponding User from an external system. It, along with ExternalId, can be used to bridge the gap between a User from this system and a User from an external system.
  • links
  • User's full name
  • The unique record ID of the User object.
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
  • links
  • The unique record ID of the DataFormQuestion object.
  • The reference key for the DataFormQuestion object. DataFormQuestion objects support multiple languages. This field can be used to identify the associated objects for all languages.
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
  • Localized display name for the Answer
  • The unique record ID of the AggregateAnswerResult object.
  • The reference key for the AggregateAnswerResult object. AggregateAnswerResult objects support multiple languages. This field can be used to identify the associated objects for all languages.
  • TotalResponses of the AggregateAnswerResult object
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
  • The unique identifier of the corresponding userGroup from an external system. You can use the External ID with the ExternalType parameter to connect user groups in the internal and the the external systems.

  • The ExternalType is the type of the corresponding userGroup from an external system.

  • links
  • The localized name of the user group. The name field can only be used for sorting.

  • The unique identifier from the TAG table that represent a userGroups resource

  • The non localized name of the user group

  • Stripe for UserGroup

Back to Top

Examples

The following example shows how to publish all versions of all translations of the specified Content object:

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

{
  "items": [
    {
      "result": {
        "recordId": "27BA7D089309424D86657C14C4B637A6",
        "versionId": "0454BF8748014C008C5ACF16E6803077",
        "documentId": "FAQ1",
        "title": "Q query  Testing --transalte",
        "version": "1.0",
        "answerId": 1001000,
        "locale": {
          "recordId": "en_GB"
        },
        "dateModified": "2018-11-26T13:27:17+0530"
      },
      "status": "COMPLETED",
      "operation": "PUBLISH_ACTION",
      "warningMessage": null,
      "message": "Content was Published for versionID 0454BF8748014C008C5ACF16E6803077",
      "errors": []
    },
    {
      "result": {
        "recordId": "27BA7D089309424D86657C14C4B637A6",
        "versionId": "30EB204D1ED04E57A912F0289816D68B",
        "documentId": "FAQ1",
        "title": "Q query  Testing --update2",
        "version": "3.0",
        "answerId": 1000018,
        "locale": {
          "recordId": "en_US"
        },
        "dateModified": "2018-11-26T13:27:17+0530"
      },
      "status": "COMPLETED_WITH_WARNINGS",
      "operation": "PUBLISH_ACTION",
      "warningMessage": "Content Went to Pending State, version id 30EB204D1ED04E57A912F0289816D68B",
      "message": null,
      "errors": []
    }
  ],
  "hasMore": false,
  "links": [
    {
      "rel": "canonical",
      "href": "https://<IM_REST_API_HOST>/km/api/latest/content/27BA7D089309424D86657C14C4B637A6/publishAllVersionInAllLocales?limit=20&offset=0",
      "mediaType": "application/json, application/xml",
      "method": "GET"
    }
  ],
  "count": 2
}
Back to Top