Get media

get

/km/api/v1/media

This method returns the list of files in the repository the user has access to.

Example URIs

The nameTokenSearchType parameter value will be applied only if the nameToken parameter is specified as well.

The default value of the nameTokenSearchType is CONTAINS if the nameToken is set by itself.

The relativePath and nameToken may be combined or specified separately.

Following are the example URIs for this method:

  • http://<IM_REST_API_HOST>/km/api/latest/media?nameToken=fileName

    The request returns a list of files that contains the string specified by the nameToken query parameter.

  • http://<IM_REST_API_HOST>/km/api/latest/media?relativePath=path

    The request returns a list of files that are located in or under the relativePath parameter value.

  • http://<IM_REST_API_HOST>/km/api/latest/media?relativePath=path&nameToken=fileName&nameTokenSearchType=STARTS_WITH

    The request returns a list of files that are located in or under the relativePath parameter value where the file's name starts with the passed in value of the nameToken.

Request

Supported Media Types
Query Parameters
Back to Top

Response

Supported Media Types

200 Response

OK.
Body ()
Root Schema : ResultList MediaItem
Type: object
Title: ResultList MediaItem
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 MediaItem-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 : MediaItem
Type: object
Title: MediaItem
Show Source
Back to Top

Examples

The following example shows how to find a list of media files in the Oracle Knowledge repository by submitting a GET request on the REST resource using cURL.

cURL Command Example

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

Example of Request Header

The following shows an example of the request header.

-H "kmauthtoken: {\"siteName\":\"ORACLE_KNOWLEDGE\",\"integrationUserToken\":\"\"+eCJYkxKwj5HUaIiJYun0/TpatwT1LmtcsF05W33xnEojifV/AsLDj9RpN0lKuorTMNKeSE1tgC7svVL+BzntqDON4KiM1HFlpxvXEUCB0P2w0Xrs75McygqxdVaDSE9",\"userToken\":\"vS7CbxXcItaVWh3koKSYt3VzA5mEgPbW0xnGb1QFZXh3bo6+qUxTh2TWtgJKKe9Khc54JaIsA7cbGU7wHIViiAe+qcWYmqX9ilX1qEehL3AXxkQi6p6tG+avlJOqn+A9qYZXiWmw9jbh8BMsP62oiQ=="}" \
-H "Accept: application/json"

Response Body Example

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

{
  "items" : [ {
    "fileName" : "FILENAME_VALUE",
    "relativePath" : "RELATIVEPATH_VALUE",
    "resourceURL" : "RESOURCEURL_VALUE",
    "thumbnailURL" : "THUMBNAILURL_VALUE",
    "errorMessage" : "ERRORMESSAGE_VALUE"
  }, {
    "fileName" : "FILENAME_VALUE",
    "relativePath" : "RELATIVEPATH_VALUE",
    "resourceURL" : "RESOURCEURL_VALUE",
    "thumbnailURL" : "THUMBNAILURL_VALUE",
    "errorMessage" : "ERRORMESSAGE_VALUE"
  }, {
    "fileName" : "FILENAME_VALUE",
    "relativePath" : "RELATIVEPATH_VALUE",
    "resourceURL" : "RESOURCEURL_VALUE",
    "thumbnailURL" : "THUMBNAILURL_VALUE",
    "errorMessage" : "ERRORMESSAGE_VALUE"
  } ],
  "hasMore" : false,
  "limit" : 20,
  "offset" : 0,
  "count" : 3
}
Back to Top