Change owner

post

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

This service will change the owner of particular content version to specified user which is passed in as request parameter.

New owner user record Id should be populated in passed post parameter.

NOTE: New owner should be eligible to be the owner of this version based on below rules :

  • Should be 'Active'
  • Should 'admin role for the view of content version passed in'.
  • Should have 'MODIFY' privilege on content channel of content version passed in.

Response Errors

The possible error responses for this method are as follows:

  • OKDOM-GEN0001

    The error occurs in any of the following cases:

    • No user is found by the specified ID.
    • No content is found by the specified Version ID.
  • OKDOM-CONT0141

    This error occurs when the user passed in request parameter is found, but the user does not have the sufficient role to be an owner for request content version.

  • OKDOM-CONT0142

    This error occurs when the user passed in request parameter is already an owner of content version passed.

  • OKDOM-CONT0001

    The error occurs when the specified document is in checked out state.

Request

Supported Media Types
Path Parameters
Body ()
The new content owner
Root Schema : UserKey
Match All
Show Source
Nested Schema : Singular Resource
Type: object
Title: Singular Resource
Oracle base singular resource schema definition.
Show Source
Nested Schema : UserKey-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 assign a user as the owner of a content 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}/changeOwner

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"

Request Body Example

The following shows an example of the request body.

{
  "recordId" : "DE49ADD3970D48CDB4E4E1C2CA6890F4",
  "name" : "NAME_VALUE",
  "externalId" : 1428416792444,
  "externalType" : "EXTERNALTYPE_VALUE"
}

Response Body Example

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

{
  "isForEdit" : true,
  "replacementTokens" : [ {
    "dateModified" : "284852364-01-15T06:07:46-0600",
    "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-23T20:06:26-0500",
  "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-23T20:06:26-0500",
  "dateAdded" : "2013-04-23T20:06:26-0500",
  "displayStartDate" : "2013-04-23T20:06:26-0500",
  "displayEndDate" : "2013-04-23T20:06:26-0500",
  "eventStartDate" : "2013-04-23T20:06:26-0500",
  "eventEndDate" : "2013-04-23T20:06:26-0500",
  "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-23T20:06:26-0500",
  "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-23T20:06:26-0500",
  "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