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: string
Text string to apply to name field to filter results.
-
folder(required): string
One of: all, products, collections or general.
-
includeOnlyWhitelisted: boolean
If true, include only whitelisted file types in the response.
-
limit: integer
Query limit.
-
metadata: string
Seo 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: integer
Query offset.
-
sort(required): string
A sort directive in the form: field:direction where direction is asc or desc.
Header Parameters
-
X-CCAsset-Language: string
The asset language of the request
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Root Schema : getMediaContents_response
Type:
Show Source
object
-
items:
array items
Result items.
-
limit:
integer
Query limit.
-
links:
array links
List of navigation links.
-
metadata:
object metadata
Seo meta info for product.
-
offset:
integer
Query offset.
-
sort:
array sort
Sort directive.
-
total:
integer
Total items found by query. Deprecated.
-
totalResults:
integer
Total items found by query.
Nested Schema : metadata
Type:
object
Seo meta info for product.
Show Source
-
altText:
string
Alt text for product image.
-
titleText:
string
Title text for product image.
Nested Schema : items
Type:
Show Source
object
-
checksum:
integer
File checksum.
-
extension:
string
File extension.
-
lastModified:
string
Last modified date and time.
-
metadata:
object metadata
Seo meta info for image.
-
name:
string
File name without path.
-
path:
string
Full path to file, including name.
-
repositoryId:
string
The repository id of the file.
-
size:
integer
File size in bytes.
-
type:
string
The item type; file or directory.
Nested Schema : metadata
Type:
object
Seo meta info for image.
Show Source
-
altText:
string
Alt text for image.
-
titleText:
string
Title text for image.
Nested Schema : items
Type:
Show Source
object
-
href:
string
The URL of the link.
-
rel:
string
The link's relation to the current page of results: next, prev or self.
Nested Schema : items
Type:
Show Source
object
-
order:
string
Sort order.
-
property:
string
Sort property.
Example Response (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":"4998724338791971800",
"repositoryId":"/general/city-background.jpg",
"lastModified":"2014-12-16 12:28:14.0",
"type":"file"
}
]
}
Default Response
The 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.|
Root Schema : errorModel
Type:
Show Source
object
-
devMessage:
string
An optional non-localized message containing technical information for developers
-
errorCode:
string
The numerical code identifying the error
-
errors:
array errors
An optional list of errors if multiple errors were encountered
-
message:
string
The localized message describing the error
-
moreInfo:
string
An optional non-localized message with more information
-
o:errorPath:
string
An optional machine readable description of where the error occurred
-
status:
string
The HTTP status code
-
type:
string
The URI to the HTTP state code definition
Nested Schema : errors
Type:
array
An optional list of errors if multiple errors were encountered
Show Source
Nested Schema : items
Type:
Show Source
object
-
devMessage:
string
An optional non-localized message containing technical information for developers
-
errorCode:
string
The numerical code identifying the error
-
message:
string
The localized message describing the error
-
moreInfo:
string
An optional non-localized message with more information
-
o:errorPath:
string
An optional machine readable description of where the error occurred
-
status:
string
The HTTP status code