Get content by version ID
/km/api/v1/content/versions/{versionId}
This method returns a document having the specified version ID (versionId). By default, the returned content document is set for reading purpose. However, you can request for an editable document.
Version ID is the unique identifier for each version of the content. A version consists of the content ID (document ID or record ID), locale, and major and minor version.
For example, document having the content ID FA54 may have the following three versions:
- FA54 in English at 1.0
- FA54 in English at 2.0
- FA54 in Spanish at 1.0
These three versions of the specific document has unique version IDs.
Request Editable Content
To request an editable document, specify the following parameters in the HTTP request:
Note: Before you send the request, ensure that you have the view privilege on the content type.
- Specify isForEdit request parameter with the HTTP request, and set the parameter value to true.
- Specify the mode of the Content object as FULL.
For example, when the request is submitted using the URI http://<IM_REST_API_HOST>/km/api/content/versions/{versionId}?mode=FULL&isForEdit=true
, you get a Content object having the specified ID parameter in FULL mode. The latest version of the content appears in the default locale for edit purpose.
Request Readable Content
The returned document is by default set for reading purpose, even though you may need to request a readable document in different situations.
To request a readable document, specify the following parameters in the HTTP request:
Note: Before you send the request, ensure that you have the view privilege on the content type.
- Specify isForEdit request parameter with the HTTP request, and set the parameter value to false.
- Specify the mode of the Content object as EXTENDED or FULL.
For example, when the request is submitted using the URI http://<IM_REST_API_HOST>/km/api/content/versions/{versionId}?mode=EXTENDED
, you get a read-only Content object in the EXTENDED mode. The service replaces the replacement token references in the content of the XML and the meta-data XML with the replacement token values.
Request Translated Content
You cannot request translated content using version ID or answer ID.
Version ID represents a specific translation of the content in the major and minor versions. For example, a document FA54 has two different version IDs for English content, one at version 1.0 and the other at 2.0.
Answer ID represents a specific translation of the content. For example, a document FA54 has answer ID 101 for English and answer ID 102 for Spanish.
Content Security
A web 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.
- User must have view privilege on the content type in which the specified content record is saved.
- The views or departments assigned to the user match with at least one of the views or departments assigned to the content.
Response Errors
The possible error responses for this method are as follows:
- OK-GEN0020
- The langpref request parameter is specified with the request and it doesn't match with locale of version.
- The error occurs when you specify langpref parameter or contentState parameter with the request.
- OKDOM-GEN0001
The error occurs when a content with the specified version ID cannot be found.
- OK-GEN0014
The error occurs when the isForEdit request parameter value is set as true but the mode of the document is not specified as FULL.
- $ERROR.General.BO_MODE_NOT_FOUND_CODE$
The error occurs when an invalid mode is specified with the request. The valid mode values are KEY, DATA, EXTENDED, and FULL.
- 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 on the content type which contains the document.
- The locale of the version is not present in the available content locales list of the user
Example URIs
The example URIs for this method are as follows:
http://<IM_REST_API_HOST>/km/api/content/versions/{versionId}?mode=FULL
The request returns the specified Content object in the FULL mode.
http://<IM_REST_API_HOST>/km/api/content/versions/{versionId}?mode=FULL
The request returns the readable Content object in the FULL mode. The field for isForEdit request parameter value in the object is set as false.
http://<IM_REST_API_HOST>/km/api/content/versions/{versionId}?mode=FULL&isForEdit=true
The request returns an editable Content object having the specified version ID in the FULL mode. The content object in the list appears in the default locale. The field for isForEdit request parameter value in the object appears as true.
Request
-
versionId: string
The draft version GUID
Response
- application/json
- application/xml
200 Response
object
Content
-
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.
-
articleStatus(optional):
object ArticleStatusKey
Title:
ArticleStatusKey
-
basedLocale(optional):
object LocaleKey
Title:
LocaleKey
-
basedOnVersion(optional):
string
Version of the Content 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 'WORLD'&mode=KEY
http://<IM_REST_API_HOST>/km/api/content?q=contentType.refKey eq 'AGILE_CHANNEL' and categories.refKey in ('WORLD')&mode=KEY
http://<IM_REST_API_HOST>/km/api/content?q=contentType.refKey eq 'AGILE_CHANNEL' and categories.refKey withNoChildren 'WORLD'&mode=KEY
http://<IM_REST_API_HOST>/km/api/content?q=contentType.refKey eq 'AGILE_CHANNEL' and categories.refKey inWithNoChildren ('WORLD')&mode=KEY
http://<IM_REST_API_HOST>/km/api/content?q=contentType.refKey in ('AGILE_CHANNEL', 'NEWS_CHANNEL') and categories.refKey inWithNoChildren ('USA', 'EUROPE')&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 ('USA', 'EUROPE') 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 ('USA', 'EUROPE') 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 ('WORLD', 'MOVIES')&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 ('WORLD', 'MOVIES')&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 ('WORLD', 'MOVIES')&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. -
checkedOut(optional):
boolean
The date when an author has checked out or locked the document for editing.
-
checkedOutBy(optional):
object UserKey
Title:
UserKey
-
contentType(optional):
object ContentTypeKey
Title:
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):
object UserKey
Title:
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.
-
dateModified(optional):
string(date-time)
The date when the content was last modified in 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.
-
documentId(optional):
string
The unique identifier of a document that indicates the content type in which the content is saved.
-
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.
-
isForEdit(optional):
boolean
The parameter to request editable content.
-
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):
object UserKey
Title:
UserKey
-
latestContent(optional):
object ContentKey
Title:
ContentKey
-
links(optional):
array links
-
locale(optional):
object LocaleKey
Title:
LocaleKey
-
metaDataResourcePath(optional):
string
MetaDataResourcePath of the Content object
-
metaDataXml(optional):
string
MetaDataXml of the Content object
-
owner(optional):
object UserKey
Title:
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.
-
publishedContent(optional):
object ContentKey
Title:
ContentKey
-
publishedVersion(optional):
string
Version of the Content object
-
rating(optional):
object DataForm
Title:
DataForm
-
ratingsAggregate(optional):
object AggregateFormResults
Title:
AggregateFormResults
-
reasonForEdit(optional):
string
Reasons for editing or creating a content. This will only be used when creating or updating the document.
-
recordId(optional):
string
The unique identifier of the document. This ID is same in all versions in all locales of the document.
-
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.
-
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.
-
schemaAttributes(optional):
array schemaAttributes
This field will return list of schema attributes associated with the content type of this content.
This field will only be populated if additionalFields query parameter is passed in with value schemaAttributes.
-
title(optional):
string
The tittle of the document.
-
userGroups(optional):
array userGroups
The user groups assigned to the content. Only the members of the assigned user group will have access to the content. Default value is Everyone.
-
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.
-
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.
-
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):
object WorkflowStepKey
Title:
WorkflowStepKey
-
xml(optional):
string
Xml of the Content object
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.
-
Array of:
object ContentKey
Title:
ContentKey
object
ArticleStatusKey
-
links(optional):
array links
-
name(optional):
string
The localized name of the ArticleStatus object. The name field can only be used for sorting.
-
recordId(optional):
string
The unique identifier of the ArticleStatus object.
-
referenceKey(optional):
string
The reference key for the ArticleStatus object.
ArticleStatus objects support multiple languages. This field can be used to identify the associated objects for all languages.
object
LocaleKey
-
links(optional):
array links
-
recordId(optional):
string
The unique identifier of the Locale object.
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 'WORLD'&mode=KEY
http://<IM_REST_API_HOST>/km/api/content?q=contentType.refKey eq 'AGILE_CHANNEL' and categories.refKey in ('WORLD')&mode=KEY
http://<IM_REST_API_HOST>/km/api/content?q=contentType.refKey eq 'AGILE_CHANNEL' and categories.refKey withNoChildren 'WORLD'&mode=KEY
http://<IM_REST_API_HOST>/km/api/content?q=contentType.refKey eq 'AGILE_CHANNEL' and categories.refKey inWithNoChildren ('WORLD')&mode=KEY
http://<IM_REST_API_HOST>/km/api/content?q=contentType.refKey in ('AGILE_CHANNEL', 'NEWS_CHANNEL') and categories.refKey inWithNoChildren ('USA', 'EUROPE')&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 ('USA', 'EUROPE') 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 ('USA', 'EUROPE') 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 ('WORLD', 'MOVIES')&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 ('WORLD', 'MOVIES')&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 ('WORLD', 'MOVIES')&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 of:
object CategoryKey
Title:
CategoryKey
object
UserKey
-
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.
-
links(optional):
array links
-
name(optional):
string
User's full name
-
recordId(optional):
string
The unique record ID of the User object.
object
ContentTypeKey
-
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.
-
links(optional):
array links
-
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.
-
stripeCd(optional):
string
Lookup code that indicates the stripe code.
object
ContentKey
-
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.
-
articleStatus(optional):
object ArticleStatusKey
Title:
ArticleStatusKey
-
dateModified(optional):
string(date-time)
The date when the content was last modified in the Oracle Knowledge Repository.
-
displayEndDate(optional):
string(date-time)
The date when the service stops the display of the document to the end users.
-
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.
-
documentId(optional):
string
The unique identifier of a document that indicates the content type in which the content is saved.
-
latestContent(optional):
object ContentKey
Title:
ContentKey
-
links(optional):
array links
-
locale(optional):
object LocaleKey
Title:
LocaleKey
-
publishedContent(optional):
object ContentKey
Title:
ContentKey
-
rating(optional):
object DataForm
Title:
DataForm
-
ratingsAggregate(optional):
object AggregateFormResults
Title:
AggregateFormResults
-
recordId(optional):
string
The unique identifier of the document. This ID is same in all versions in all locales of the document.
-
schemaAttributes(optional):
array schemaAttributes
This field will return list of schema attributes associated with the content type of this content.
This field will only be populated if additionalFields query parameter is passed in with value schemaAttributes.
-
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.
array
-
Array of:
object instanceLink
Metadata describing link description objects that MAY appear in the JSON instance representation.
object
DataForm
-
dateAdded(optional):
string(date-time)
The date when the DataForm object was created or added
-
dateModified(optional):
string(date-time)
The date when the DataForm object was last modified.
-
displayEndDate(optional):
string(date-time)
DisplayEndDate of the DataForm object
-
displayStartDate(optional):
string(date-time)
DisplayStartDate of the DataForm object
-
emailContent(optional):
boolean
EmailContent of the DataForm object
-
links(optional):
array links
-
name(optional):
string
The name of the data form. The name field can only be used for sorting.
-
questions(optional):
array questions
To Many Relationship to Question
-
ratingType(optional):
integer
Determined whether it is a 5 star or Y/N type of rating
- CUSTOM(0)
- YES(1)
- YES_NO(2)
- THREE_STARS(3)
- FIVE_STARS(4)
-
recordId(optional):
string
The unique record ID of the DataForm object.
-
referenceKey(optional):
string
The reference key for the DataForm object. DataForm objects support multiple languages. This field can be used to identify the associated objects for all languages.
-
user(optional):
object UserKey
Title:
UserKey
-
views(optional):
array views
To Many Relationship to View
object
AggregateFormResults
-
links(optional):
array links
-
questions(optional):
array questions
To Many Relationship to AggregateQuestionResult
-
recordId(optional):
string
The unique record ID of the AggregateFormResults object.
-
referenceKey(optional):
string
The reference key for the AggregateFormResults object. AggregateFormResults objects support multiple languages. This field can be used to identify the associated objects for all languages.
-
totalResponses(optional):
integer
TotalResponses of the AggregateFormResults object
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.
-
Array of:
object ReplacementToken
Title:
ReplacementToken
array
This field will return list of schema attributes associated with the content type of this content.
This field will only be populated if additionalFields query parameter is passed in with value schemaAttributes.
-
Array of:
object SchemaAttribute
Title:
SchemaAttribute
array
The user groups assigned to the content. Only the members of the assigned user group will have access to the content. Default value is Everyone.
-
Array of:
object UserGroupKey
Title:
UserGroupKey
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.
-
Array of:
object ViewKey
Title:
ViewKey
object
WorkflowStepKey
-
links(optional):
array links
-
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
-
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
-
Array of:
object instanceLink
Metadata describing link description objects that MAY appear in the JSON instance representation.
object
CategoryKey
-
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.
-
inventoryOrgId(optional):
integer
The inventory organization id of the specific product.
-
links(optional):
array links
-
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
-
Array of:
object instanceLink
Metadata describing link description objects that MAY appear in the JSON instance representation.
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
-
Array of:
object CategoryKey
Title:
CategoryKey
array
-
Array of:
object instanceLink
Metadata describing link description objects that MAY appear in the JSON instance representation.
array
-
Array of:
object instanceLink
Metadata describing link description objects that MAY appear in the JSON instance representation.
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.
-
Array of:
object ContentKey
Title:
ContentKey
array
-
Array of:
object instanceLink
Metadata describing link description objects that MAY appear in the JSON instance representation.
array
This field will return list of schema attributes associated with the content type of this content.
This field will only be populated if additionalFields query parameter is passed in with value schemaAttributes.
-
Array of:
object SchemaAttribute
Title:
SchemaAttribute
object
SchemaAttribute
-
allowMultipleNodes(optional):
boolean
Flag indicating if multiple nodes are allowed of this type @since 8.3
-
allowPreselectedUserGroupChange(optional):
boolean
Enable editors to modify preselected user group restrictions @since 8.3
-
children(optional):
array children
List of child nodes of the current element
-
counter(optional):
integer
This attribute contains the current value of the ContentType DOC ID counter. This value should not be changed after content is added to the ContentType
-
counterPrefix(optional):
string
This attribute contains the prefix that is appended to the front of the DOC ID counter
-
dateAdded(optional):
string(date-time)
This attribute represents the timestamp when the SchemaAttribute definition was first created
-
dateModified(optional):
string(date-time)
This attribute represents the timestamp when the SchemaAttribute definition was last modified
-
description(optional):
string
Localized help text for the attribute. This text is displayed in the authoring view
-
enableAttributeLevelSearch(optional):
boolean
Flag indicating whether this field should be configured for attribute level searching - i.e. where TITLE='xyz'. This field was previously called searchable @since 8.3
-
enableFullTextSearch(optional):
boolean
Flag indicating whether this field should be included in the full text index. This field was previously called indexable @since 8.3
-
includeInMasterIdentifier(optional):
boolean
Flag indicating whether this field should be appended to the master identifier of the document
-
isNode(optional):
boolean
Flag indicating if this element is a node @since 8.3
-
isRequired(optional):
boolean
Make attribute a required field @since 8.3
-
links(optional):
array links
-
localizedAttributes(optional):
array localizedAttributes
List of LocalizedAttributes of this SchemaAttribute name and description in various Locales
-
name(optional):
string
Localized name of the attribute. This need NOT be unique within the Schema.
-
readOnly(optional):
boolean
Flag indicating whether this field is editable
-
recordId(optional):
string
Unique identifier for the SchemaAttribute object
-
referenceKey(optional):
string
Non localized name of the attribute. SchemaAttribute's referenceKey need NOT be unique within its Schema. But its xpath will be unique within its Schema.
-
requireWorkflowApproval(optional):
boolean
Attribute requires workflow approval if workflow is enabled
-
schemaAttributeUserGroupList(optional):
array schemaAttributeUserGroupList
List of user groups that can be used to secure this attribute. This should be a subset of the list of user groups assigned to the ContentType
-
schemaAttrType(optional):
Allowed Values:
[ "TEXT_AREA", "WYSIWYG_EDIT", "TEXT_FIELD", "FILE", "BOOLEAN", "LIST", "COUNTER", "DATE", "DATETIME", "TIME", "INTEGER", "FLOAT" ]
Enumerated type representing the type of attribute - i.e. text field, rich text area -
securedFileResource(optional):
boolean
Flag indicating if this attribute (file types only) should be marked as secure - i.e. stored in the ~secure folder near the content XML file
-
secureWithUserGroups(optional):
boolean
Restrict attribute to selected user groups
-
securityRegex(optional):
string
The regular expression used to validate the field against security attacks.
-
sortOrder(optional):
integer
Display order of the schema attributes within the edit form
-
textHeight(optional):
string
Specifies the text height for text areas and rich text fields
-
textWidth(optional):
string
Specifies the max length for text fields
-
userGroupSelectionRequired(optional):
boolean
User groups are required for attribute
-
wysiwygType(optional):
Allowed Values:
[ "BASIC", "MEDIUM", "FULL" ]
Type of WYSIWYG rich text field - i.e. FULL, BASIC, MEDIUM @since 8.3 -
xpath(optional):
string
The XPATH of this attribute within the schema. This is unique within the Schema.
array
-
Array of:
object SchemaAttribute
Title:
SchemaAttribute
array
-
Array of:
object instanceLink
Metadata describing link description objects that MAY appear in the JSON instance representation.
array
-
Array of:
object LocalizedAttributes
Title:
LocalizedAttributes
array
-
Array of:
object SchemaAttributeUserGroup
Title:
SchemaAttributeUserGroup
object
LocalizedAttributes
-
description(optional):
string
Localized description in the above Locale
-
localeId(optional):
string
RecordId of the Locale - generally this is the localeCode (like en_US) and NOT a real GUID.
-
name(optional):
string
Localized Name in the above Locale
object
SchemaAttributeUserGroup
-
defaultValue(optional):
boolean
Flag indiacting whether the user group should be selected by default
-
recordId(optional):
string
GUID from the XMLSCHEMAATTRIBUTEUSERGROUP table
-
userGroup(optional):
object UserGroupKey
Title:
UserGroupKey
object
UserGroupKey
-
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.
-
links(optional):
array links
-
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
-
stripeCD(optional):
string
Stripe for UserGroup
array
-
Array of:
object instanceLink
Metadata describing link description objects that MAY appear in the JSON instance representation.
array
-
Array of:
object instanceLink
Metadata describing link description objects that MAY appear in the JSON instance representation.
array
-
Array of:
object DataFormQuestion
Title:
DataFormQuestion
array
-
Array of:
object ViewKey
Title:
ViewKey
object
DataFormQuestion
-
answers(optional):
array answers
To Many Relationship to Answer
-
dataForm(optional):
object DataFormKey
Title:
DataFormKey
-
dateAdded(optional):
string(date-time)
The date when the DataFormQuestion object was created or added
-
dateModified(optional):
string(date-time)
The date when the DataFormQuestion object was last modified.
-
isMasterIdentifier(optional):
boolean
IsMasterIdentifier of the DataFormQuestion object
-
links(optional):
array links
-
name(optional):
string
Name of the DataFormQuestion object
-
recordId(optional):
string
The unique record ID of the DataFormQuestion object.
-
referenceKey(optional):
string
The reference key for the DataFormQuestion object. DataFormQuestion objects support multiple languages. This field can be used to identify the associated objects for all languages.
-
required(optional):
boolean
Required of the DataFormQuestion object
-
sortOrder(optional):
integer
SortOrder of the DataFormQuestion object
-
specialTypeIndicator(optional):
integer
SpecialTypeIndicator of the DataFormQuestion object
array
-
Array of:
object DataFormAnswer
Title:
DataFormAnswer
object
DataFormKey
-
links(optional):
array links
-
recordId(optional):
string
The unique record ID of the DataForm object.
-
referenceKey(optional):
string
The reference key for the DataForm object. DataForm objects support multiple languages. This field can be used to identify the associated objects for all languages.
array
-
Array of:
object instanceLink
Metadata describing link description objects that MAY appear in the JSON instance representation.
object
DataFormAnswer
-
dataFormQuestion(optional):
object DataFormQuestionKey
Title:
DataFormQuestionKey
-
dateAdded(optional):
string(date-time)
The date when the DataFormAnswer object was created or added
-
dateModified(optional):
string(date-time)
The date when the DataFormAnswer object was last modified.
-
defaultAnswer(optional):
boolean
DefaultAnswer of the DataFormAnswer object
-
links(optional):
array links
-
name(optional):
string
Name of the DataFormAnswer object
-
numberValue(optional):
integer
NumberValue of the DataFormAnswer object
-
recordId(optional):
string
The unique record ID of the DataFormAnswer object.
-
referenceKey(optional):
string
The reference key for the DataFormAnswer object. DataFormAnswer objects support multiple languages. This field can be used to identify the associated objects for all languages.
-
sortOrder(optional):
integer
SortOrder of the DataFormAnswer object
object
DataFormQuestionKey
-
links(optional):
array links
-
recordId(optional):
string
The unique record ID of the DataFormQuestion object.
-
referenceKey(optional):
string
The reference key for the DataFormQuestion object. DataFormQuestion objects support multiple languages. This field can be used to identify the associated objects for all languages.
array
-
Array of:
object instanceLink
Metadata describing link description objects that MAY appear in the JSON instance representation.
array
-
Array of:
object instanceLink
Metadata describing link description objects that MAY appear in the JSON instance representation.
array
-
Array of:
object instanceLink
Metadata describing link description objects that MAY appear in the JSON instance representation.
object
ViewKey
-
links(optional):
array links
-
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
-
stripeCD(optional):
string
Stripe of a view
array
-
Array of:
object instanceLink
Metadata describing link description objects that MAY appear in the JSON instance representation.
array
-
Array of:
object instanceLink
Metadata describing link description objects that MAY appear in the JSON instance representation.
array
-
Array of:
object AggregateQuestionResult
Title:
AggregateQuestionResult
object
AggregateQuestionResult
-
answers(optional):
array answers
To Many Relationship to AggregateAnswerResult
-
averageResponse(optional):
number
AverageResponse of the AggregateQuestionResult object
-
name(optional):
string
Localized display name for the Question
-
recordId(optional):
string
The unique record ID of the AggregateQuestionResult object.
-
referenceKey(optional):
string
The reference key for the AggregateQuestionResult object. AggregateQuestionResult objects support multiple languages. This field can be used to identify the associated objects for all languages.
-
totalResponses(optional):
integer
TotalResponses of the AggregateQuestionResult object
array
-
Array of:
object AggregateAnswerResult
Title:
AggregateAnswerResult
object
AggregateAnswerResult
-
name(optional):
string
Localized display name for the Answer
-
recordId(optional):
string
The unique record ID of the AggregateAnswerResult object.
-
referenceKey(optional):
string
The reference key for the AggregateAnswerResult object. AggregateAnswerResult objects support multiple languages. This field can be used to identify the associated objects for all languages.
-
totalResponses(optional):
integer
TotalResponses of the AggregateAnswerResult object
object
ReplacementToken
-
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.
-
links(optional):
array links
-
recordId(optional):
string
The replacement token's record Id.
-
replacementText(optional):
string
The HTML formatted replacement text.
-
replacementTextNonFormatted(optional):
string
The non-HTML formatted replacement text.
-
tokenName(optional):
string
The replacement token's name.
-
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').
array
-
Array of:
object instanceLink
Metadata describing link description objects that MAY appear in the JSON instance representation.
array
-
Array of:
object instanceLink
Metadata describing link description objects that MAY appear in the JSON instance representation.
Examples
The following example shows how to find a document that has the specified version ID.
curl -X GET "https://<IM_REST_API_HOST>/km/api/latest/content/versions/{versionId}" -u "<username:password>" -H "Accept: application/json" -H "Content-Type: application/json"
Example of Response Body
The following example shows the contents of the response body in JSON format, including <additoinal information>:
{ "isForEdit": false, "categories": [], "userGroups": [], "views": [ { "recordId": "51FADC735E2344B1B183D965060B248C", "referenceKey": "TENANT", "name": "NAME_VALUE", "links": [ { "rel": "canonical", "href": "https://IM_REST_API_HOST/km/api/latest/views/51FADC735E2344B1B183D965060B248C", "mediaType": "application/json, application/xml", "method": "GET" } ] } ], "recordId": "04008709a06d9d015aaa70657e007fd7", "versionId": "04008709a06d9d015aaa70657e007fd6", "documentId": "FAQ216", "title": "3D touch not working", "version": "1.0", "answerId": 1000336, "locale": { "recordId": "en_US", "links": [ { "rel": "canonical", "href": "https://IM_REST_API_HOST/km/api/latest/locales/en_US", "mediaType": "application/json, application/xml", "method": "GET" } ] }, "dateModified": "2017-03-09T02:40:46-0700", "links": [ { "rel": "canonical", "href": "https://IM_REST_API_HOST/km/api/latest/content/04008709a06d9d015aaa70657e007fd7", "mediaType": "application/json, application/xml", "method": "GET" }, { "rel": "collection", "href": "https://IM_REST_API_HOST/km/api/latest/content", "mediaType": "application/json, application/xml", "method": "GET", "profile": "https://IM_REST_API_HOST/km/api/latest/metadata-catalog/content" } ], "contentType": { "recordId": "33B9C302D8264371B6A12EDAF3FD974B", "referenceKey": "FAQ", "name": "FAQ", "links": [ { "rel": "canonical", "href": "https://IM_REST_API_HOST/km/api/latest/contentTypes/33B9C302D8264371B6A12EDAF3FD974B", "mediaType": "application/json, application/xml", "method": "GET" } ] }, "priority": "PRIORITY_0", "createDate": "2017-03-08T03:03:18-0700", "dateAdded": "2017-03-08T03:03:18-0700", "displayStartDate": "2017-03-08T03:02:37-0700", "displayEndDate": "9999-12-31T00:00:00-0700", "owner": { "recordId": "0400864aa0bf1015796a9cbbf007fea", "name": "autocsoadm1 svc", "externalType": "ACCOUNT", "links": [ { "rel": "canonical", "href": "https://IM_REST_API_HOST/km/api/latest/users/0400864aa0bf1015796a9cbbf007fea", "mediaType": "application/json, application/xml", "method": "GET" } ] }, "lastModifier": { "recordId": "0400864aa0bf1015796a9cbbf007fea", "name": "autocsoadm1 svc", "externalType": "ACCOUNT", "links": [ { "rel": "canonical", "href": "https://IM_REST_API_HOST/km/api/latest/users/0400864aa0bf1015796a9cbbf007fea", "mediaType": "application/json, application/xml", "method": "GET" } ] }, "creator": { "recordId": "0400864aa0bf1015796a9cbbf007fea", "name": "autocsoadm1 svc", "externalType": "ACCOUNT", "links": [ { "rel": "canonical", "href": "https://IM_REST_API_HOST/km/api/latest/users/0400864aa0bf1015796a9cbbf007fea", "mediaType": "application/json, application/xml", "method": "GET" } ] }, "published": false, "checkedOut": false, "xml": "XML_VALUE", "resourcePath": "http://IM_REST_API_HOST/content/draft/04008709a06d9d015aaa70657e007fd7/04008709a06d9d015aaa70657e007fd6/" }