Find by ID

get

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

This method returns a knowledge article with the specified record ID.

User Type

Whenever this service is used, it is performed on the behalf of a user. The software allows two types of users, staff accounts (or console users) and contacts (or web users) to use this service. Some parameters or parameter values are restricted to by user types. In addition the data returned by the service may vary by the user type. We will describe this in more detail below.

Article Version

In general the software returns the published (and live) version of the article. In some cases the software returns the latest version of the article, which may not have been published. We note the cases where the latest version of the article is returned in 'Additional Article Information' below. In all other cases, you may assume the software is returning the published-live version.

To specify whether you want the published (and live) or the latest version of the article, you may use the contentState parameter and set the value to PUBLISHED or LATESTVALID, respectively. The default value is PUBLISHED.

Article Size

The service returns the knowledge article in a content business object (or content BO). The developer can select the size of the content BO returned by the application by using the mode parameter. The software supports four values, from smallest to largest: KEY, DATA, EXTENDED, and FULL. The information returned by the larger mode contains all of the information returned by the smaller mode. For example, the DATA content BO contains all of the information of the KEY content BO.

When the KEY mode is used, the software returns a limited amount of article information, e.g. title, document id, and date modified. The KEY mode can be used to create a list of articles.

When the DATA mode is used, the software returns much more information about the article, but not the contents of the article. This is the default value when requesting a list of articles.

When the EXTENDED mode is used, the software returns all the information about the content, except for security and visibility filtering fields attributes such as categories, userGroups and views. The EXTENDED mode can be used to display an article to an end-customer, agent or author.

When the FULL mode is used, the software returns all of the information about the article. The FULL mode can be used so that a user or a program can update the article. This is the default value of the mode parameter when requesting a single article.

For example, to retrieve an article with all the data needed to edit it, submit a call using the URI (NOTE: The isForEdit parameter will be introduced below):

GET http://<IM_REST_API_HOST>/km/api/latest/content/{id}? isForEdit=true&mode=FULL

Article Locale

The developer can request a specific locale of the article. To request an article in a specific locale, the developer can:

  • Specify the required locale code in the Accept-Language header with the request.
  • Specify the langpref request parameter with the HTTP request, and set the parameter value to the required locale code.
  • Specify the localeId attribute in the kmauthtoken passed in the request.

For example, to request an article in the Spanish-Spain locale, submit a call using the URI:

GET http://<IM_REST_API_HOST>/km/api/latest/content/{id}?langpref=es_ES

NOTE: if the Accept-Language header is specified, it will be used. If not, then if the langpref parameter is specified it will be used. If neither Accept-Language header, nor langpref parameter is specified, but the localeId attribute of the kmauthtoken is specified, it will be used.

By default, the software returns articles in the user''s default locale.

Additional Article Information

The service can provide additional information about the article to support different use cases. As a general rule, the developer can request the article so that it can be used by an end-customer, an agent, or an author. To obtain the additional information for agents or authors the developer may use two parameters, isForEdit and agentMode. NOTE: isForEdit and agentMode parameters must be accompanied by mode=FULL or mode=EXTENDED.

Requesting an Article For an End-Customer

By default the service returns the article with information that is sufficient to be displayed to end- customers. For example, to retrieve an article to be displayed to an end-customer, submit a call using the URI:

GET http://<IM_REST_API_HOST>/km/api/latest/content/{id}

Requesting an Article For an Agent

In some cases the developer may want to obtain additional data about the knowledge article so that additional formatting may be provided for a call center agent. The software can provide more detailed information about conditional content indicating the sections of the article are secured by user groups so that the application can highlight that secured content to the agent. In that case the developer should set the agentMode parameter to true. For example, to retrieve an article to be displayed to an end- customer, submit a call using the URI:

GET http://<IM_REST_API_HOST>/km/api/latest/content/{id}?agentMode=true&mode=FULL

When agentMode is true, the software returns the published version of the article.

Requesting an Article For an Author

