Create content from import

post

/km/api/v1/content/import

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

This method imports a Content Business Object which is a part of the given Composite Content Business Object.

A POST must be requested and a Composite Content Business Object must be provided to perform the link request.

A new Content's data should be provided as Content Business Object. All the rules are applicable for create Content method except the following:
To import an updated version of existing document, use the corresponding PUT method on import. For detailed field-level validation rules, see the Update content from import section.

Response Errors

The possible error responses for this method are as follows:

  • OKDOM-CONT0110

    The error occurs when you specify an invalid UserGroup object in the conditional section. You can access the content only if the UserGroup object of the conditional section is mapped to you.

  • OK-FMS0005

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




Create content with file attachments from import

Supported Media Types: 'multipart/form-data'



Imports a Content Business Object which is part of a given Composite Content Business Object along with file attachments

A POST must be requested, a Composite Content Business Object and file attachments must be provided to perform the link request.

A new Content's data should be provided as Content Business Object. All the rules applicable for createContentFromImport method except the following:
To import an updated version of existing document, use the corresponding PUT method on import.

For detailed field level validation rules, see Update content from import section.

To create a new content record with one or more file attachments, you have to specify file information in a file node of the attached file in the content XML payload and file as part of FILEPART in request.

If there are more than one file attachment in content then above file node needs to be repeated for each file.

Below are the details of the file node:

NodeRequiredDescription
KM_ATTACHMENTS_ATTRYESRoot node in for each file attachment.
FILEYESParent node for file details of attachment.
IDNOThis is a unique identifier for the file. After content is created this field will be populated with file reference.
  • File which will be used as an attachment needs to be passed in FILEPART.
FILENAMEYESName of the attachment file. This name must match with the name of the file uploaded in FILEPART.
TITLENOTitle for the attachment file, if not passed it will be defaulted to file name.
DESCRIPTIONYESDescription of file attachment.
Below is minimal payload example(using two file attachments).

XML Example:
 
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<CompositeContent>
   <content>
      <locale>
         <recordId>LOCALE_CODE</recordId>
      </locale>
      <contentType>
         <recordId>CONTENT_TYPE_RECORD_ID</recordId>
         <referenceKey>CONTENT_TYPE_REF_KEY</referenceKey>
         <name>CONTENT_TYPE_NAME</name>
      </contentType>
      <xml>
         <CONTENT_TYPE_REF_KEY>
            <KM_ATTACHMENTS_ATTR>
               <FILE>
                  <FILENAME>
                     <![CDATA[FILE_NAME]]>
                  </FILENAME>
                  <TITLE>
                     <![CDATA[OPTIONAL_FILE_TITLE]]>
                  </TITLE>
                  <DESCRIPTION>
                     <![CDATA[FILE_DESCRIPTION]]>
                  </DESCRIPTION>
               </FILE>
            </KM_ATTACHMENTS_ATTR>
            <KM_ATTACHMENTS_ATTR>
               <FILE>
                  <FILENAME>
                     <![CDATA[FILE_NAME_2]]>
                  </FILENAME>
                  <TITLE>
                     <![CDATA[OPTIONAL_FILE_TITLE_2]]>
                  </TITLE>
                  <DESCRIPTION>
                     <![CDATA[FILE_DESCRIPTION_2]]>
                  </DESCRIPTION>
               </FILE>
            </KM_ATTACHMENTS_ATTR>
         </CONTENT_TYPE_REF_KEY>
      </xml>
      <isForEdit>true</isForEdit>
      <categories/>
      <userGroups/>
      <views>
         <ViewKey>
            <recordId>VIEW_RECORD_ID</recordId>
            <referenceKey>VIEW_REF_KEY</referenceKey>
            <name>VIEW_NAME</name>
         </ViewKey>
      </views>
   </content>
   <contentModificationQualifier>
      <ipAddress>NONE</ipAddress>
      <publish>true</publish>
      <bypassWorkflowAndPublish>true</bypassWorkflowAndPublish>
   </contentModificationQualifier>
</CompositeContent>


