Translate

post

/km/api/v1/content/{versionId}/translate

Supported Media Types: 'application/json', 'application/xml'

This method creates translated content, given as part of a CompositeContent object

A POST must be requested and a CompositeContent object must be provided to perform the translate request.

The translated content's data should be provided as a Content object.

Specific attributes of the translated Content object should be set as follows:

Attribute Value
locale The LocaleKey for the locale the content is being translated to.
recordId Same value as the recordId of the existing Content object being translated.
documentId Same value as the documentId of the existing Content object being translated.
basedOnVersion Same value as the version of the existing Content object being translated.
basedLocale Same LocaleKey as the locale of the existing Content object being translated.

Rules regarding createDate, dateAdded and dateModified :

During the translate flow, when a new version of the document is created in another locale.
  • The new version's dateAdded value will be set to the same value as the createDate.

    Any supplied value for dateAdded will be ignored.

    • If createDate is set to null then the current day and time will be used.
    • If createDate is specified :
      • createDate cannot be in the future.
      • createDate must be earlier or equal to the dateModified.
    • If dateModified is set to null then the current day and time will be used.
    • If dateModified is supplied :
      • dateModified cannot be in the future.
      • dateModified must be later or equal to the createDate.
      • dateModified cannot be supplied without createDate.

    Content Field Rules

    All fields listed are optional.

    Field Flow Conditions
    creator If not supplied the active user will become the creator.
    owner If not supplied the active user becomes the owner. To specify a different user as the owner, this attribute value must be explicitly supplied.
    lastModifier If not supplied, the active user is the last modifier. To specify a different user as the last modifier, this attribute value must be explicitly supplied.
    createDate Refer to the rules in the section above.
    dateAdded dateAdded will be ignored.
    dateModified Refer to the rules in the section above.
    displayStartDate Can be in the past, displayStartDate must be before the displayEndDate.
    displayEndDate Can be in the past.
    eventStartDate Can be in the past, eventStartDate must be before the eventEndDate.
    eventEndDate contentType must have the event start and end date attributes enabled in order to supply eventStartDate and eventEndDate. Cannot be in the past.
    displayReviewDate Can be in the past.

    ContentModificationQualifier Field Rules

    All fields listed are optional.

    Field Flow Conditions
    ipAddress DO NOT POPULATE. A validation error will occur if this field is specified.
    publish When the contentType does not contain workflows :
    • publish set to true will create/update the article and then publish the article.
    • publish set to false will create/update the article but not publish the article.
    When the contentType contains workflows :
    • publish set to true and bypassWorkflowAndPublish set to false will result in an error condition.
    • publish set to true and bypassWorkflowAndPublish set to true will result in the article being created/updated and then published.
    • publish set to false and bypassWorkflowAndPublish set to true or false will result in the article being created/updated but not published.
    bypassWorkflowAndPublish This field is only relevant when the contentType contains workflows, otherwise the value of this field is not taken into effect.

    Response Errors

    Following are the possible error responses for this method:

    • OK-FMS0005

      The error occurs when the file nodes specified do not match the uploaded files.

    • OKDOM-CONT0144

      The error occurs when the locale in the translated Content object contains an invalid locale code.

    • OKDOM-CONT0143

      The error occurs when the locale in the translated Content object is valid, but the locale is not currently available on the site.

    • OKDOM-CONT0124

      The error occurs when the locale in the translated Content object matches the locale of the existing Content object being translated.




    Translate with attachments

    Supported Media Types: 'multipart/form-data'



    A translated Content object with attachments can be created by including a list of files as form data.

    For more information on file attachments, see Update content with file attachments section.

Request

