getFiles
get
/ccadmin/v1/files
Get Files. Get a list of uploaded files. Optionally takes the x-ccasset-language header to get translated content in another language.
Request
Supported Media Types
- application/json
Query Parameters
- assetType
-
Type:
string
Asset type to fetch. One of: all, file or folder. If omitted, defaults to 'file'.- filter
Type:string
Text string to apply to name field to filter results.- folder
Type:string
Required:true
The folder to list. Must be a valid upload folder.- limit
Type:integer
Query limit.- offset
Type:integer
Query offset.- sort
Type:string
Required:true
A sort directive in the form: field:direction where direction is asc or desc.Header Parameters- X-CCAsset-Language
-
Type:
string
The asset language of the request
Response
Supported Media Types- application/json
200 ResponseFollowing model is returned when operation succeeds.BodyRoot Schema : getFiles_response- items
-
Type:
array
itemsAdditional Properties Allowed:Result items. - limit
-
Type:
integer
Query limit. - links
-
Type:
array
linksAdditional Properties Allowed:List of navigation links. - offset
-
Type:
integer
Query offset. - sort
-
Type:
array
sortAdditional Properties Allowed:Sort directive. - total
-
Type:
integer
Total items found by query. Deprecated. - totalResults
-
Type:
integer
Total items found by query.
Nested Schema : itemsNested Schema : linksNested Schema : sortNested Schema : itemsType:object
- checksum
-
Type:
integer
File checksum. - extension
-
Type:
string
File extension. - lastModified
-
Type:
string
Last modified date and time. - metadata
-
Type:
object
metadataAdditional Properties Allowed:Seo meta info for file. - name
-
Type:
string
File name without path. - path
-
Type:
string
Full path to file, including name. - repositoryId
-
Type:
string
The repository id of the file. - size
-
Type:
integer
File size in bytes. - type
-
Type:
string
The item type. Set to 'file' for files.
Nested Schema : metadataType:object
Seo meta info for file.- altText
-
Type:
string
Alt text for image file. - titleText
-
Type:
string
Title text for image file.
Nested Schema : itemsType:object
- href
-
Type:
string
The URL of the link. - rel
-
Type:
string
The link's relation to the current page of results: next, prev or self.
Nested Schema : itemsType:object
- order
-
Type:
string
Sort order. - property
-
Type:
string
Sort property.
Example application/json
{ "total":1, "totalResults":1, "offset":0, "limit":40, "links":[ { "rel":"self", "href":"http://localhost:9080/ccadminui/v1/files?folder=%2Fgeneral&sort=name%3Aasc&filter=city&offset=0&limit=40" } ], "sort":[ { "property":"name", "order":"asc" } ], "items":[ { "path":"/general/city-background.jpg", "extension":"jpg", "metadata":{ }, "size":102568, "repositoryId":"/general/city-background.jpg", "name":"city-background.jpg", "checksum":4.9987243387919718E18, "lastModified":"2017-01-04T09:08:08.000Z", "type":"file", "url":"http://localhost:9080/file/v4998724338791971926/general/city-background.jpg" } ] }
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| |------------------|------------------| |33136|The "assetType" parameter value is invalid.| |33110|The "folder" param must be a valid folder.| |33109|The "folder" param is required.| |33108|The "q" param is not allowed.|BodyRoot Schema : errorModelType:object
- devMessage
-
Type:
string
An optional non-localized message containing technical information for developers - errorCode
-
Type:
string
The numerical code identifying the error - errors
-
Type:
array
errorsAdditional Properties Allowed:An optional list of errors if multiple errors were encountered - message
-
Type:
string
The localized message describing the error - moreInfo
-
Type:
string
An optional non-localized message with more information - o:errorPath
-
Type:
string
An optional machine readable description of where the error occurred - status
-
Type:
string
The HTTP status code - type
-
Type:
string
The URI to the HTTP state code definition
Nested Schema : errorsNested Schema : itemsType:object
- devMessage
-
Type:
string
An optional non-localized message containing technical information for developers - errorCode
-
Type:
string
The numerical code identifying the error - message
-
Type:
string
The localized message describing the error - moreInfo
-
Type:
string
An optional non-localized message with more information - o:errorPath
-
Type:
string
An optional machine readable description of where the error occurred - status
-
Type:
string
The HTTP status code
Examples
Sample Response Payload returned by endpoint:
{ "total": 1, "totalResults": 1, "offset": 0, "limit": 40, "links": [{ "rel": "self", "href": "http://localhost:9080/ccadminui/v1/files?folder=%2Fgeneral&sort=name%3Aasc&filter=city&offset=0&limit=40" }], "sort": [{ "property": "name", "order": "asc" }], "items": [{ "path": "/general/city-background.jpg", "extension": "jpg", "metadata": {}, "size": 102568, "repositoryId": "/general/city-background.jpg", "name": "city-background.jpg", "checksum": 4998724338791972000, "lastModified": "2017-01-04T09:08:08.000Z", "type": "file", "url": "http://localhost:9080/file/v4998724338791971926/general/city-background.jpg" }] }