JSON Example:
{
   'content': {
      'locale': {
         'recordId': 'LOCALE_CODE'
      },
      'contentType': {
         'recordId': 'CONTENT_TYPE_RECORD_ID',
         'referenceKey': 'CONTENT_TYPE_REF_KEY',
         'name': 'CONTENT_TYPE_NAME'
      },
      'xml': '<CONTENT_TYPE_REF_KEY><KM_ATTACHMENTS_ATTR><FILE>
<FILENAME><![CDATA[FILE_NAME]]></FILENAME><TITLE><![CDATA[OPTIONAL_FILE_TITLE]]></TITLE><DESCRIPTION>
<![CDATA[FILE_DESCRIPTION]]></DESCRIPTION></FILE></KM_ATTACHMENTS_ATTR><KM_ATTACHMENTS_ATTR><FILE>
<FILENAME><![CDATA[FILE_NAME_2]]></FILENAME><TITLE><![CDATA[OPTIONAL_FILE_TITLE_2]]></TITLE><DESCRIPTION>
<![CDATA[FILE_DESCRIPTION_2]]></DESCRIPTION></FILE></KM_ATTACHMENTS_ATTR></CONTENT_TYPE_REF_KEY>',
      'isForEdit': 'true',
      'views': [{
         'recordId': 'VIEW_RECORD_ID',
         'referenceKey': 'VIEW_REF_KEY',
         'name': 'VIEW_NAME'
      }]
   },
   'contentModificationQualifier': {
      'ipAddress': 'NONE',
      'publish': 'true',
      'bypassWorkflowAndPublish': 'true'
   }
}

Response Errors

Following are the possible error responses for this method:

  • OKDOM-CONT0110

    The error occurs when you specify an invalid UserGroup object in the conditional section. You can access the content only if the UserGroup object of the conditional section is mapped to you.

  • OK-FMS0005

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

Request

Supported Media Types
Body ()
The Composite of ContentBO to be created and the ModificationQualifierBO.
Root Schema : CompositeContent
Type: object
Title: CompositeContent
Show Source
Nested Schema : Content
Type: object
Title: Content
Show Source
  • 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.

  • The unique identifier that enables mapping between an answer and the content.

  • ArticleStatusKey
    Title: ArticleStatusKey
  • LocaleKey
    Title: LocaleKey
  • Version of the Content object
  • categories

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

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

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

      Match Any

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

      Example URIs for the category parameter are as follows:

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

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

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

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

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

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

    • http://<IM_REST_API_HOST>/km/api/content?q=contentType.refKey in ('AGILE_CHANNEL', 'NEWS_CHANNEL') and categories.refKey inWithNoChildren ('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.

      Match ALL

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

    • http://<IM_REST_API_HOST>/km/api/content?q=contentState eq 'LATEST' and contentType.refKey eq 'AGILE_CHANNEL' and categories.refKey matchAll ('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 date when an author has checked out or locked the document for editing.

  • UserKey
    Title: UserKey
  • ContentTypeKey
    Title: ContentTypeKey
  • The date when the content was created. For legacy systems, the create date is the date when the document was created in those systems.

  • UserKey
    Title: UserKey
  • 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.

  • The date when the content was last modified in the Oracle Knowledge Repository.

  • The date when the service stops the display of the document to the end users.

  • Allowed Values: [ "FIXED_AT_TOP", "PLACE_AT_TOP", "HISTORICAL_USEFULNESS" ]
    LookUp code that can be Fixed@Top, Place@Top , Historical Usefulness
  • The date when the document requires a review by an author capable of performing the review.

  • The date when the document will be available to display to end-users.

  • The unique identifier of a document that indicates the content type in which the content is saved.

  • The date when the document's event ends.

  • The date when the document's event begins.

  • The parameter to request editable content.

  • 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.

  • UserKey
    Title: UserKey
  • ContentKey
    Title: ContentKey
  • links
  • LocaleKey
    Title: LocaleKey
  • MetaDataResourcePath of the Content object
  • MetaDataXml of the Content object
  • UserKey
    Title: UserKey
  • The flag that indicates whether the document is pending for publication.

  • 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.

  • The date when the document was first displayed to end users.

  • The flag that indicates whether the document is published.

  • ContentKey
    Title: ContentKey
  • Version of the Content object
  • DataForm
    Title: DataForm
  • AggregateFormResults
    Title: AggregateFormResults
  • Reasons for editing or creating a content. This will only be used when creating or updating the document.
  • The unique identifier of the document. This ID is same in all versions in all locales of the document.

  • 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.

  • 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

    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.

  • The tittle of the document.

  • 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 of the Content object
  • 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

    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.

  • 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.

  • WorkflowStepKey
    Title: WorkflowStepKey
  • Xml of the Content object