Supported Media Types
Path Parameters
Body ()
A CompositeContent object containing the translated content to be created
Root Schema : CompositeContent
Type: object
Title: CompositeContent
Show Source
Nested Schema : Content
Match All
Show Source
Nested Schema : ContentModificationQualifier
Type: object
Title: ContentModificationQualifier
Show Source
Nested Schema : ContentExtended
Match All
Show Source
Nested Schema : ContentData
Match All
Show Source
Nested 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 : ContentData-allOf[1]
Type: object
Show Source
Nested Schema : ContentExtended-allOf[1]
Type: object
Show Source
Nested Schema : Content-allOf[1]
Type: object
Show Source
  • categories

    The Category object or list of Category objects assigned to the Content.

    For example. If world is a category at level one, we may have Africa, Uk, America etc. at level two. You can specify requests for objects in a category hierarchically or non- hierarchically. If a content that is assigned Florida is requested using hierarchical request world, you get the result. Whereas, the same request done non- hierarchically gives no result.

    The category parameter lets you filter the result by first level category as well as hierarchical category in both single and multiple configurations.

      Match Any

      The service matches any of the category specified in the request if you pass the contentType.refKey eq parameter or contentType.refKey in parameter with the request.

      Example URIs for the category parameter are as follows:

    • http://<IM_REST_API_HOST>/km/api/content?q=contentType.refKey eq 'AGILE_CHANNEL' and categories.refKey eq 'RN_CATEGORY_34587323'&mode=KEY
    • OR

    • http://<IM_REST_API_HOST>/km/api/content?q=contentType.refKey eq 'AGILE_CHANNEL' and categories.refKey in ('RN_CATEGORY_34587323')&mode=KEY

    • The following example URIs returns Content objects which exist at the level of the specified category. This does not return the child Content objects.

    • http://<IM_REST_API_HOST>/km/api/content?q=contentType.refKey eq 'AGILE_CHANNEL' and categories.refKey withNoChildren 'RN_CATEGORY_34587323'&mode=KEY
    • OR

    • http://<IM_REST_API_HOST>/km/api/content?q=contentType.refKey eq 'AGILE_CHANNEL' and categories.refKey inWithNoChildren ('RN_CATEGORY_34587323')&mode=KEY

    • The following example URIs returns Content objects that match the multiple criterion specified in the request.

    • http://<IM_REST_API_HOST>/km/api/content?q=contentType.refKey in ('AGILE_CHANNEL', 'NEWS_CHANNEL') and categories.refKey inWithNoChildren ('RN_CATEGORY_45587634', 'RN_CATEGORY_45587522')&mode=KEY&orderBy=mostPopular

      The following example URIs returns Content objects that match the multiple criterion specified in the request

    • http://<IM_REST_API_HOST>/km/api/content?q=contentType.refKey in ('AGILE_CHANNEL', 'NEWS_CHANNEL') and categories.refKey inWithNoChildren ('RN_CATEGORY_45587634', 'RN_CATEGORY_45587522') and filterMode.contentState eq 'PUBLISHED'&mode=KEY&orderBy=mostRecent

      The objects in the returned list are sorted by the published Date.

    • http://<IM_REST_API_HOST>/km/api/content?q=contentType.refKey in ('AGILE_CHANNEL', 'NEWS_CHANNEL') and categories.refKey inWithNoChildren ('RN_CATEGORY_45587634', 'RN_CATEGORY_45587522') and filterMode.contentState eq 'LATESTVALID'&mode=KEY&orderBy=mostRecent

      The objects in the returned list are sorted by the dateModified.

      Match ALL

      The service matches all the categories specified in the request if you pass the andcategories.refKey matchAll parameter with the request.

    • http://<IM_REST_API_HOST>/km/api/content?q=contentState eq 'LATEST' and contentType.refKey eq 'AGILE_CHANNEL' and categories.refKey matchAll ('RN_CATEGORY_34587323', 'RN_CATEGORY_34587345')&mode=KEY

      The request returns all Content objects in the world and movies category. The service returns a Content object in the category Africa because Africa is a child category for the category world.

    • http://<IM_REST_API_HOST>/km/api/content?q=contentState eq 'LATEST' and contentType.refKey eq 'AGILE_CHANNEL' and categories.refKey matchAll ('RN_CATEGORY_34587323', 'RN_CATEGORY_34587345')&mode=KEY&orderBy=mostPopular

      The objects in the returned list are sorted by the view in descending order.

    • http://<IM_REST_API_HOST>/km/api/content?q=contentState eq 'PUBLISHED' and contentType.refKey eq 'AGILE_CHANNEL' and categories.refKey matchAll ('RN_CATEGORY_34587323', 'RN_CATEGORY_34587345')&mode=KEY&orderBy=mostRecent

      The objects in the returned list are sorted by the published date descending order.

  • The parameter to request editable content.

  • replacementTokens

    The object to create short, manageable terms (the tokenName). These tokens represent standardized, translatable, and sometimes complex content, such as integrated text, images, lists, and tables.

    Note: Do not specify the replacementToken object while using 'Content/Create', 'Content/Update', 'Content/Create content from import', and 'Content/Update content from import' services.

  • userGroups

    The user groups assigned to the content. The member of the assigned user group will only have access to the content.

  • views

    The views assigned to the content. The user who has the view assigned to the content or the content type in which the content is saved can only access the content.

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
Nested Schema : UserKey
Match All
Show Source
Nested Schema : ContentTypeKey
Match All
Show Source
Nested Schema : UserKey-allOf[1]
Type: object
Show Source
Nested Schema : ContentTypeKey-allOf[1]
Type: object
Show Source
  • The description for the ContentType object. Content Types support multiple languages.

    This field identifies the object associated with the language specified by the user.

  • The name for the ContentType object. The name field can only be used for sorting.

    Content Types support multiple languages. This field identifies the object associated with the language specified by the user.

  • The unique identifier of the ContentType object.

  • The reference key for the ContentType object.

    ContentType objects support multiple languages. This field can be used to identify the associated objects for all languages.

