Create content

post

/km/api/v1/content

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

This method creates a new content record in the Oracle Knowledge repository.

This method also allows you to create a new content record with a file attachment. To create a content record with attachment, you have to specify a file node of the attached document in the XML payload.

While creating a content record, you can specify the reason for editing the article in the request body of the payload. Specify the reason for editing only as plain text for the ReasonForEdit parameter. Other formats such as HTML and JavaScript are not supported.

To review the reason for editing an article, use either Get history by document ID or Get history by ID methods. You cannot get the reason for editing when you use find methods, such as, Find by ID, Find by doc ID and so on.

Note: You cannot create and publish an article or content at the same time. First create the content and then publish the created content. For publishing content, you may use one of the following methods.

  • Publish all version in all locales
  • Publish all version in this locales
  • Publish this version

Content Security

This method uses the access permission of the logged-in user based on the user role. The role based permissions are used to determine whether the user has the modify privilege in the content type. Then, the content is created only when the user has the modify permissions. While creating content a locale must be specified as the user???s default locale, otherwise an error is returned.




Create content with file attachments

Supported Media Types: 'multipart/form-data'



This method creates a content record with one or more file attachments. You can create a content record with a file attachment by specifying the file information in the XML payload. You must specify the information of a file attachment such as file name, title and so on, in the file node of the XML payload. You must also specify the file in the FILEPART of the request.

If you want to specify more than one file attachment in the content record, specify the file node of each attachment in the XML payload.

The following table describes the XML tags that describe the file attachment in a payload:

NodeRequiredDescription
KM_ATTACHMENTS_ATTRYESThis tag identifies the root node where details about each file attachment is provided.
FILEYESThis tag identifies the parent node where details about the file attachment are provided.
IDNOThis tag describes the unique identifier of the file attachment. After content is created, this field is populated with the file reference.

Note: The file attachment must be specified in FILEPART.

FILENAMEYESThis tag defines the name of the file attachment. The file name must exactly match the name of the file specified in FILEPART.
TITLENOThis tag defines the title of the file attachment. When a title is not specified, the value is defaulted to the file name.
DESCRIPTIONYESThis tag describes the description of the file attachment.

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 payload do not match the uploaded files.

  • OKDOM-CONT0202

    The error occurs when the specified file description in the XML payload exceeds the maximum allowed length.

  • OKDOM-SCHEMA0018

    The error occurs when file description is not specified in the XML payload.

  • OKDOM-CONT0203

    The error occurs when duplicate files are specified as attachments.

  • OKDOM-CONT0210

    The error occurs when the ContentUpdateBO.articleStatus specified with the request is inactive.

  • OKDOM-CONT0211

    The error occurs when a ContentUpdateBO.articleStatus is specified with the request and the article status feature is not available.

Request

Supported Media Types
Body ()
The object to be created.
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

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 a new content record in the Oracle Knowledge repository.

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

Example of Request Body

The following example shows the contents of the request body in JSON format:

  "isForEdit": true,
  "views": [
    {
      "recordId": "BBA181DFB52148779A416184A191B2AF",
      "referenceKey": "SERVICE",
      "name": "Service"
    }
  ],
  "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"
      }
    ]
  },
  "contentType": {
    "recordId": "98055D055BA8467B8097FB0B52923FD2",
    "referenceKey": "FAQ",
    "name": "FAQ",
    "links": [
      {
        "rel": "canonical",
        "href": "https://<IM_REST_API_HOST>/km/api/latest/contentTypes/98055D055BA8467B8097FB0B52923FD2",
        "mediaType": "application/json, application/xml",
        "method": "GET"
      }
    ]
  },

  "published": false,
  "xml":"<FAQ><QUESTION><![CDATA[Q query  Testing]]></QUESTION><ANSWER><![CDATA[Q query  Testing]]></ANSWER><SUMMARY><![CDATA[Q query  Testing]]></SUMMARY></FAQ>"
}

Example of Request Body

The following example shows the contents of the request 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": "CA357A2FB7B3454F900A76363117352B",
    "versionId": "D2302A804D314CB499ED9FB2C16765ED",
    "documentId": "FAQ4336",
    "title": "Q query  Testing",
    "version": "1.0",
    "answerId": 1020556,
    "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-10-01T11:46:24+0000",
    "links": [
        {
            "rel": "canonical",
            "href": "https://<IM_REST_API_HOST>/km/api/latest/content/CA357A2FB7B3454F900A76363117352B",
            "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-10-01T11:46:24+0000",
    "lastModifiedDate": "2018-10-01T11:46:24+0000",
    "dateAdded": "2018-10-01T11:46:24+0000",
    "displayStartDate": "1900-01-01T00:00:00+0000",
    "displayEndDate": "9999-12-31T00:00:00+0000",
    "owner": {
        "recordId": "C08CDCAF95B74199A361AF2602C6A8E4",
        "name": "USER NAME VALUE",
        "email": "EMAIL ID VALUE",
        "externalType": "ACCOUNT",
        "links": [
            {
                "rel": "canonical",
                "href": "https://<IM_REST_API_HOST>/km/api/latest/users/C08CDCAF95B74199A361AF2602C6A8E4",
                "mediaType": "application/json, application/xml",
                "method": "GET"
            }
        ]
    },
    "lastModifier": {
        "recordId": "C08CDCAF95B74199A361AF2602C6A8E4",
        "name": "USER NAME VALUE",
        "email": "EMAIL ID VALUE",
        "externalType": "ACCOUNT",
        "links": [
            {
                "rel": "canonical",
                "href": "https://<IM_REST_API_HOST>/km/api/latest/users/C08CDCAF95B74199A361AF2602C6A8E4",
                "mediaType": "application/json, application/xml",
                "method": "GET"
            }
        ]
    },
    "creator": {
        "recordId": "C08CDCAF95B74199A361AF2602C6A8E4",
        "name": "USER NAME VALUE",
        "email": "EMAIL ID VALUE",
        "externalType": "ACCOUNT",
        "links": [
            {
                "rel": "canonical",
                "href": "https://<IM_REST_API_HOST>/km/api/latest/users/C08CDCAF95B74199A361AF2602C6A8E4",
                "mediaType": "application/json, application/xml",
                "method": "GET"
            }
        ]
    },
    "published": false,
    "pending": false,
    "checkedOut": false,
    "xml": "<FAQ><QUESTION><![CDATA[Q query Testing]]></QUESTION><ANSWER><![CDATA[Q query Testing]]></ANSWER><SUMMARY><![CDATA[Q query  Testing]]></SUMMARY></FAQ>",
    "resourcePath": "$STAGING_RESOURCE_HOST_URL/fusion/content/draft/CA357A2FB7B3454F900A76363117352B/D2302A804D314CB499ED9FB2C16765ED/"
}
Back to Top