In another common use case the developer may want to obtain all the data about the knowledge article so that it can be updated by an author. In this case the developer should set the isForEdit parameter to true. The software will provide even more detailed information, including the list of replacement tokens that are contained in the article, the meta-data associated with the article, and conditional content markers. When isForEdit is true, the software returns the latest version of the article. For example, to retrieve the latest version of an article so that it can be updated by an author, submit a call using the URI:

GET http://<IM_REST_API_HOST>/km/api/latest/content/{id}?isForEdit=true&mode=FULL

Default Value and Additional Notes

The default value of agentMode and isForEdit is false. Please note that it is invalid to set both isForEdit and agentMode to true. Only one of the parameters can be set to true.

Setting agentMode to true is supported for staff accounts only. The software will return an error if agentMode is true and the call is made on the behalf of a contact.

Similarly setting isForEdit to true is supported for staff accounts only. The software will return an error if isForEdit is true and the call is made on the behalf of a contact.

Security

The software will only return articles that the user is entitled to view. Recalling that the software supports two user types, staff accounts (console users) and contacts (web users), the software uses different mechanisms to control the user's entitlements. The web user's user group assignments control the contact's entitlements. The console user's role, content type privileges, authoring locales, and views control the staff account's entitlements.

Entitlements For Contacts

A contact (or web user) is entitled to view an article when the web user has at least one user group that matches at least one of the user groups assigned to the article. Please note that articles with no user groups assigned are considered public and may be viewed by any contact, including anonymous (unregistered) Customer Portal users. If the article contains content that are further restricted, for example, using secured attributes or conditional content, the service returns only the article content the user is entitled to view.

Entitlements For Staff Accounts

A staff account (or console user) is entitled to view an article based on several factors. The main factor is whether the call is being made on behalf of an agent (isForEdit is set to false) or an author (isForEdit is set to true).

An Information Manager Console user or an Oracle B2C Service account user can access the content based on the value of 'isForEdit' query parameter. The service uses the security role permissions assigned to the user to display the content.

Entitlements For Agents

Agents are entitled to view published and live knowledge articles of any content type as long as their console role has the view privilege for that content type.

You can optionally further restrict the articles an agent has access to using the USE_USER_GROUPS_FOR_CONSOLE_USERS configuration variable. When the value of this configuration variable is set as 'true' then user must have at least one user group that matches at least one of the article's user groups. The default value of this parameter is false.

Entitlements For Authors

An author is entitled to view any version of any knowledge articles of any content type as long as:

  • The console role has the view privilege for that content type
  • The author is assigned the repository view or one or more views that matches at least one of the article's views.
  • The author is assigned the article's locale as an authoring locale.

The author's user groups are ignored when isForEdit is set to true. The value of USE_USER_GROUPS_FOR_CONSOLE_USERS is ignored when isForEdit it set to true.

Please refer to the product documentation for additional information.

Interface ID

The developer can request a specific copy of an article that is associated with an Oracle B2C Service interface. For example, to retrieve the article that should be displayed to an end-customer in the Customer Portal interface ID of 3, submit a call using the URI:

GET http://<IM_REST_API_HOST>/km/api/latest/content/{id}?interfaceId=3

This parameter may be used on the behalf of contacts only. The specific locale of the article is determined by the mapping of the Oracle B2C Service interface to the Knowledge Advanced view and locale. Please refer to the product documentation for more information.

NOTE: If the kmauthtoken header contains an Interface ID value and neither isForEdit nor agentMode is true, then the service returns only documents that are mapped to the specified interface. The interface ID in the API session token overrides the interfaceId parameter value used with the HTTP request.

Optionally retrieving documents in all locales

This service supports the query parameter additionalFields for value 'allTranslations'. The allTranslations field in the content BO is not populated unless the additionalFields query parameter is supplied with the value allTranslations. The allTranslations field will contain a list of all articles that satisfies the security and user type rules for all locales in the repository except the master locale.