Nested Schema : ContentModificationQualifier
Type: object
Title: ContentModificationQualifier
Show Source
Nested Schema : allTranslations
Type: array

This field will return list of all translated content that the user can view

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

Show Source
Nested Schema : ArticleStatusKey
Type: object
Title: ArticleStatusKey
Show Source
Nested Schema : LocaleKey
Type: object
Title: LocaleKey
Show Source
Nested Schema : categories
Type: array

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

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

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

    Match Any

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

    Example URIs for the category parameter are as follows:

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

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

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

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

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

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

  • http://<IM_REST_API_HOST>/km/api/content?q=contentType.refKey in ('AGILE_CHANNEL', 'NEWS_CHANNEL') and categories.refKey inWithNoChildren ('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.

    Match ALL

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

  • http://<IM_REST_API_HOST>/km/api/content?q=contentState eq 'LATEST' and contentType.refKey eq 'AGILE_CHANNEL' and categories.refKey matchAll ('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.

Show Source
Nested Schema : UserKey
Type: object
Title: UserKey
Show Source
Nested Schema : ContentTypeKey
Type: object
Title: ContentTypeKey
Show Source
Nested Schema : ContentKey
Type: object
Title: ContentKey
Show Source
Nested Schema : DataForm
Type: object
Title: DataForm
Show Source
Nested Schema : AggregateFormResults
Type: object
Title: AggregateFormResults
Show Source
Nested Schema : replacementTokens
Type: array

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

Show Source
Nested Schema : schemaAttributes
Type: 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.

Show Source
Nested Schema : userGroups
Type: 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.

Show Source
Nested Schema : views
Type: array

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

Show Source
Nested Schema : WorkflowStepKey
Type: object
Title: WorkflowStepKey
Show Source
Nested Schema : CategoryKey
Type: object
Title: CategoryKey
Show Source
  • This field will return number of immediate children a category has.

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

    Example URIs for the this parameter are as follows:

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

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

  • The inventory organization id of the specific product.

  • links
  • The name of the category.

  • The hierarchichal position of the category
  • parents

    This field will return all parents of category.

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

    Example URIs for the this parameter are as follows:

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

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

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

Nested Schema : parents
Type: array

This field will return all parents of category.

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

Example URIs for the this parameter are as follows:

  • http://<IM_REST_API_HOST>/km/api/categories/{id}?withParents=true&mode=KEY
  • http://<IM_REST_API_HOST>/km/api/categories?withParents=true&mode=KEY
  • http://<IM_REST_API_HOST>/km/api/categories?q=contentTypeRefKey eq 'FAQ'&withParents=true&mode=KEY
  • http://<IM_REST_API_HOST>/km/api/categories/{id}?childrenCount=true&withParents=true&mode=KEY
Show Source
Nested Schema : allTranslations
Type: array

This field will return list of all translated content that the user can view

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

Show Source
Nested Schema : schemaAttributes
Type: 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.

Show Source
Nested Schema : SchemaAttribute
Type: object
Title: SchemaAttribute
Show Source
Nested Schema : children
Type: array
List of child nodes of the current element
Show Source
Nested Schema : localizedAttributes
Type: array
List of LocalizedAttributes of this SchemaAttribute name and description in various Locales
Show Source
Nested Schema : schemaAttributeUserGroupList
Type: array
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
Show Source
Nested Schema : LocalizedAttributes
Type: object
Title: LocalizedAttributes
Show Source
Nested Schema : SchemaAttributeUserGroup
Type: object
Title: SchemaAttributeUserGroup
Show Source
Nested Schema : UserGroupKey
Type: object
Title: UserGroupKey
Show Source
Nested Schema : questions
Type: array
To Many Relationship to Question
Show Source
Nested Schema : views
Type: array
To Many Relationship to View
Show Source
Nested Schema : DataFormQuestion
Type: object
Title: DataFormQuestion
Show Source
Nested Schema : answers
Type: array
To Many Relationship to Answer
Show Source
Nested Schema : DataFormKey
Type: object
Title: DataFormKey
Show Source
Nested Schema : DataFormAnswer
Type: object
Title: DataFormAnswer
Show Source
Nested Schema : DataFormQuestionKey
Type: object
Title: DataFormQuestionKey
Show Source
Nested Schema : ViewKey
Type: object
Title: ViewKey
Show Source
Nested Schema : questions
Type: array
To Many Relationship to AggregateQuestionResult
Show Source
Nested Schema : AggregateQuestionResult
Type: object
Title: AggregateQuestionResult
Show Source
Nested Schema : answers
Type: array
To Many Relationship to AggregateAnswerResult
Show Source
Nested Schema : AggregateAnswerResult
Type: object
Title: AggregateAnswerResult
Show Source
Nested Schema : ReplacementToken
Type: object
Title: ReplacementToken
Show Source
Back to Top

