Find all

get

/km/api/v1/content

This method returns a list of knowledge articles from the Oracle Knowledge repository.

User Type

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

Article Version

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

The contentState parameter can be used to specify whether you want the published (and live), latest, or latest valid versions of the articles. Setting contentState to PUBLISHED will return published versions of articles. Account users can request the latest versions of articles by setting contentState to LATEST. Setting contentState to LATESTVALID will return:

  • The published version of an article if the article is pending, or if the article's display dates are not valid.
  • The latest version of an article if the article is not pending, and the display dates are valid.
  • The contentState parameter can be set to PUBLISHED, LATEST, or LATESTVALID. The default value is PUBLISHED.

    Article Size

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

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

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

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

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

    For example, to retrieve articles in FULL data mode, submit a call using the URI:

    GET http://<IM_REST_API_HOST>/km/api/latest/content/?mode=FULL

    Security

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

    Entitlements For Contacts

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

    Entitlements For Staff Accounts

    For an Information Manager Console user or an Oracle B2C Service account user the service uses the security role permissions assigned to the user to display the content.

    Entitlements For Agents

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

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

    Entitlements For Authors

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

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

      Interface ID

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

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

      This parameter may be used on the behalf of contacts only. Please refer to the product documentation for more information.

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

      Ordering Results

      This resource supports the orderBy request parameter, which allows you to sort the returned list of Content objects.

      You can find the values available for use with the orderBy parameter in the schema and catalog information of the resource. To get the schema and catalog information, use GET method with the mediaType value of 'application/schema+json'in the HTTP request.

      The example URI to get schema and catalog information of the resource is: http://<IM_REST_API_HOST>/km/api/latest/metadata-catalog/content

      Response Errors

      The possible error responses for this method are as follows:

      • OK-GEN0020

        The error occurs when either of the following conditions exist:

        • When isForEdit or agentMode parameter value is given with the request.
        • When query parameter is passed and contentState parameter value is given with the request.
      • OK-GEN0013

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

      • OKDOM-GEN0006

        The error occurs when you specify any invalid value with the HTTP service request.

        The valid values for contentState parameter are: PUBLISHED, LATEST, and LATESTVALID.

      • OKDOM-CONT0121

        The error occurs when you specify LATEST as the contentState value along with the HTTP Service request when you are logged in as a web user or Oracle B2C Service Knowledge Advanced contact user.

        The content resource does not allow the LATEST as contentState parameter value when you are logged in as a web user or Oracle B2C Service Knowledge Advanced contact user.

      • OKDOM-GEN0001

        The error occurs in any of the following cases:

        • The kmauthtoken header contains an interface ID for which no interface is found.
        • The interface ID given with the interfaceId parameter is invalid.

      • OK-RN_INTERFACE0001

        The error occurs when either of the following conditions exist:

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

      Example URIs

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

        The request returns a paginated list of DATA content BOs of the published (and live) version of knowledge articles from the Oracle Knowledge repository.

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

        The request returns a paginated list of DATA content BOs of the latest valid version of knowledge articles from the Oracle Knowledge repository.

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

        The request returns a paginated list of EXTENDED content BOs of the published (and live) version of knowledge articles from the Oracle Knowledge repository.. The returned XML and the meta-data XML have the replacement token references replaced with the appropriate replacement token values.

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

        The request returns a paginated list of FULL content BOs of the published (and live) version of knowledge articles from the Oracle Knowledge repository.. The returned XML and the meta-data XML have the replacement token references replaced with the appropriate replacement token values. Conditional content will appear in the output according to the user's security privileges.

      • http://<IM_REST_API_HOST>/km/api/latest/content?mode=KEY&limit=5&offset=10

        The request returns a list of KEY content BOs of the published (and live) version of knowledge articles from the Oracle Knowledge repository. The returned list is paginated with at most five objects per page starting with the tenth content of all contents.




      Find by query

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



      This method returns a list of knowledge articles that match the specified criteria.

      User Type

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

      Article Version

      In general the software returns the published (and live) version of the article.

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

      Article Size

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

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

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

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

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

      For example, to retrieve all information about an article with a given documentId, submit a call using the URI:

      GET http://<IM_REST_API_HOST>/km/api/latest/content/?q=documentId+eq+'id'&mode=FULL

      Interface ID

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

      GET http://<IM_REST_API_HOST>/km/api/latest/content?q=&interfaceId=3

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

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

      Security

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

      Entitlements For Contacts

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

      Entitlements For Staff Accounts

      For an Information Manager Console user or an Oracle B2C Service account user the service uses the security role permissions assigned to the user to display the content.

      Entitlements For Agents

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

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

      Entitlements For Authors

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

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

        Response Errors

        The possible error responses for this method are as follows:

        • OK-GEN0020

          The error occurs when either of the following conditions exist:

          • When isForEdit or agentMode parameter value is given with the request.
          • When query parameter is passed and contentState parameter value is given with the request.
        • OK-GEN0013

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

        • OKDOM-GEN0006

          The error occurs when you specify any invalid value with the HTTP service request.

          The valid values for contentState parameter are: PUBLISHED and LATESTVALID.

        • OKDOM-CONT0121

          The error occurs when you specify LATEST as the contentState value along with the HTTP Service request when you are logged in as a web user or Oracle B2C Service Knowledge Advanced contact user.

          The content resource does not allow the LATEST as contentState parameter value when you are logged in as a web user or Oracle B2C Service Knowledge Advanced contact user.

        • OKDOM-CRIT0026

          The error occurs when you specify locale criteria parameter along with the langpref request parameter.

        • OKDOM-GEN0001

          The error occurs in any of the following cases:

          • No content is found by the specified record ID.
          • The kmauthtoken header contains an interface ID for which no interface is found.
          • The interface ID given with the interfaceId parameter is invalid.
        • OKDOM-CRIT0039

          The error occurs when Query parameter has OR condition for two unrelated relationships. For example:

          • Invalid Request: GET /content?q=userGroups.referenceKey eq 'GOLD' or categories.referenceKey eq 'EUROPE'
          • Valid Request: GET /content?q=categories.id in ('2LKAJDFO8234OIJ3O24P18439837409819', 'AMPD2J43FO82DFS3ODSRF123PAKFJ29823', 'ZKDFJ34S023JF0SL2340ZLC01923MFIO1F') or categories.referenceKey eq 'EUROPE'
        • OK-RN_INTERFACE0001

          The error occurs when either of the following conditions exist:

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

        The following table describes the query parameters for this resource.

        ParameterQueryableSortableTypeDescription
        recordIdYY'type' : 'string'

        The unique identifier of the document. This ID is same in all versions in all locales of the document.

        documentIdYY'type' : 'string'

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

        titleYY'type' : 'string'

        The tittle of the document.

        answerIdYY'type' : 'integer'

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

        localeYN'$ref' : '#/definitions/LocaleKey'

        The locale of the version of the document. The locale code represents the language and country associated with the Locale object. The following subfield can be used with locale query parameter:

        • locale.recordId : The unique identifier of the Locale object. For example, to request an article in the Spanish-Spain locale, submit a call using the URI:
          http://<IM_REST_API_HOST>/km/api/content?q=locale.recordId eq 'es_ES'
        dateModifiedYY'type' : 'string', 'format' : 'date-time'

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

        contentTypeYN'$ref' : '#/definitions/ContentTypeKey'

        The channel to which the content is categorized and saved. The following are the subfields that can be used with contentType query parameter:

        • contentType.recordId : The unique identifier of the ContentType object.
        • contentType.referenceKey : The reference key for the ContentType object. ContentType objects support multiple languages. This field can be used to identify the associated objects for all languages. For Example to request articles for content type FAQ, submit a call using the URI:
          http://<IM_REST_API_HOST>/km/api/content?q=contentType.referenceKey eq 'FAQ'
        • contentType.allowRecommendations : The flag indicates whether the content type allows end users to create recommendations for its contents. This also indicates whether you can associate the recommended content with a content type.
        priorityYY'enum' : ['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.

        createDateYY'type' : 'string', 'format' : 'date-time'

        The date when the content was created. For legacy systems, the create date is the date when the document was created in those systems.

        lastModifiedDateYY'type' : 'string', 'format' : 'date-time'

        The date when the content was last modified. For legacy systems, the lastModifiedDate date is the date when the document was last modified in those systems.

        dateAddedYY'type' : 'string', 'format' : 'date-time'

        The date when the content was added to the content type. For legacy systems, the create date is the date when the document was migrated from the legacy system to the Oracle Knowledge Repository.

        displayStartDateYY'type' : 'string', 'format' : 'date-time'

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

        displayEndDateYY'type' : 'string', 'format' : 'date-time'

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

        eventStartDateYY'type' : 'string', 'format' : 'date-time'

        The date when the document's event begins.

        eventEndDateYY'type' : 'string', 'format' : 'date-time'

        The date when the document's event ends.

        ownerYN'$ref' : '#/definitions/UserKey'

        The user or author who owns or is responsible for the document. The following are the subfields that can be used with owner query parameter:

        • owner.recordId : The unique identifier of the owner object. For example, to request an article with unique id, submit a call using the URI:
          http://<IM_REST_API_HOST>/km/api/content?q=owner.recordId eq '{id}'
        • owner.email : User's email.
        • owner.firstName : User's firstName.
        • owner.lastName : User's lastName.
        • owner.login : User's login.
        lastModifierYN'$ref' : '#/definitions/UserKey'

        The user or author who performed the last content modification. The following are the subfields that can be used with lastModifier query parameter:

        • lastModifier.recordId : The unique identifier of the lastModifier object. For example, to request an article with unique id, submit a call using the URI:
          http://<IM_REST_API_HOST>/km/api/content?q=lastModifier.recordId eq '{id}'
        • lastModifier.email : User's email.
        • lastModifier.firstName : User's firstName.
        • lastModifier.lastName : User's lastName.
        • lastModifier.login : User's login.
        creatorYN'$ref' : '#/definitions/UserKey'

        The user who originally authored or created the document. The following are the subfields that can be used with creator query parameter:

        • creator.recordId : The unique identifier of the creator object. For example, to request an article with unique id, submit a call using the URI:
          http://<IM_REST_API_HOST>/km/api/content?q=creator.recordId eq '{id}'
        • creator.email : User's email.
        • creator.firstName : User's firstName.
        • creator.lastName : User's lastName.
        • creator.login : User's login.
        publishDateYY'type' : 'string', 'format' : 'date-time'

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

        displayReviewDateYY'type' : 'string', 'format' : 'date-time'

        The date when the document requires a review by an author capable of performing the review.

        checkedOutYY'type' : 'boolean'

        The date when an author has checked out or locked the document for editing.

        checkedOutByYN'$ref' : '#/definitions/UserKey'

        The user or author who performed the last content checkout. The following are the subfields that can be used with checkedOutBy query parameter:

        • checkedOutBy.recordId : The unique identifier of the checkedOutBy object. For example, to request an article with unique id, submit a call using the URI:
          http://<IM_REST_API_HOST>/km/api/content?q=checkedOutBy.recordId eq '{id}'
        • checkedOutBy.email : User's email.
        • checkedOutBy.firstName : User's firstName.
        • checkedOutBy.lastName : User's lastName.
        • checkedOutBy.login : User's login.
        mostPopularYY'type' : 'string'

        This is a sort field that you can use to sort the Content objects in the returned list.

        The mostPopular parameter value is determined by the number of times the document has been viewed by the end user. The value is sorted by the count in the contentmetrics table. The mostPopular sort field sorts the objects in the order of its popularity among the end-user. The most popular one appears in the top of the list.

        Do not use the mostPopular as a value of the query, but use it as a sort field.

        NOTE: The mostRecent and mostPopular sort fields cannot be used together.

        Example URI combinations when the mostPopular sort filed is used with the contentState and Mode parameter are as follows:

        • http://<IM_REST_API_HOST>/km/api/content?q=&orderBy=mostPopular

          The request sort the Content objects by most popular in descending order. The most popular document appears in the top of the list.

        • http://<IM_REST_API_HOST>/km/api/content?q=&orderBy=mostPopular,dateAdded

          The request sort the Content objects by popularity in descending order and the date when they are added in ascending order.

        • http://<IM_REST_API_HOST>/km/api/content?q=contentState eq 'LATESTVALID'&orderBy=mostPopular,dateAdded&mode=KEY

          The request sort the Content objects by the mostPopular parameter value in descending order and the dateAdded parameter value in ascending order. The list contains only objects in KEY mode and which have the contentState parameter value as LATESTVALID.

        Example URI combinations when the mostPopular sort filed is used with the Categories parameter are as follows:

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

          The request sort the Content objects in the content type agile_channel and the category world by mostPopular parameter value.

        • http://<IM_REST_API_HOST>/km/api/content?q=contentType.refKey eq 'AGILE_CHANNEL' and categories.refKey in ('RN_CATEGORY_34587323') and filterMode.contentState eq 'LATESTVALID'&orderBy=mostPopular&mode=KEY

          The request sort the Content objects in the content type agile_channel and the category world by most popular on top of the list. The list contains the latest valid documents.

        mostRecentYY'type' : 'string'

        This is a sort field that you can use to sort the Content objects in the returned list in order of most recently authored.

        Do not use the mostRecent as a value of the query, but use it as a sort field.

        NOTE: The mostRecent and mostPopular sort fields cannot be used together.

        Example URI combinations when the mostPopular sort filed is used with the contentState, Category object and Mode parameter are as follows:

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

          The request sort the Content objects in the content type agile_channel and the Category world by most recently authored document on the top of the list. As no content state is mentioned the service sorts the result by published date. The default value of the contentState parameter is PUBLISHED.

        • http://<IM_REST_API_HOST>/km/api/content?q=contentType.refKey eq 'AGILE_CHANNEL' and categories.refKey in ('RN_CATEGORY_34587323') and filterMode.contentState eq 'LATESTVALID'&orderBy=mostRecent&mode=KEY

          The request sort the Content objects in the content type agile_channel and the category world by most recently authored document on the top of the list. The list contains the latest valid documents that do not need publishing. As the content state is LATESTVALID service sorts the list by dateModified parameter value instead of publishedDate parameter value.

        • http://<IM_REST_API_HOST>/km/api/content?q=contentType.refKey eq 'AGILE_CHANNEL' and categories.refKey in ('RN_CATEGORY_34587323') and filterMode.contentState eq 'PUBLISHED'&orderBy=mostRecent&mode=KEY

          The request sort the Content objects in the content type agile_channel and the category world by most recently authored document on the top of the list. The list contains the published documents.

        contentStateYN'enum' : ['PUBLISHED', 'LATEST', 'LATESTVALID']

        The state of the content. The valid values are PUBLISHED, LATEST and LATESTVALID.

        Supply the contentState parameter value as filterMode.contentState and not as contentState. When traversing the content relationship from a resource other than content, it must also be provided as filterMode.contentState and not as content.contentState or filterMode.content.contentState as the relationship traversal pattern would allude to.

        An author can publish a document in either of the two types; published live or published pending. Following are their definitions:

        • The published live is when the document is currently available to end-users.
        • The published pending is when the document is published to make it available to end user in the future.

        NOTE: The published contentState parameter value only considers documents that are published live.

        NOTE: The latest contentState parameter value only considers the latest version of the document.

        The displayStartDate and displayEndDate, referred to as the display dates, are the criteria that determine whether a document version meets the contentState requirments. The service considers the display dates as invalid if the date when the request is made does not fall between the range of the displayStartDate and the displayEndDate.

        NOTE: If the document is not available to end-users when the request is made, the document is considered to have invalid display dates. This does not include published pending documents that have the displayStartDate in the future.

        Example URI combinations, when the contentState parameter is used with its valid values are as follows:

        The contentState parameter used with published.

        • http://<IM_REST_API_HOST>/km/api/content?q=filterMode.contentState eq 'PUBLISHED'

          The request returns the published live versions of documents that are published live.

        The contentState parameter used with latest.

        • http://<IM_REST_API_HOST>/km/api/content?q=filterMode.contentState eq 'LATEST'

          The request returns the latest version of the document without regard to display dates or published state.

        The contentState parameter used with latest valid.

        • http://<IM_REST_API_HOST>/km/api/content?q=filterMode.contentState eq 'LATESTVALID'

          The request returns the documents that have a latest valid version.

        The following are the rules that determine which version of the document becomes the latest valid version:

        • If both published live and published pending versions exist, then the service returns the published live version.
        • If only published pending version exist, then return nothing.
        • If no published pending version exists, then the service returns the latest version if the display dates are valid.
        • If no published pending version exists and the latest version has invalid display dates, then the service returns the published live version.
        • If no published versions exist and the latest version has invalid display dates, then returns nothing.
        workflowStepYN'$ref' : '#/definitions/WorkflowStepKey'

        The step of the workflow in which the document version currently exist.

        wfStepNotificationOverrideYY'type' : 'string', 'format' : 'date-time'

        The date when the service sends notification to the author involved in the review. Once the workflow notification is given, the service updates the next review date.

        categoriesYN'$ref' : '#/definitions/ListCategoryKey'

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

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

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

          Match Any

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

          Example URIs for the category parameter are as follows:

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

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

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

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

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

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

        • http://<IM_REST_API_HOST>/km/api/content?q=contentType.refKey in ('AGILE_CHANNEL', 'NEWS_CHANNEL') and categories.refKey inWithNoChildren ('RN_CATEGORY_45587634', 'RN_CATEGORY_45587522')&mode=KEY&orderBy=mostPopular

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

        • http://<IM_REST_API_HOST>/km/api/content?q=contentType.refKey in ('AGILE_CHANNEL', 'NEWS_CHANNEL') and categories.refKey inWithNoChildren ('RN_CATEGORY_45587634', 'RN_CATEGORY_45587522') and filterMode.contentState eq 'PUBLISHED'&mode=KEY&orderBy=mostRecent

          The objects in the returned list are sorted by the published Date.

        • http://<IM_REST_API_HOST>/km/api/content?q=contentType.refKey in ('AGILE_CHANNEL', 'NEWS_CHANNEL') and categories.refKey inWithNoChildren ('RN_CATEGORY_45587634', 'RN_CATEGORY_45587522') and filterMode.contentState eq 'LATESTVALID'&mode=KEY&orderBy=mostRecent

          The objects in the returned list are sorted by the dateModified.

          Match ALL

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

        • http://<IM_REST_API_HOST>/km/api/content?q=contentState eq 'LATEST' and contentType.refKey eq 'AGILE_CHANNEL' and categories.refKey matchAll ('RN_CATEGORY_34587323', 'RN_CATEGORY_34587345')&mode=KEY

          The request returns all Content objects in the world and movies category. The service returns a Content object in the category Africa because Africa is a child category for the category world.

        • http://<IM_REST_API_HOST>/km/api/content?q=contentState eq 'LATEST' and contentType.refKey eq 'AGILE_CHANNEL' and categories.refKey matchAll ('RN_CATEGORY_34587323', 'RN_CATEGORY_34587345')&mode=KEY&orderBy=mostPopular

          The objects in the returned list are sorted by the view in descending order.

        • http://<IM_REST_API_HOST>/km/api/content?q=contentState eq 'PUBLISHED' and contentType.refKey eq 'AGILE_CHANNEL' and categories.refKey matchAll ('RN_CATEGORY_34587323', 'RN_CATEGORY_34587345')&mode=KEY&orderBy=mostRecent

          The objects in the returned list are sorted by the published date descending order.

        userGroupsYN'$ref' : '#/definitions/ListUserGroupKey'

        The user groups assigned to the content. The member of the assigned user group will only have access to the content.

        viewsYN'$ref' : '#/definitions/ListViewKey'

        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.

Request

Query Parameters
  • This parameter restricts the number of resources returned inside the resource collection. If the limit exceeds the resource count then the framework will only return the available resources.
  • This parameter defines amount of information to be included in the returned resources - KEY is the one that has least information (and hence performs better) and FULL is the one that has most information.
    Allowed Values: [ "KEY", "DATA", "EXTENDED", "FULL" ]
  • Used to define the starting position of the resource collection. If offset exceeds the resource count then no resources are returned. Default value is 0.
  • This parameter orders a resource collection based on the specified attributes. The parameter value is a comma-separated string of attribute names, each optionally followed by a colon and 'asc' or 'desc'. Specify 'asc' for ascending and 'desc' for descending. The default value is 'asc'. For example, ?orderBy=field1:asc,field2:desc.
  • Value for this parameter should be Oracle Knowledge Q query - see the 'Getting Started' documentation ('Querying' page) of this operation and documentation for Q query.
Back to Top

Response

Supported Media Types

200 Response

OK.
Body ()
Root Schema : ResultList ContentData
Type: object
Title: ResultList ContentData
Match All
Show Source
Nested Schema : Collection Paging Resource
Title: Collection Paging Resource
Oracle base collection resource schema definition.
Match All
Show Source
Nested Schema : Base Collection Resource
Title: Base Collection Resource
Oracle base collection resource schema definition.
Match All
Show Source
Nested Schema : Singular Resource
Type: object
Title: Singular Resource
Oracle base singular resource schema definition.
Show Source
Nested Schema : Base Collection Resource-allOf[1]
Type: object
Show Source
Nested Schema : Collection Paging Resource-allOf[1]
Type: object
Show Source
Nested Schema : ResultList ContentData-allOf[1]
Type: object
Show Source
Nested Schema : items
Type: array
Show Source
Nested Schema : items
Type: object
Nested Schema : items
Type: array
Show Source
Nested Schema : ContentData
Match All
Show Source
Nested Schema : ContentKey
Match All
Show Source
Nested Schema : ContentKey-allOf[1]
Type: object
Show Source
Nested Schema : ContentData-allOf[1]
Type: object
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 : LocaleKey
Match All
Show Source
Nested Schema : LocaleKey-allOf[1]
Type: object
Show Source
Nested Schema : UserKey
Match All
Show Source
Nested Schema : ContentTypeKey
Match All
Show Source
Nested Schema : UserKey-allOf[1]
Type: object
Show Source
Nested Schema : ContentTypeKey-allOf[1]
Type: object
Show Source
  • The description for the ContentType object. Content Types support multiple languages.

    This field identifies the object associated with the language specified by the user.

  • The name for the ContentType object. The name field can only be used for sorting.

    Content Types support multiple languages. This field identifies the object associated with the language specified by the user.

  • The unique identifier of the ContentType object.

  • The reference key for the ContentType object.

    ContentType objects support multiple languages. This field can be used to identify the associated objects for all languages.

Back to Top

Examples

The following example shows how to find all content record objects from Oracle Knowledge repository by submitting a get request on the REST resource using cURL.

cURL Command

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

Example of Request Header

The following shows an example of the request header.

-H "kmauthtoken: {\"siteName\":\"ORACLE_KNOWLEDGE\",\"integrationUserToken\":\"\"+eCJYkxKwj5HUaIiJYun0/TpatwT1LmtcsF05W33xnEojifV/AsLDj9RpN0lKuorTMNKeSE1tgC7svVL+BzntqDON4KiM1HFlpxvXEUCB0P2w0Xrs75McygqxdVaDSE9"}" \
-H "Accept: application/json"

