getMediaContents
get
/ccadmin/v1/files/mediaContents
Get Media Contents. Get a list of media folder contents. Optionally takes the x-ccasset-language header to get translated content in another language.
Request
Supported Media Types
- application/json
Query Parameters
- filter
-
Type:
stringText string to apply to name field to filter results.- folder
Type:stringRequired:trueOne of: all, products, collections or general.- includeOnlyWhitelisted
Type:booleanIf true, include only whitelisted file types in the response.- limit
Type:integerQuery limit.- metadata
Type:stringSeo meta info for product. Following are the fields supported by this param: |Field|Type|Description| |------------------|------------------|------------------| |altText|string|Alt text for product image.| |titleText|string|Title text for product image.|- offset
Type:integerQuery offset.- sort
Type:stringRequired:trueA sort directive in the form: field:direction where direction is asc or desc.Header Parameters- X-CCAsset-Language
-
Type:
stringThe asset language of the request
Response
Supported Media Types- application/json
200 ResponseFollowing model is returned when operation succeeds.BodyRoot Schema : getMediaContents_response- items
-
Type:
arrayitemsResult items. - limit
-
Type:
integerQuery limit. - links
-
Type:
arraylinksList of navigation links. - metadata
-
Type:
objectmetadataSeo meta info for product. - offset
-
Type:
integerQuery offset. - sort
-
Type:
arraysortSort directive. - total
-
Type:
integerTotal items found by query. Deprecated. - totalResults
-
Type:
integerTotal items found by query.
Nested Schema : metadataType:objectSeo meta info for product.- altText
-
Type:
stringAlt text for product image. - titleText
-
Type:
stringTitle text for product image.
Nested Schema : itemsType:object- checksum
-
Type:
integerFile checksum. - extension
-
Type:
stringFile extension. - lastModified
-
Type:
stringLast modified date and time. - metadata
-
Type:
objectmetadataSeo meta info for image. - name
-
Type:
stringFile name without path. - path
-
Type:
stringFull path to file, including name. - repositoryId
-
Type:
stringThe repository id of the file. - size
-
Type:
integerFile size in bytes. - type
-
Type:
stringThe item type; file or directory.
Nested Schema : metadataType:objectSeo meta info for image.- altText
-
Type:
stringAlt text for image. - titleText
-
Type:
stringTitle text for image.
Nested Schema : itemsType:object- href
-
Type:
stringThe URL of the link. - rel
-
Type:
stringThe link's relation to the current page of results: next, prev or self.
Nested Schema : itemsType:object- order
-
Type:
stringSort order. - property
-
Type:
stringSort property.
Example application/json
{ "total":1, "metadata":{ "altText":"city background", "titleText":"city background" }, "offset":0, "limit":250, "links":[ { "rel":"self", "href":"http://localhost:9080/ccadminui/v1/files/mediaContents?folder=all&sort=name%3Aasc&filter=city" } ], "sort":[ { "property":"name", "order":"asc" } ], "items":[ { "path":"/general/city-background.jpg", "extension":"jpg", "size":102568, "name":"city-background.jpg", "checksum":4.9987243387919718E18, "repositoryId":"/general/city-background.jpg", "lastModified":"2014-12-16 12:28:14.0", "type":"file" } ] }Default ResponseThe error response. The following are the internal error codes thrown by this API when the request processing fails in Oracle Commerce Cloud: |Error Code|Description| |------------------|------------------| |33114|There was an error while attempting to execute the query.| |33112|There was an error while attempting to create the query.| |33113|There was an error while attempting to get the storage system view.| |33110|The "folder" param must be a valid folder.| |33111|Storage system does not support this query.| |33109|The "folder" param is required.| |33108|The "q" param is not allowed.|BodyRoot Schema : errorModelType:object- devMessage
-
Type:
stringAn optional non-localized message containing technical information for developers - errorCode
-
Type:
stringThe numerical code identifying the error - errors
-
Type:
arrayerrorsAn optional list of errors if multiple errors were encountered - message
-
Type:
stringThe localized message describing the error - moreInfo
-
Type:
stringAn optional non-localized message with more information - o:errorPath
-
Type:
stringAn optional machine readable description of where the error occurred - status
-
Type:
stringThe HTTP status code - type
-
Type:
stringThe URI to the HTTP state code definition
Nested Schema : errorsNested Schema : itemsType:object- devMessage
-
Type:
stringAn optional non-localized message containing technical information for developers - errorCode
-
Type:
stringThe numerical code identifying the error - message
-
Type:
stringThe localized message describing the error - moreInfo
-
Type:
stringAn optional non-localized message with more information - o:errorPath
-
Type:
stringAn optional machine readable description of where the error occurred - status
-
Type:
stringThe HTTP status code
Examples
Sample Response Payload returned by endpoint:
{ "total": 1, "metadata": { "altText": "city background", "titleText": "city background" }, "offset": 0, "limit": 250, "links": [{ "rel": "self", "href": "http://localhost:9080/ccadminui/v1/files/mediaContents?folder=all&sort=name%3Aasc&filter=city" }], "sort": [{ "property": "name", "order": "asc" }], "items": [{ "path": "/general/city-background.jpg", "extension": "jpg", "size": 102568, "name": "city-background.jpg", "checksum": 4998724338791972000, "repositoryId": "/general/city-background.jpg", "lastModified": "2014-12-16 12:28:14.0", "type": "file" }] }