Response

Supported Media Types

201 Response

Created.
Body ()
Root Schema : Content
Type: object
Title: Content
Show Source
  • 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.

  • The unique identifier that enables mapping between an answer and the content.

  • ArticleStatusKey
    Title: ArticleStatusKey
  • LocaleKey
    Title: LocaleKey
  • Version of the Content object
  • categories

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

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

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

      Match Any

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

      Example URIs for the category parameter are as follows:

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

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

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

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

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

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

    • http://<IM_REST_API_HOST>/km/api/content?q=contentType.refKey in ('AGILE_CHANNEL', 'NEWS_CHANNEL') and categories.refKey inWithNoChildren ('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.

      Match ALL

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

    • http://<IM_REST_API_HOST>/km/api/content?q=contentState eq 'LATEST' and contentType.refKey eq 'AGILE_CHANNEL' and categories.refKey matchAll ('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 date when an author has checked out or locked the document for editing.

  • UserKey
    Title: UserKey
  • ContentTypeKey
    Title: ContentTypeKey
  • The date when the content was created. For legacy systems, the create date is the date when the document was created in those systems.

  • UserKey
    Title: UserKey
  • 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.

  • The date when the content was last modified in the Oracle Knowledge Repository.

  • The date when the service stops the display of the document to the end users.

  • Allowed Values: [ "FIXED_AT_TOP", "PLACE_AT_TOP", "HISTORICAL_USEFULNESS" ]
    LookUp code that can be Fixed@Top, Place@Top , Historical Usefulness
  • The date when the document requires a review by an author capable of performing the review.

  • The date when the document will be available to display to end-users.

  • The unique identifier of a document that indicates the content type in which the content is saved.

  • The date when the document's event ends.

  • The date when the document's event begins.

  • The parameter to request editable content.

  • 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.

  • UserKey
    Title: UserKey
  • ContentKey
    Title: ContentKey
  • links
  • LocaleKey
    Title: LocaleKey
  • MetaDataResourcePath of the Content object
  • MetaDataXml of the Content object
  • UserKey
    Title: UserKey
  • The flag that indicates whether the document is pending for publication.

  • 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.

  • The date when the document was first displayed to end users.

  • The flag that indicates whether the document is published.

  • ContentKey
    Title: ContentKey
  • Version of the Content object
  • DataForm
    Title: DataForm
  • AggregateFormResults
    Title: AggregateFormResults
  • Reasons for editing or creating a content. This will only be used when creating or updating the document.
  • The unique identifier of the document. This ID is same in all versions in all locales of the document.

  • 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.

  • 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

    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.

  • The tittle of the document.

  • 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 of the Content object
  • 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

    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.

  • 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.

  • WorkflowStepKey
    Title: WorkflowStepKey
  • Xml of the Content object
Nested Schema : allTranslations
Type: array

This field will return list of all translated content that the user can view

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

Show Source
Nested Schema : ArticleStatusKey
Type: object
Title: ArticleStatusKey
Show Source
Nested Schema : LocaleKey
Type: object
Title: LocaleKey
Show Source
Nested Schema : categories
Type: array

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

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

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

    Match Any

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

    Example URIs for the category parameter are as follows:

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

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

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

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

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

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

  • http://<IM_REST_API_HOST>/km/api/content?q=contentType.refKey in ('AGILE_CHANNEL', 'NEWS_CHANNEL') and categories.refKey inWithNoChildren ('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.

    Match ALL

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

  • http://<IM_REST_API_HOST>/km/api/content?q=contentState eq 'LATEST' and contentType.refKey eq 'AGILE_CHANNEL' and categories.refKey matchAll ('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.