Nested Schema : WorkflowStepKey
Match All
Show Source
Nested Schema : WorkflowStepKey-allOf[1]
Type: object
Show Source
Nested Schema : categories
Type: array

The Category object or list of Category objects assigned to the Content.

For example. If world is a category at level one, we may have Africa, Uk, America etc. at level two. You can specify requests for objects in a category hierarchically or non- hierarchically. If a content that is assigned Florida is requested using hierarchical request world, you get the result. Whereas, the same request done non- hierarchically gives no result.

The category parameter lets you filter the result by first level category as well as hierarchical category in both single and multiple configurations.

    Match Any

    The service matches any of the category specified in the request if you pass the contentType.refKey eq parameter or contentType.refKey in parameter with the request.

    Example URIs for the category parameter are as follows:

  • http://<IM_REST_API_HOST>/km/api/content?q=contentType.refKey eq 'AGILE_CHANNEL' and categories.refKey eq 'RN_CATEGORY_34587323'&mode=KEY
  • OR

  • http://<IM_REST_API_HOST>/km/api/content?q=contentType.refKey eq 'AGILE_CHANNEL' and categories.refKey in ('RN_CATEGORY_34587323')&mode=KEY

  • The following example URIs returns Content objects which exist at the level of the specified category. This does not return the child Content objects.

  • http://<IM_REST_API_HOST>/km/api/content?q=contentType.refKey eq 'AGILE_CHANNEL' and categories.refKey withNoChildren 'RN_CATEGORY_34587323'&mode=KEY
  • OR

  • http://<IM_REST_API_HOST>/km/api/content?q=contentType.refKey eq 'AGILE_CHANNEL' and categories.refKey inWithNoChildren ('RN_CATEGORY_34587323')&mode=KEY

  • The following example URIs returns Content objects that match the multiple criterion specified in the request.

  • http://<IM_REST_API_HOST>/km/api/content?q=contentType.refKey in ('AGILE_CHANNEL', 'NEWS_CHANNEL') and categories.refKey inWithNoChildren ('RN_CATEGORY_45587634', 'RN_CATEGORY_45587522')&mode=KEY&orderBy=mostPopular

    The following example URIs returns Content objects that match the multiple criterion specified in the request

  • http://<IM_REST_API_HOST>/km/api/content?q=contentType.refKey in ('AGILE_CHANNEL', 'NEWS_CHANNEL') and categories.refKey inWithNoChildren ('RN_CATEGORY_45587634', 'RN_CATEGORY_45587522') and filterMode.contentState eq 'PUBLISHED'&mode=KEY&orderBy=mostRecent

    The objects in the returned list are sorted by the published Date.

  • http://<IM_REST_API_HOST>/km/api/content?q=contentType.refKey in ('AGILE_CHANNEL', 'NEWS_CHANNEL') and categories.refKey inWithNoChildren ('RN_CATEGORY_45587634', 'RN_CATEGORY_45587522') and filterMode.contentState eq 'LATESTVALID'&mode=KEY&orderBy=mostRecent

    The objects in the returned list are sorted by the dateModified.

    Match ALL

    The service matches all the categories specified in the request if you pass the andcategories.refKey matchAll parameter with the request.

  • http://<IM_REST_API_HOST>/km/api/content?q=contentState eq 'LATEST' and contentType.refKey eq 'AGILE_CHANNEL' and categories.refKey matchAll ('RN_CATEGORY_34587323', 'RN_CATEGORY_34587345')&mode=KEY

    The request returns all Content objects in the world and movies category. The service returns a Content object in the category Africa because Africa is a child category for the category world.

  • http://<IM_REST_API_HOST>/km/api/content?q=contentState eq 'LATEST' and contentType.refKey eq 'AGILE_CHANNEL' and categories.refKey matchAll ('RN_CATEGORY_34587323', 'RN_CATEGORY_34587345')&mode=KEY&orderBy=mostPopular

    The objects in the returned list are sorted by the view in descending order.

  • http://<IM_REST_API_HOST>/km/api/content?q=contentState eq 'PUBLISHED' and contentType.refKey eq 'AGILE_CHANNEL' and categories.refKey matchAll ('RN_CATEGORY_34587323', 'RN_CATEGORY_34587345')&mode=KEY&orderBy=mostRecent

    The objects in the returned list are sorted by the published date descending order.

