Find all

get

/km/api/v1/contentRecommendations

This method returns a list of ContentRecommendation objects from the Oracle Knowledge Repository.

Only those ContentRecommendations which active user can view will be returned.

For account users the list will only include ContentRecommendations that contains at least one view assigned to the user.

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

You can find different values to 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 as 'application/schema+json' in the HTTP request.

The example URI to get schema and catalog of the resource is as follows:

  • http://<IM_REST_API_HOST>/km/api/latest/metadata-catalog/contentRecommendations

Example URIs

The example URIs for this method are as follows:

  • http://<IM_REST_API_HOST>/km/api/latest/contentRecommendations

    The request returns a paginated list of ContentRecommendation objects from the Oracle Knowledge Repository.

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

    The request returns a paginated list of ContentRecommendation objects in the FULL mode. By default, the Content objects in the KEY mode for the published version of the content appear nested with the response.

  • http://<IM_REST_API_HOST>/km/api/latest/contentRecommendations?mode=FULL&contentState=LATESTVALID

    The request returns a paginated list of ContentRecommendation objects in the FULL mode. The contentKey objects for the latest valid version of the content appear nested in the ContentRecommendation objects.

    Valid values for contentState parameter are PUBLISHED and LATESTVALID.

Response Errors

The possible error responses for this method are as follows:

  • OKDOM-GEN0006

    The error is displayed when you specify any invalid value as contentState parameter with the HTTP service request.

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

  • OKDOM-CONT0121

    The error is displayed when you specify LATEST as the contentState value along with the HTTP Service request.

    The contentRecommendations resource does not allow the LATEST as contentState parameter value.




Find by query

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



This method returns a list of ContentRecommendation objects that match the specified criteria.

Only those ContentRecommendations which active user can view will be returned.

For account users the list will only include ContentRecommendations that contains at least one view assigned to the user.

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

You can find different values to 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 as 'application/schema+json' in the HTTP request.

The example URI to get schema and catalog of the resource is as follows:

  • http://<IM_REST_API_HOST>/km/api/latest/metadata-catalog/contentRecommendations

Example URIs

The example URIs for this method are as follows:

  • http://<IM_REST_API_HOST>/km/api/contentRecommendations?q=dateAdded after {input date}&mode=FULL

    The request returns a list of ContentRecommendation objects in FULL mode. The list contains the objects created after the input date mentioned with the request.

  • http://<IM_REST_API_HOST>/km/api/contentRecommendations?q=content.documentId eq 'FAQ34'&mode=FULL

    The request returns a list of ContentRecommendation objects in FULL mode. The list contains ContentRecommendation objects that are related to the Content object having the specified document ID.

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

The contentState parameter can not be used in a criteria query, use filterMode.contentState parameter instead. Valid values are PUBLISHED and LATESTVALID.

Response Errors

The possible error responses for this method are as follows:

  • OKDOM-GEN0006

    This error is displayed when you specify any invalid value as contentState parameter with the HTTP service request. The valid values are: PUBLISHED, LATEST, and LATESTVALID.

  • OKDOM-CONT0121

    This error is displayed when you specify LATEST as the contentState value along with the HTTP Service request.

    The contentRecommendations resource does not allow the LATEST as contentState parameter value.

Query Parameters

The following table describes the query parameters for this resource.

ParameterQueryableSortableTypeDescription
recordIdYY'type' : 'string'

The unique identifier of the contentRecommendation object.

caseNumberYY'type' : 'string'

The incidentId to locate contentRecommendation object associated with a specific incident.

commentsYY'type' : 'string'

The comment from the user who recommended the content.

completedByUserIdYY'type' : 'string'

The userId associated with the completed content recommendations.

To have a completedByUserId, the ContentRecommendation object must have status values as follows:

  • CONTENT_CREATED
  • CONTENT_MODIFIED
  • REJECTED_DUPLICATE
  • REJECTED_NOT_ENOUGH_INFO
  • REJECTED_UNSUITABLE
  • REJECTED_OTHER
completedByUserNameYY'type' : 'string'

The unique identifier of the user who added content recommendation.

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

The date when the ContentRecommendation object was added.

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

The date when the ContentRecommendation object was last modified.

priorityYY'enum' : ['LOW', 'MEDIUM', 'HIGH']

The optional priority for the recommendation. The valid values are: LOW, MEDIUM, and HIGH.

requestedByUserIdYY'type' : 'string'

The unique identifier of the user who recommended the content.

requestedByUserNameYY'type' : 'string'

The name of user who requested the content.

statusYY'enum' : ['NEW', 'UNDER_REVIEW', 'REJECTED_DUPLICATE', 'REJECTED_NOT_ENOUGH_INFO', 'REJECTED_UNSUITABLE', 'REJECTED_OTHER', 'CONTENT_CREATED', 'CONTENT_MODIFIED']

The status of the recommendation.

The valid status values are the following:

  • NEW
  • CONTENT_CREATED
  • CONTENT_MODIFIED
  • REJECTED_DUPLICATE
  • REJECTED_NOT_ENOUGH_INFO
  • REJECTED_UNSUITABLE
  • REJECTED_OTHER
statusCommentsYY'type' : 'string'

The comment added by author about the status of the ContentRecommendation object.

titleYY'type' : 'string'

The title assigned to the recommendation by the user.

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

The content type to which a recommendation is added.

contentYN'$ref' : '#/definitions/ContentKey'

The content in the Oracle Knowledge Repository to which the user recommends modification.

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

The locale code of the content. For example, en_US is the locale for English (United States).

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

The list of views to which the recommendation is associated.

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

The list of content categories to which the recommendation is associated.

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 ContentRecommendationData
Type: object
Title: ResultList ContentRecommendationData
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 ContentRecommendationData-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 : ContentRecommendationData
Match All
Show Source
Nested Schema : ContentRecommendationKey
Match All
Show Source
Nested Schema : ContentRecommendationKey-allOf[1]
Type: object
Show Source
Nested Schema : ContentRecommendationData-allOf[1]
Type: object
Show Source
Back to Top

Examples

The following example shows how to find all Content Recommendation 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/contentRecommendations"

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" : [ {
    "caseNumber" : "CASENUMBER_VALUE",
    "comments" : "COMMENTS_VALUE",
    "completedByUserName" : "COMPLETEDBYUSERNAME_VALUE",
    "dateAdded" : "2013-04-23T23:29:24EDT",
    "dateModified" : "2013-04-23T23:29:24EDT",
    "priority" : "HIGH",
    "requestedByUserName" : "REQUESTEDBYUSERNAME_VALUE",
    "status" : "NEW",
    "statusComments" : "STATUSCOMMENTS_VALUE",
    "title" : "TITLE_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}"
  } ],
  "hasMore" : false,
  "limit" : 20,
  "offset" : 0,
  "links" : [ {
    "rel" : "canonical",
    "href" : "http://<IM_REST_API_HOST>/km/api/{version}/contentRecommendations?limit=20&offset=0",
    "mediaType" : "application/json, application/xml",
    "method" : "GET"
  } ],
  "count" : 1
}
Back to Top