Show Source
Nested Schema : UserKey
Type: object
Title: UserKey
Show Source
Nested Schema : ContentTypeKey
Type: object
Title: ContentTypeKey
Show Source
Nested Schema : ContentKey
Type: object
Title: ContentKey
Show Source
Nested Schema : DataForm
Type: object
Title: DataForm
Show Source
Nested Schema : AggregateFormResults
Type: object
Title: AggregateFormResults
Show Source
Nested Schema : replacementTokens
Type: array

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

Show Source
Nested Schema : schemaAttributes
Type: 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.

Show Source
Nested Schema : userGroups
Type: 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.

Show Source
Nested Schema : views
Type: array

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

Show Source
Nested Schema : WorkflowStepKey
Type: object
Title: WorkflowStepKey
Show Source
Nested Schema : CategoryKey
Type: object
Title: CategoryKey
Show Source
  • This field will return number of immediate children a category has.

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

    Example URIs for the this parameter are as follows:

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

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

  • The inventory organization id of the specific product.

  • links
  • The name of the category.

  • The hierarchichal position of the category
  • parents

    This field will return all parents of category.

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

    Example URIs for the this parameter are as follows:

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

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

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

Nested Schema : parents
Type: array

This field will return all parents of category.

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

Example URIs for the this parameter are as follows:

  • http://<IM_REST_API_HOST>/km/api/categories/{id}?withParents=true&mode=KEY
  • http://<IM_REST_API_HOST>/km/api/categories?withParents=true&mode=KEY
  • http://<IM_REST_API_HOST>/km/api/categories?q=contentTypeRefKey eq 'FAQ'&withParents=true&mode=KEY
  • http://<IM_REST_API_HOST>/km/api/categories/{id}?childrenCount=true&withParents=true&mode=KEY
Show Source
Nested Schema : allTranslations
Type: array

This field will return list of all translated content that the user can view

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

Show Source
Nested Schema : schemaAttributes
Type: 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.

Show Source
Nested Schema : SchemaAttribute
Type: object
Title: SchemaAttribute
Show Source
Nested Schema : children
Type: array
List of child nodes of the current element
Show Source
Nested Schema : localizedAttributes
Type: array
List of LocalizedAttributes of this SchemaAttribute name and description in various Locales
Show Source
Nested Schema : schemaAttributeUserGroupList
Type: array
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
Show Source
Nested Schema : LocalizedAttributes
Type: object
Title: LocalizedAttributes
Show Source
Nested Schema : SchemaAttributeUserGroup
Type: object
Title: SchemaAttributeUserGroup
Show Source
Nested Schema : UserGroupKey
Type: object
Title: UserGroupKey
Show Source
Nested Schema : questions
Type: array
To Many Relationship to Question
Show Source
Nested Schema : views
Type: array
To Many Relationship to View
Show Source
Nested Schema : DataFormQuestion
Type: object
Title: DataFormQuestion
Show Source
Nested Schema : answers
Type: array
To Many Relationship to Answer
Show Source
Nested Schema : DataFormKey
Type: object
Title: DataFormKey
Show Source
Nested Schema : DataFormAnswer
Type: object
Title: DataFormAnswer
Show Source
Nested Schema : DataFormQuestionKey
Type: object
Title: DataFormQuestionKey
Show Source
Nested Schema : ViewKey
Type: object
Title: ViewKey
Show Source
Nested Schema : questions
Type: array
To Many Relationship to AggregateQuestionResult
Show Source
Nested Schema : AggregateQuestionResult
Type: object
Title: AggregateQuestionResult
Show Source
Nested Schema : answers
Type: array
To Many Relationship to AggregateAnswerResult
Show Source
Nested Schema : AggregateAnswerResult
Type: object
Title: AggregateAnswerResult
Show Source
Nested Schema : ReplacementToken
Type: object
Title: ReplacementToken
Show Source
Back to Top

Examples

The following example shows how to create content from import:

curl -X POST "https://<IM_REST_API_HOST>/km/api/latest/content/import" -u "<username:password>" -H "Accept: application/json" -H "Content-Type: application/json" -d "@<FilePath/RequestBody.json>"