Show Source
Nested Schema : replacementTokens
Type: array

The object to create short, manageable terms (the tokenName). These tokens represent standardized, translatable, and sometimes complex content, such as integrated text, images, lists, and tables.

Note: Do not specify the replacementToken object while using 'Content/Create', 'Content/Update', 'Content/Create content from import', and 'Content/Update content from import' services.

Show Source
Nested Schema : userGroups
Type: array

The user groups assigned to the content. The member of the assigned user group will only have access to the content.

Show Source
Nested Schema : views
Type: array

The views assigned to the content. The user who has the view assigned to the content or the content type in which the content is saved can only access the content.

Show Source
Nested Schema : CategoryKey
Match All
Show Source
Nested Schema : CategoryKey-allOf[1]
Type: object
Show Source
  • This field will return number of immediate children a category has.

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

    Example URIs for the this parameter are as follows:

    • http://<IM_REST_API_HOST>/km/api/categories/{id}?childrenCount=true&mode=KEY
    • http://<IM_REST_API_HOST>/km/api/categories?childrenCount=true&mode=KEY
    • http://<IM_REST_API_HOST>/km/api/categories?q=contentTypeRefKey eq 'FAQ'&childrenCount=true&mode=KEY
  • Description of the Category object
  • The unique identifier used while integrating the repository data with the external system.

  • The type of the category used while integrating the repository data with the external system. Valid options are PRODUCT and CATEGORY.

  • The name of the category.

  • The hierarchichal position of the category
  • parents

    This field will return all parents of category.

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

    Example URIs for the this parameter are as follows:

    • http://<IM_REST_API_HOST>/km/api/categories/{id}?withParents=true&mode=KEY
    • http://<IM_REST_API_HOST>/km/api/categories?withParents=true&mode=KEY
    • http://<IM_REST_API_HOST>/km/api/categories?q=contentTypeRefKey eq 'FAQ'&withParents=true&mode=KEY
    • http://<IM_REST_API_HOST>/km/api/categories/{id}?childrenCount=true&withParents=true&mode=KEY
  • The unique record ID of the Category object.

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

  • This is a custom field that will get populated if a name is translated into the default locale when the translated name is not found.

Nested Schema : parents
Type: array

This field will return all parents of category.

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

Example URIs for the this parameter are as follows:

  • http://<IM_REST_API_HOST>/km/api/categories/{id}?withParents=true&mode=KEY
  • http://<IM_REST_API_HOST>/km/api/categories?withParents=true&mode=KEY
  • http://<IM_REST_API_HOST>/km/api/categories?q=contentTypeRefKey eq 'FAQ'&withParents=true&mode=KEY
  • http://<IM_REST_API_HOST>/km/api/categories/{id}?childrenCount=true&withParents=true&mode=KEY