Example of Response Body

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

{
  "items" : [ {
    "contentType" : {
      "referenceKey" : "REFERENCEKEY_VALUE",
      "name" : "NAME_VALUE",
      "links" : [ {
        "rel" : "canonical",
        "href" : "http://<IM_REST_API_HOST>/km/api/{version}/{resourceURI}",
        "mediaType" : "application/json, application/xml",
        "templated" : true,
        "method" : "GET",
        "profile" : "http://<IM_REST_API_HOST>/km/api/{version}/metadata-catalog/{resourceName}"
      } ]
    },
    "priority" : "PRIORITY_5",
    "createDate" : "2013-04-23T21:06:27EDT",
    "dateAdded" : "2013-04-23T21:06:27EDT",
    "dateModified" : "2013-04-23T21:06:27EDT",
    "displayStartDate" : "2013-04-23T21:06:27EDT",
    "displayEndDate" : "2013-04-23T21:06:27EDT",
    "eventStartDate" : "2013-04-23T21:06:27EDT",
    "eventEndDate" : "2013-04-23T21:06:27EDT",
    "owner" : {
      "name" : "NAME_VALUE",
      "externalId" : 1428416792007,
      "externalType" : "EXTERNALTYPE_VALUE",
      "links" : [ {
        "rel" : "canonical",
        "href" : "http://<IM_REST_API_HOST>/km/api/{version}/{resourceURI}",
        "mediaType" : "application/json, application/xml",
        "templated" : true,
        "method" : "GET",
        "profile" : "http://<IM_REST_API_HOST>/km/api/{version}/metadata-catalog/{resourceName}"
      } ]
    },
    "lastModifier" : {
      "name" : "NAME_VALUE",
      "externalId" : 1428416792014,
      "externalType" : "EXTERNALTYPE_VALUE",
      "links" : [ {
        "rel" : "canonical",
        "href" : "http://<IM_REST_API_HOST>/km/api/{version}/{resourceURI}",
        "mediaType" : "application/json, application/xml",
        "templated" : true,
        "method" : "GET",
        "profile" : "http://<IM_REST_API_HOST>/km/api/{version}/metadata-catalog/{resourceName}"
      } ]
    },
    "creator" : {
      "name" : "NAME_VALUE",
      "externalId" : 1428416792017,
      "externalType" : "EXTERNALTYPE_VALUE",
      "links" : [ {
        "rel" : "canonical",
        "href" : "http://<IM_REST_API_HOST>/km/api/{version}/{resourceURI}",
        "mediaType" : "application/json, application/xml",
        "templated" : true,
        "method" : "GET",
        "profile" : "http://<IM_REST_API_HOST>/km/api/{version}/metadata-catalog/{resourceName}"
      } ]
    },
    "published" : true,
    "publishDate" : "2013-04-23T21:06:27EDT",
    "displayReviewDate" : "25057028-02-17T22:12:46EST",
    "checkedOut" : true,
    "checkedOutBy" : {
      "name" : "NAME_VALUE",
      "externalId" : 1428416792010,
      "externalType" : "EXTERNALTYPE_VALUE",
      "links" : [ {
        "rel" : "canonical",
        "href" : "http://<IM_REST_API_HOST>/km/api/{version}/{resourceURI}",
        "mediaType" : "application/json, application/xml",
        "templated" : true,
        "method" : "GET",
        "profile" : "http://<IM_REST_API_HOST>/km/api/{version}/metadata-catalog/{resourceName}"
      } ]
    },
    "basedOnVersion" : "BASEDONVERSION_VALUE",
    "publishedVersion" : "PUBLISHEDVERSION_VALUE",
    "basedLocale" : {
      "links" : [ {
        "rel" : "canonical",
        "href" : "http://<IM_REST_API_HOST>/km/api/{version}/{resourceURI}",
        "mediaType" : "application/json, application/xml",
        "templated" : true,
        "method" : "GET",
        "profile" : "http://<IM_REST_API_HOST>/km/api/{version}/metadata-catalog/{resourceName}"
      } ]
    },
    "displayPosition" : "FIXED_AT_TOP",
    "versionId" : "VERSIONID_VALUE",
    "documentId" : "DOCUMENTID_VALUE",
    "title" : "TITLE_VALUE",
    "version" : "VERSION_VALUE",
    "answerId" : 1428416792011,
    "locale" : {
      "links" : [ {
        "rel" : "canonical",
        "href" : "http://<IM_REST_API_HOST>/km/api/{version}/{resourceURI}",
        "mediaType" : "application/json, application/xml",
        "templated" : true,
        "method" : "GET",
        "profile" : "http://<IM_REST_API_HOST>/km/api/{version}/metadata-catalog/{resourceName}"
      } ]
    },
    "links" : [ {
      "rel" : "canonical",
      "href" : "http://<IM_REST_API_HOST>/km/api/{version}/{resourceURI}",
      "mediaType" : "application/json, application/xml",
      "templated" : true,
      "method" : "GET",
      "profile" : "http://<IM_REST_API_HOST>/km/api/{version}/metadata-catalog/{resourceName}"
    } ]
  } ],
  "hasMore" : false,
  "limit" : 20,
  "offset" : 0,
  "links" : [ {
    "rel" : "canonical",
    "href" : "http://<IM_REST_API_HOST>/km/api/{version}/content?limit=20&offset=0",
    "mediaType" : "application/json, application/xml",
    "method" : "GET"
  } ],
  "count" : 1
}
Back to Top