For example, to retrieve all translated articles that are published call using the URI:

GET http://<IM_REST_API_HOST>/km/api/latest/content/docId/{docId}?additionalFields=allTranslations&contentState=PUBLISHED

Asset Security

Content can contain assets, such as images and links, uploaded using CKFinder. Access to these assets is secured by adding an encrypted token to the asset URL. Each image or link has its own encrypted token. When you retrieve a knowledge article, the REST API response returns the URLs to the images and links with the token added. A token is valid for the duration configured in the Authoring tool. The default is 60 minutes. Accessing an asset URL after the token has expired results in an error message.

The administrator can configure the token expiration time in the Authoring tool by navigating to Tools > System > Configuration > File Attachment Configuration, clicking the Override default configuration link, and setting the value for the CKFinder secured asset authentication token expiration value in minutes field in the CKFinder File Token Expiration section.

Here is an example of a URL for an image:

<img alt='' src='http//im-rest-api-host-ad.dc.lam/fas/resources/im_rest_api_host/hierarchal/$TENANTID$/$TENANTID$_LIBRARY/TENANT/example.jpg?tk=MUxNlLo%2Fhdd26NIaR1j5KRBs27%2B8nf75T2KzUF%2B4Pz5jR1M0fD1yiHPUSneBE%2BWl4Dbq4PaL9kqxWFuquSkElDR3XUVZRVylxuHa7%2B8i6hJXVLkEMqqF5eRuNNPxH%2BzgswLzAfK58nv89rX46gJNLL56F1htQExTDxg60rmG%2B59IPpWfxFI9Xzmn4G9BCA6ZFJN%2BeT5M7SHrbvlQh7nijBhZwuC2UVPC5MVJ6PwbbZBpMiNlmcbyv17uhb6t98%2BPzhgipZZMstMoOyBvAytxnPB%2B1eGKZo00tMHo6XeoNNncvBQ893aiXlvUkyNg7wyMKfMjvQq4nlulxYWKDtYO53L3VIVaIVWZ%2FDrMfMUcrnGDwdUhg8VP06i0l%2FenApaP' style='width: 835px; height: 472px;'>

Here is an example of a URL for a link:

<a href=' http//im-rest-api-host-ad.dc.lam/fas/resources/im_rest_api_host/hierarchal/im_rest_api_host_LIBRARY/TENANT/example.pdf?tk=NUwItZ9anCrXRUqjz5xDHfdLwNWk%2B9FxJtqFKKfiPsSPMzYW6FURBZIHFuPst4AOu76yKJU0WTrDHHc2jJpJexeoolutoaHRho1%2FTY8ReTHl1v1OKucgrmv9YNBBVOgvuhiGhh1kv8BQSiBFTZ8fpGqNp6JKjYwSxnNbu%2Bi4UsAFTCmUuBOPbE4u0FZXGqkZwFWLmVZC2uyCQ0%2BKNkrKnlpzPB3uzfRR7gNZnsjDttHSTDFMat2y9PHFupB9DFhHx0Umnk1kc4h8%2FuOHXAdXCT1LiGjH2qYH1glEi34OTSILDW4MVTmzU5ikLfqHiQDNE4hmBctPWX8ceJwwpiyu5STCjJV1bBlW8CZT8ltdb6G%2FcmQRRjecVzD%2BzC1pIRtWb%2F9Y8WZ1pI2mIl4cz3rdkw%3D%3D' id='yui_3_18_1_13_1585194449004_164'>example.pdf</a>

Response Errors