Show Source
Nested Schema : ReplacementToken
Match All
Show Source
Nested Schema : ReplacementTokenKey
Match All
Show Source
Nested Schema : ReplacementTokenKey-allOf[1]
Type: object
Show Source
Nested Schema : ReplacementToken-allOf[1]
Type: object
Show Source
Nested Schema : UserGroupKey
Match All
Show Source
Nested Schema : UserGroupKey-allOf[1]
Type: object
Show Source
Nested Schema : ViewKey
Match All
Show Source
Nested Schema : ViewKey-allOf[1]
Type: object
Show Source
Back to Top

Response

Supported Media Types

200 Response

OK.
Body ()
Root Schema : Content
Match All
Show Source
Nested Schema : ContentExtended
Match All
Show Source
Nested Schema : ContentData
Match All
Show Source
Nested 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 : ContentData-allOf[1]
Type: object
Show Source
Nested Schema : ContentExtended-allOf[1]
Type: object
Show Source
Nested Schema : Content-allOf[1]
Type: object
Show Source
  • categories

    The Category object or list of Category objects assigned to the Content.

    For example. If world is a category at level one, we may have Africa, Uk, America etc. at level two. You can specify requests for objects in a category hierarchically or non- hierarchically. If a content that is assigned Florida is requested using hierarchical request world, you get the result. Whereas, the same request done non- hierarchically gives no result.

    The category parameter lets you filter the result by first level category as well as hierarchical category in both single and multiple configurations.

      Match Any

      The service matches any of the category specified in the request if you pass the contentType.refKey eq parameter or contentType.refKey in parameter with the request.

      Example URIs for the category parameter are as follows:

    • http://<IM_REST_API_HOST>/km/api/content?q=contentType.refKey eq 'AGILE_CHANNEL' and categories.refKey eq 'RN_CATEGORY_34587323'&mode=KEY
    • OR

    • http://<IM_REST_API_HOST>/km/api/content?q=contentType.refKey eq 'AGILE_CHANNEL' and categories.refKey in ('RN_CATEGORY_34587323')&mode=KEY

    • The following example URIs returns Content objects which exist at the level of the specified category. This does not return the child Content objects.

    • http://<IM_REST_API_HOST>/km/api/content?q=contentType.refKey eq 'AGILE_CHANNEL' and categories.refKey withNoChildren 'RN_CATEGORY_34587323'&mode=KEY
    • OR

    • http://<IM_REST_API_HOST>/km/api/content?q=contentType.refKey eq 'AGILE_CHANNEL' and categories.refKey inWithNoChildren ('RN_CATEGORY_34587323')&mode=KEY

    • The following example URIs returns Content objects that match the multiple criterion specified in the request.

    • http://<IM_REST_API_HOST>/km/api/content?q=contentType.refKey in ('AGILE_CHANNEL', 'NEWS_CHANNEL') and categories.refKey inWithNoChildren ('RN_CATEGORY_45587634', 'RN_CATEGORY_45587522')&mode=KEY&orderBy=mostPopular

      The following example URIs returns Content objects that match the multiple criterion specified in the request

    • http://<IM_REST_API_HOST>/km/api/content?q=contentType.refKey in ('AGILE_CHANNEL', 'NEWS_CHANNEL') and categories.refKey inWithNoChildren ('RN_CATEGORY_45587634', 'RN_CATEGORY_45587522') and filterMode.contentState eq 'PUBLISHED'&mode=KEY&orderBy=mostRecent

      The objects in the returned list are sorted by the published Date.

    • http://<IM_REST_API_HOST>/km/api/content?q=contentType.refKey in ('AGILE_CHANNEL', 'NEWS_CHANNEL') and categories.refKey inWithNoChildren ('RN_CATEGORY_45587634', 'RN_CATEGORY_45587522') and filterMode.contentState eq 'LATESTVALID'&mode=KEY&orderBy=mostRecent

      The objects in the returned list are sorted by the dateModified.

      Match ALL

      The service matches all the categories specified in the request if you pass the andcategories.refKey matchAll parameter with the request.

    • http://<IM_REST_API_HOST>/km/api/content?q=contentState eq 'LATEST' and contentType.refKey eq 'AGILE_CHANNEL' and categories.refKey matchAll ('RN_CATEGORY_34587323', 'RN_CATEGORY_34587345')&mode=KEY

      The request returns all Content objects in the world and movies category. The service returns a Content object in the category Africa because Africa is a child category for the category world.

    • http://<IM_REST_API_HOST>/km/api/content?q=contentState eq 'LATEST' and contentType.refKey eq 'AGILE_CHANNEL' and categories.refKey matchAll ('RN_CATEGORY_34587323', 'RN_CATEGORY_34587345')&mode=KEY&orderBy=mostPopular

      The objects in the returned list are sorted by the view in descending order.

    • http://<IM_REST_API_HOST>/km/api/content?q=contentState eq 'PUBLISHED' and contentType.refKey eq 'AGILE_CHANNEL' and categories.refKey matchAll ('RN_CATEGORY_34587323', 'RN_CATEGORY_34587345')&mode=KEY&orderBy=mostRecent

      The objects in the returned list are sorted by the published date descending order.

  • The parameter to request editable content.

  • replacementTokens

    The object to create short, manageable terms (the tokenName). These tokens represent standardized, translatable, and sometimes complex content, such as integrated text, images, lists, and tables.

    Note: Do not specify the replacementToken object while using 'Content/Create', 'Content/Update', 'Content/Create content from import', and 'Content/Update content from import' services.

  • userGroups

    The user groups assigned to the content. The member of the assigned user group will only have access to the content.

  • views

    The views assigned to the content. The user who has the view assigned to the content or the content type in which the content is saved can only access the content.

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
Nested Schema : UserKey
Match All
Show Source
Nested Schema : ContentTypeKey
Match All
Show Source
Nested Schema : UserKey-allOf[1]
Type: object
Show Source
Nested Schema : ContentTypeKey-allOf[1]
Type: object
Show Source
  • The description for the ContentType object. Content Types support multiple languages.

    This field identifies the object associated with the language specified by the user.

  • The name for the ContentType object. The name field can only be used for sorting.

    Content Types support multiple languages. This field identifies the object associated with the language specified by the user.

  • The unique identifier of the ContentType object.

  • The reference key for the ContentType object.

    ContentType objects support multiple languages. This field can be used to identify the associated objects for all languages.

