Find by ID
/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
-
id: string
The unique identifier of the object to be retrieved.
Response
- application/json
- application/xml
200 Response
-
object
Singular Resource
Title:
Singular Resource
Oracle base singular resource schema definition. -
object
ContentKey-allOf[1]
object
Singular Resource
object
-
allTranslations(optional):
array allTranslations
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.
-
answerId(optional):
integer
The unique identifier that enables mapping between an answer and the content.
-
dateModified(optional):
string(date-time)
The date when the content was last modified in the Oracle Knowledge Repository.
-
documentId(optional):
string
The unique identifier of a document that indicates the content type in which the content is saved.
-
locale(optional):
LocaleKey
-
recordId(optional):
string
The unique identifier of the document. This ID is same in all versions in all locales of the document.
-
title(optional):
string
The tittle of the document.
-
version(optional):
string
Version of the Content object
-
versionId(optional):
string
The unique identifier of the specific version of a document in a specific locale. You cannot use this field in queries made using q query parameter.
object
-
basedLocale(optional):
LocaleKey
-
basedOnVersion(optional):
string
Version of the Content object
-
checkedOut(optional):
boolean
The date when an author has checked out or locked the document for editing.
-
checkedOutBy(optional):
UserKey
-
contentType(optional):
ContentTypeKey
-
createDate(optional):
string(date-time)
The date when the content was created. For legacy systems, the create date is the date when the document was created in those systems.
-
creator(optional):
UserKey
-
dateAdded(optional):
string(date-time)
The date when the content was added to the content type. For legacy systems, the create date is the date when the document was migrated from the legacy system to the Oracle Knowledge Repository.
-
displayEndDate(optional):
string(date-time)
The date when the service stops the display of the document to the end users.
-
displayPosition(optional):
Allowed Values:
[ "FIXED_AT_TOP", "PLACE_AT_TOP", "HISTORICAL_USEFULNESS" ]
LookUp code that can be Fixed@Top, Place@Top , Historical Usefulness -
displayReviewDate(optional):
string(date-time)
The date when the document requires a review by an author capable of performing the review.
-
displayStartDate(optional):
string(date-time)
The date when the document will be available to display to end-users.
-
eventEndDate(optional):
string(date-time)
The date when the document's event ends.
-
eventStartDate(optional):
string(date-time)
The date when the document's event begins.
-
lastModifiedDate(optional):
string(date-time)
The date when the content was last modified. For legacy systems, the lastModifiedDate date is the date when the document was last modified in those systems.
-
lastModifier(optional):
UserKey
-
owner(optional):
UserKey
-
pending(optional):
boolean
The flag that indicates whether the document is pending for publication.
-
priority(optional):
Allowed Values:
[ "PRIORITY_0", "PRIORITY_1", "PRIORITY_2", "PRIORITY_3", "PRIORITY_4", "PRIORITY_5", "PRIORITY_6", "PRIORITY_7", "PRIORITY_8", "PRIORITY_9", "PRIORITY_10", "PRIORITY_11", "PRIORITY_12", "PRIORITY_13", "PRIORITY_14", "PRIORITY_15", "PRIORITY_16", "PRIORITY_17", "PRIORITY_18", "PRIORITY_19", "PRIORITY_20" ]
The priority assigned to the content.
The valid values are: PRIORITY_0 to PRIORITY_20. For example, PRIORITY_1 or PRIORITY_18 are valid values, but PRIORITY_21 is not.
-
publishDate(optional):
string(date-time)
The date when the document was first displayed to end users.
-
published(optional):
boolean
The flag that indicates whether the document is published.
-
publishedVersion(optional):
string
Version of the Content object
-
suppressNotification(optional):
boolean
The flag that indicates whether the document's subscription notification is suppressed.
object
-
metaDataResourcePath(optional):
string
MetaDataResourcePath of the Content object
-
metaDataXml(optional):
string
MetaDataXml of the Content object
-
reasonForEdit(optional):
string
Reasons for editing or creating a content. This will only be used when creating or updating the document.
-
resourcePath(optional):
string
EXAMPLE URL : http://<IM_REST_API_HOST>/okcs/resources/{TENANTID}/content/draft/{CONTENTID}/{CONTENTTEXTID}/{FILENAME_WITH_EXTENSION}?login={USER_NAME}. If the user name is not passed then it will be defaulted to 'guest' user.
-
wfStepNotificationOverride(optional):
string(date-time)
The date when the service sends notification to the author involved in the review. Once the workflow notification is given, the service updates the next review date.
-
workflowStep(optional):
WorkflowStepKey
-
xml(optional):
string
Xml of the Content object
object
-
categories(optional):
array 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
http://<IM_REST_API_HOST>/km/api/content?q=contentType.refKey eq 'AGILE_CHANNEL' and categories.refKey eq 'RN_CATEGORY_34587323'&mode=KEY
http://<IM_REST_API_HOST>/km/api/content?q=contentType.refKey eq 'AGILE_CHANNEL' and categories.refKey in ('RN_CATEGORY_34587323')&mode=KEY
http://<IM_REST_API_HOST>/km/api/content?q=contentType.refKey eq 'AGILE_CHANNEL' and categories.refKey withNoChildren 'RN_CATEGORY_34587323'&mode=KEY
http://<IM_REST_API_HOST>/km/api/content?q=contentType.refKey eq 'AGILE_CHANNEL' and categories.refKey inWithNoChildren ('RN_CATEGORY_34587323')&mode=KEY
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.
The service matches any of the category specified in the request if you pass the
contentType.refKey eq
parameter orcontentType.refKey in
parameter with the request.Example URIs for the category parameter are as follows:
OR
The following example URIs returns Content objects which exist at the level of the specified category. This does not return the child Content objects.
OR
The following example URIs returns Content objects that match the multiple criterion specified in the request.
- Match ALL
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 service matches all the categories specified in the request if you pass the
andcategories.refKey matchAll
parameter with the request. -
isForEdit(optional):
boolean
The parameter to request editable content.
-
replacementTokens(optional):
array 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(optional):
array userGroups
The user groups assigned to the content. The member of the assigned user group will only have access to the content.
-
views(optional):
array 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.
array
-
Array of:
object instanceLink
Metadata describing link description objects that MAY appear in the JSON instance representation.
object
-
href:
string
URI [RFC3986] or URI Template [RFC6570]. If the value is set to URI Template, then the "templated" property must be set to true.
-
mediaType(optional):
string
Media type, as defined by RFC 2046, describing the link target.
-
method(optional):
string
HTTP method for requesting the target of the link.
-
profile(optional):
string
Link to the metadata of the resource, such as JSON-schema, that describes the resource expected when dereferencing the target resource..
-
rel:
string
Name of the link relation that, in addition to the type property, can be used to retrieve link details. For example, href or profile.
-
templated(optional):
boolean
Boolean flag that specifies that "href" property is a URI or URI Template. If the property is a URI template, set this value to true. By default, this value is false.
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.
-
object
Singular Resource
Title:
Singular Resource
Oracle base singular resource schema definition. -
object
LocaleKey-allOf[1]
object
-
recordId(optional):
string
The unique identifier of the Locale object.
-
object
Singular Resource
Title:
Singular Resource
Oracle base singular resource schema definition. -
object
UserKey-allOf[1]
-
object
Singular Resource
Title:
Singular Resource
Oracle base singular resource schema definition. -
object
ContentTypeKey-allOf[1]
object
-
email(optional):
string
Email of the User object
-
externalId(optional):
integer
The ExternalId is the Id of the corresponding User from an external system. It, along with ExternalType, can be used to bridge the gap between a User from this system and a User from an external system.
-
externalType(optional):
string
The ExternalType is the type of the corresponding User from an external system. It, along with ExternalId, can be used to bridge the gap between a User from this system and a User from an external system.
-
name(optional):
string
User's full name
-
recordId(optional):
string
The unique record ID of the User object.
object
-
description(optional):
string
The description for the ContentType object. Content Types support multiple languages.
This field identifies the object associated with the language specified by the user.
-
name(optional):
string
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.
-
recordId(optional):
string
The unique identifier of the ContentType object.
-
referenceKey(optional):
string
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.
-
object
Singular Resource
Title:
Singular Resource
Oracle base singular resource schema definition. -
object
WorkflowStepKey-allOf[1]
object
-
name(optional):
string
Localized name of the workflow step
-
recordId(optional):
string
GUID from the WORKFLOWSTEP table
-
referenceKey(optional):
string
Non localized name of the workflow step
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
http://<IM_REST_API_HOST>/km/api/content?q=contentType.refKey eq 'AGILE_CHANNEL' and categories.refKey eq 'RN_CATEGORY_34587323'&mode=KEY
http://<IM_REST_API_HOST>/km/api/content?q=contentType.refKey eq 'AGILE_CHANNEL' and categories.refKey in ('RN_CATEGORY_34587323')&mode=KEY
http://<IM_REST_API_HOST>/km/api/content?q=contentType.refKey eq 'AGILE_CHANNEL' and categories.refKey withNoChildren 'RN_CATEGORY_34587323'&mode=KEY
http://<IM_REST_API_HOST>/km/api/content?q=contentType.refKey eq 'AGILE_CHANNEL' and categories.refKey inWithNoChildren ('RN_CATEGORY_34587323')&mode=KEY
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.
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:
OR
The following example URIs returns Content objects which exist at the level of the specified category. This does not return the child Content objects.
OR
The following example URIs returns Content objects that match the multiple criterion specified in the request.
- Match ALL
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 service matches all the categories specified in the request if you pass the andcategories.refKey matchAll
parameter with the request.
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.
array
The user groups assigned to the content. The member of the assigned user group will only have access to the content.
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.
-
object
Singular Resource
Title:
Singular Resource
Oracle base singular resource schema definition. -
object
CategoryKey-allOf[1]
object
-
childrenCount(optional):
integer
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(optional):
string
Description of the Category object
-
externalId(optional):
integer
The unique identifier used while integrating the repository data with the external system.
-
externalType(optional):
string
The type of the category used while integrating the repository data with the external system. Valid options are PRODUCT and CATEGORY.
-
name(optional):
string
The name of the category.
-
objectId(optional):
string
The hierarchichal position of the category
-
parents(optional):
array 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
-
recordId(optional):
string
The unique record ID of the Category object.
-
referenceKey(optional):
string
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.
-
responseLocale(optional):
string
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.
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
-
object
Singular Resource
Title:
Singular Resource
Oracle base singular resource schema definition. -
object
ReplacementTokenKey-allOf[1]
object
-
recordId(optional):
string
The replacement token's record Id.
-
tokenName(optional):
string
The replacement token's name.
object
-
dateAdded(optional):
string(date-time)
The date added for the replacement token for the specified locale.
-
dateModified(optional):
string(date-time)
The date modified for the replacement token for the specified locale.
-
replacementText(optional):
string
The HTML formatted replacement text.
-
replacementTextNonFormatted(optional):
string
The non-HTML formatted replacement text.
-
tokenType(optional):
string
The token type of the token. Used to specify what kind of text editor was used to create/edit this token: rich text('RICH_TEXT') or plain text('PLAIN_TEXT').
-
object
Singular Resource
Title:
Singular Resource
Oracle base singular resource schema definition. -
object
UserGroupKey-allOf[1]
object
-
externalId(optional):
integer
The unique identifier of the corresponding userGroup from an external system. You can use the External ID with the ExternalType parameter to connect user groups in the internal and the the external systems.
-
externalType(optional):
string
The ExternalType is the type of the corresponding userGroup from an external system.
-
name(optional):
string
The localized name of the user group. The name field can only be used for sorting.
-
recordId(optional):
string
The unique identifier from the TAG table that represent a userGroups resource
-
referenceKey(optional):
string
The non localized name of the user group
-
object
Singular Resource
Title:
Singular Resource
Oracle base singular resource schema definition. -
object
ViewKey-allOf[1]
object
-
name(optional):
string
Localized name of the view
-
recordId(optional):
string
GUID of the SITE table containing the view definition
-
referenceKey(optional):
string
Non localized reference key for the view
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" }