Example of Request Body

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

{
"content" :{
  "isForEdit": true,
  "views": [
    {
      "recordId": "BBA181DFB52148779A416184A191B2AF",
      "referenceKey": "SERVICE",
      "name": "Service"
    }
  ],
  "locale": {
    "recordId": "en_US"
  },
  "contentType": {
    "recordId": "98055D055BA8467B8097FB0B52923FD2",
    "referenceKey": "FAQ",
    "name": "FAQ"
  },

  "published": false,
  "xml":"<FAQ><QUESTION><![CDATA[Questions ...]]></QUESTION><ANSWER><![CDATA[Answers ... ]]></ANSWER><SUMMARY><![CDATA[Summary]]></SUMMARY></FAQ>"
 },
  "contentModificationQualifier" : {
    "publish" : false,
    "bypassWorkflowAndPublish" : false
  }
}

Example of Response Body

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

{
  "isForEdit": true,
  "categories": [],
  "userGroups": [],
  "views": [
    {
      "recordId": "BBA181DFB52148779A416184A191B2AF",
      "referenceKey": "SERVICE",
      "name": "Service",
      "links": [
        {
          "rel": "canonical",
          "href": "https://<IM_REST_API_HOST>/km/api/latest/views/BBA181DFB52148779A416184A191B2AF",
          "mediaType": "application/json, application/xml",
          "method": "GET"
        }
      ]
    }
  ],
  "recordId": "1BAB4586507D49A28B243284998BD680",
  "versionId": "218AC5C16E164FC9A0B901BA277E4BCC",
  "documentId": "FAQ11",
  "title": "Summary",
  "version": "1.0",
  "answerId": 1001001,
  "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": "2018-11-20T13:54:59+0530",
  "links": [
    {
      "rel": "canonical",
      "href": "https://<IM_REST_API_HOST>/km/api/latest/content/1BAB4586507D49A28B243284998BD680",
      "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": "98055D055BA8467B8097FB0B52923FD2",
    "referenceKey": "FAQ",
    "name": "FAQ",
    "description": "A simple template containing a common question and answer on a specific topic",
    "links": [
      {
        "rel": "canonical",
        "href": "https://<IM_REST_API_HOST>/km/api/latest/contentTypes/98055D055BA8467B8097FB0B52923FD2",
        "mediaType": "application/json, application/xml",
        "method": "GET"
      }
    ]
  },
  "priority": "PRIORITY_0",
  "createDate": "2018-11-20T13:54:59+0530",
  "lastModifiedDate": "2018-11-20T13:54:59+0530",
  "dateAdded": "2018-11-20T13:54:59+0530",
  "displayStartDate": "1900-01-01T00:00:00+0530",
  "displayEndDate": "9999-12-31T00:00:00+0530",
  "owner": {
    "recordId": 2,
    "name": "Default Administrator",
    "email": "user1@example.com",
    "externalType": "ACCOUNT",
    "links": [
      {
        "rel": "canonical",
        "href": "https://<IM_REST_API_HOST>/km/api/latest/users/2",
        "mediaType": "application/json, application/xml",
        "method": "GET"
      }
    ]
  },
  "lastModifier": {
    "recordId": 2,
    "name": "Default Administrator",
    "email": "user2@example.com",
    "externalType": "ACCOUNT",
    "links": [
      {
        "rel": "canonical",
        "href": "https://<IM_REST_API_HOST>/km/api/latest/users/2",
        "mediaType": "application/json, application/xml",
        "method": "GET"
      }
    ]
  },
  "creator": {
    "recordId": 2,
    "name": "Default Administrator",
    "email": "user3@example.com",
    "externalType": "ACCOUNT",
    "links": [
      {
        "rel": "canonical",
        "href": "https://<IM_REST_API_HOST>/km/api/latest/users/2",
        "mediaType": "application/json, application/xml",
        "method": "GET"
      }
    ]
  },
  "published": false,
  "pending": false,
  "checkedOut": false,
  "xml": "<FAQ><QUESTION><![CDATA[Questions...]]></QUESTION><ANSWER><![CDATA[Answers...]]></ANSWER><SUMMARY><![CDATA[Summary in me]]></SUMMARY></FAQ>",
  "resourcePath": "RESOURCE_PATH"
}
Back to Top