Nested Schema : WorkflowStepKey
Match All
Show Source
Nested Schema : WorkflowStepKey-allOf[1]
Type: object
Show Source
Nested Schema : categories
Type: array

The Category object or list of Category objects assigned to the Content.

For example. If world is a category at level one, we may have Africa, Uk, America etc. at level two. You can specify requests for objects in a category hierarchically or non- hierarchically. If a content that is assigned Florida is requested using hierarchical request world, you get the result. Whereas, the same request done non- hierarchically gives no result.

The category parameter lets you filter the result by first level category as well as hierarchical category in both single and multiple configurations.

    Match Any

    The service matches any of the category specified in the request if you pass the contentType.refKey eq parameter or contentType.refKey in parameter with the request.

    Example URIs for the category parameter are as follows:

  • http://<IM_REST_API_HOST>/km/api/content?q=contentType.refKey eq 'AGILE_CHANNEL' and categories.refKey eq 'RN_CATEGORY_34587323'&mode=KEY
  • OR

  • http://<IM_REST_API_HOST>/km/api/content?q=contentType.refKey eq 'AGILE_CHANNEL' and categories.refKey in ('RN_CATEGORY_34587323')&mode=KEY

  • The following example URIs returns Content objects which exist at the level of the specified category. This does not return the child Content objects.

  • http://<IM_REST_API_HOST>/km/api/content?q=contentType.refKey eq 'AGILE_CHANNEL' and categories.refKey withNoChildren 'RN_CATEGORY_34587323'&mode=KEY
  • OR

  • http://<IM_REST_API_HOST>/km/api/content?q=contentType.refKey eq 'AGILE_CHANNEL' and categories.refKey inWithNoChildren ('RN_CATEGORY_34587323')&mode=KEY

  • The following example URIs returns Content objects that match the multiple criterion specified in the request.

  • http://<IM_REST_API_HOST>/km/api/content?q=contentType.refKey in ('AGILE_CHANNEL', 'NEWS_CHANNEL') and categories.refKey inWithNoChildren ('RN_CATEGORY_45587634', 'RN_CATEGORY_45587522')&mode=KEY&orderBy=mostPopular

    The following example URIs returns Content objects that match the multiple criterion specified in the request

  • http://<IM_REST_API_HOST>/km/api/content?q=contentType.refKey in ('AGILE_CHANNEL', 'NEWS_CHANNEL') and categories.refKey inWithNoChildren ('RN_CATEGORY_45587634', 'RN_CATEGORY_45587522') and filterMode.contentState eq 'PUBLISHED'&mode=KEY&orderBy=mostRecent

    The objects in the returned list are sorted by the published Date.

  • http://<IM_REST_API_HOST>/km/api/content?q=contentType.refKey in ('AGILE_CHANNEL', 'NEWS_CHANNEL') and categories.refKey inWithNoChildren ('RN_CATEGORY_45587634', 'RN_CATEGORY_45587522') and filterMode.contentState eq 'LATESTVALID'&mode=KEY&orderBy=mostRecent

    The objects in the returned list are sorted by the dateModified.

    Match ALL

    The service matches all the categories specified in the request if you pass the andcategories.refKey matchAll parameter with the request.

  • http://<IM_REST_API_HOST>/km/api/content?q=contentState eq 'LATEST' and contentType.refKey eq 'AGILE_CHANNEL' and categories.refKey matchAll ('RN_CATEGORY_34587323', 'RN_CATEGORY_34587345')&mode=KEY

    The request returns all Content objects in the world and movies category. The service returns a Content object in the category Africa because Africa is a child category for the category world.

  • http://<IM_REST_API_HOST>/km/api/content?q=contentState eq 'LATEST' and contentType.refKey eq 'AGILE_CHANNEL' and categories.refKey matchAll ('RN_CATEGORY_34587323', 'RN_CATEGORY_34587345')&mode=KEY&orderBy=mostPopular

    The objects in the returned list are sorted by the view in descending order.

  • http://<IM_REST_API_HOST>/km/api/content?q=contentState eq 'PUBLISHED' and contentType.refKey eq 'AGILE_CHANNEL' and categories.refKey matchAll ('RN_CATEGORY_34587323', 'RN_CATEGORY_34587345')&mode=KEY&orderBy=mostRecent

    The objects in the returned list are sorted by the published date descending order.