The possible error responses for this method are as follows:

  • OKDOM-GEN0001

    The error occurs in any of the following cases:

    • The article with the specified record ID is not found.
    • The kmauthtoken header contains an interface ID for which no interface is found.
    • The interface ID provided with the interfaceId parameter is invalid.
  • OKDOM-CONT0047

    The error occurs when the article with the specified record ID is found, but one of the following conditions occurred:

    • No langpref parameter value or the Accept-Language header value is specified with the request.
    • No translation exists for the document in the user's default locale.
  • OKDOM-CONT0046

    The error occurs when the specified article is found, but no translation is found for the locale specified by the langpref parameter value or the Accept-Language header value.

  • OK-GEN0001

    The error occurs when the specified langpref parameter value does not match with any locale in the system.

  • OK-GEN0014

    The error occurs when the mode of the document is not specified as FULL and either isForEdit or agentMode in request parameter value is set as true.

  • OK-GEN0013

    The error occurs when an invalid mode is specified with the request. The valid mode values are KEY, DATA, EXTENDED, and FULL.

  • OK-GEN0020

    The error occurs when the isForEdit request parameter value is specified as true, and any of the following conditions exist:

    • The contentState parameter value is given with the request.
    • The agentMode request parameter value is specified as true.
  • OK-SEC0001

    The error occurs when the isForEdit request parameter value is specified as true, and any of the following conditions exist:

    • The user does not have the modify privileges for the article's content type.
    • The langpref parameter value is not specified, and the content is not available in the user's default locale.
    • The langpref parameter value is specified, but the user does not have the requested locale in the content locales list of the user.

  • OK-RN_INTERFACE0001

    The error occurs when either of the following conditions exist:

    • The kmauthtoken header contains an interface ID for which no view has been mapped.
    • No view has been mapped to the interface specified by the interface ID request parameter.

  • OK-SESSION0011

    The error occurs when the user tries to access an asset URL whose token has expired.

Example URIs

  • GET http://<IM_REST_API_HOST>/km/api/latest/content/{id}

    The request returns the FULL content BO of the published (and live) version of the article with the matching record ID in the default locale.

  • GET http://<IM_REST_API_HOST>/km/api/latest/content/{id}?contentState=LATESTVALID

    The request returns the FULL Content BO of the latest valid version of the article with the matching record ID in the default locale.

  • GET http://<IM_REST_API_HOST>/km/api/latest/content/{id}?mode=EXTENDED

    The request returns the EXTENDED content BO of the published (and live) version of the article with the matching record ID in the default locale. The returned XML and the meta-data XML have the replacement token references replaced with the appropriate replacement token values.

  • GET http://<IM_REST_API_HOST>/km/api/latest/content/{id}?mode=EXTENDED&langpref=it_IT

    The request returns the EXTENDED content BO of the published (and live) version of the article with the matching record ID in the Italian ??? Italy locale.

  • GET http://<IM_REST_API_HOST>/km/api/latest/content/{id}?mode=FULL

    The request returns a read-only version of the FULL content BO of the published (and live) version of the article with the matching record ID in the default locale. The returned XML and the meta-data XML have the replacement token references replaced with the appropriate replacement token values, because isForEdit is set to false by default. Conditional content will appear in the output according to the user's security privileges because agentMode is set to false by default.

  • GET http://<IM_REST_API_HOST>/km/api/latest/content/{id}?mode=FULL&isForEdit=true

    The request returns an editable version of the FULL content BO of the published (and live) version of the article with the matching record ID in the default locale. The returned XML and the meta-data XML have the replacement token names referenced with a list of replacement token objects. The returned XML and meta-data XML also contains the user group security at the attribute and conditional content section levels.

  • GET http://<IM_REST_API_HOST>/km/api/latest/content/{id}?mode=FULL&isForEdit=true&langpref=fr_CA

    The request returns an editable version of the FULL content BO of the published (and live) version of the article with the matching record ID in the French-Canada locale. The returned XML and the meta-data XML have the replacement token names referenced with a list of replacement token objects. The returned XML and meta-data XML also contains the user group security at the attribute and conditional content section levels.

Request

Path Parameters
  • The unique identifier of the object to be retrieved.
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 find a document that has the specified content record ID by submitting a get request on the REST resource using cURL.

cURL Command

Command: curl -X "GET" "http://<IM_REST_API_HOST>/km/api/latest/content/{id}"

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"

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