Show Source
Nested Schema : replacementTokens
Type: array

The object to create short, manageable terms (the tokenName). These tokens represent standardized, translatable, and sometimes complex content, such as integrated text, images, lists, and tables.

Note: Do not specify the replacementToken object while using 'Content/Create', 'Content/Update', 'Content/Create content from import', and 'Content/Update content from import' services.

Show Source
Nested Schema : userGroups
Type: array

The user groups assigned to the content. The member of the assigned user group will only have access to the content.

Show Source
Nested Schema : views
Type: array

The views assigned to the content. The user who has the view assigned to the content or the content type in which the content is saved can only access the content.

Show Source
Nested Schema : CategoryKey
Match All
Show Source
Nested Schema : CategoryKey-allOf[1]
Type: object
Show Source
  • This field will return number of immediate children a category has.

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

    Example URIs for the this parameter are as follows:

    • http://<IM_REST_API_HOST>/km/api/categories/{id}?childrenCount=true&mode=KEY
    • http://<IM_REST_API_HOST>/km/api/categories?childrenCount=true&mode=KEY
    • http://<IM_REST_API_HOST>/km/api/categories?q=contentTypeRefKey eq 'FAQ'&childrenCount=true&mode=KEY
  • Description of the Category object
  • The unique identifier used while integrating the repository data with the external system.

  • The type of the category used while integrating the repository data with the external system. Valid options are PRODUCT and CATEGORY.

  • The name of the category.

  • The hierarchichal position of the category
  • parents

    This field will return all parents of category.

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

    Example URIs for the this parameter are as follows:

    • http://<IM_REST_API_HOST>/km/api/categories/{id}?withParents=true&mode=KEY
    • http://<IM_REST_API_HOST>/km/api/categories?withParents=true&mode=KEY
    • http://<IM_REST_API_HOST>/km/api/categories?q=contentTypeRefKey eq 'FAQ'&withParents=true&mode=KEY
    • http://<IM_REST_API_HOST>/km/api/categories/{id}?childrenCount=true&withParents=true&mode=KEY
  • The unique record ID of the Category object.

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

  • This is a custom field that will get populated if a name is translated into the default locale when the translated name is not found.

Nested Schema : parents
Type: array

This field will return all parents of category.

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

Example URIs for the this parameter are as follows:

  • http://<IM_REST_API_HOST>/km/api/categories/{id}?withParents=true&mode=KEY
  • http://<IM_REST_API_HOST>/km/api/categories?withParents=true&mode=KEY
  • http://<IM_REST_API_HOST>/km/api/categories?q=contentTypeRefKey eq 'FAQ'&withParents=true&mode=KEY
  • http://<IM_REST_API_HOST>/km/api/categories/{id}?childrenCount=true&withParents=true&mode=KEY
Show Source
Nested Schema : ReplacementToken
Match All
Show Source
Nested Schema : ReplacementTokenKey
Match All
Show Source
Nested Schema : ReplacementTokenKey-allOf[1]
Type: object
Show Source
Nested Schema : ReplacementToken-allOf[1]
Type: object
Show Source
Nested Schema : UserGroupKey
Match All
Show Source
Nested Schema : UserGroupKey-allOf[1]
Type: object
Show Source
Nested Schema : ViewKey
Match All
Show Source
Nested Schema : ViewKey-allOf[1]
Type: object
Show Source
Back to Top

Examples

The following example shows how to translate a content object to a required language by submitting a POST request on the REST resource using cURL.

cURL Command Example

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

Example of Request Header

The following shows an example of the request header.

-H "kmauthtoken: {\"siteName\":\"ORACLE_KNOWLEDGE\",\"integrationUserToken\":\"\"+eCJYkxKwj5HUaIiJYun0/TpatwT1LmtcsF05W33xnEojifV/AsLDj9RpN0lKuorTMNKeSE1tgC7svVL+BzntqDON4KiM1HFlpxvXEUCB0P2w0Xrs75McygqxdVaDSE9"}" \
-H "Accept: application/json"

Request Body Example

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

{
  "content" : {
    "isForEdit" : true,
    "views" : [ {
      "recordId" : "0246897531",
      "referenceKey" : "PRODUCT_MANAGEMENT",
      "name" : "PRODUCT_MANAGEMENT"
    } ],
    "recordId" : "12345678",
    "documentId" : "FAQ92",
    "locale" : {
      "recordId" : "es_ES"
    },
    "contentType" : {
      "recordId" : "9876543210",
      "referenceKey" : "FAQ",
      "name" : "FAQ"
    },
    "basedOnVersion" : "2.0",
    "basedLocale" : {
      "recordId" : "en_US"
    },
    "xml" : "XML_VALUE"
  },
  "contentModificationQualifier" : {
  }
}

Response Body Example

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

{
  "isForEdit" : true,
  "replacementTokens" : [ {
    "dateModified" : "284852364-01-15T04:07:46-0800",
    "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}"
    } ]
  },
  "dateModified" : "2013-04-23T18:06:26-0700",
  "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-23T18:06:26-0700",
  "dateAdded" : "2013-04-23T18:06:26-0700",
  "displayStartDate" : "2013-04-23T18:06:26-0700",
  "displayEndDate" : "2013-04-23T18:06:26-0700",
  "eventStartDate" : "2013-04-23T18:06:26-0700",
  "eventEndDate" : "2013-04-23T18:06:26-0700",
  "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,
  "pending" : false,
  "displayReviewDate" : "2013-04-23T18:06:26-0700",
  "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-23T18:06:26-0700",
  "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",
  "reasonForEdit" : "REASON_FOR_EDITING_OR_CREATING_CONTENT_RECORD"
}
Back to Top