Get all Files
GEThttps://https://euwest.api.elasticpath.com/v2/files
Retrieves all files.
Filtering
For general filtering syntax, see Filtering.
The following operators and attributes are available when filtering on this endpoint.
Attribute | Type | Operators | Example |
---|---|---|---|
file_name | string | eq / like | eq(file_name, my_image.jpg) |
width | integer | gt / ge / lt / le | gt(width,200) |
height | integer | gt / ge / lt / le | lt(height,500) |
file_size | integer | gt / ge / lt / le | le(file_size,20953) |
Request
Query Parameters
filter string
Filtering is available for this endpoint. See Filtering.
page[limit] int64
Possible values: <= 10000
The maximum number of records per page for this response. You can set this value up to 100. If no page size is set, the the page length store setting is used.
page[offset] int64
Possible values: <= 10000
The current offset by number of records, not pages. Offset is zero-based. The maximum records you can offset is 10,000. If no page size is set, the page length store setting is used.
Responses
- 200
- 500
OK
- application/json
- Schema
- Example (from schema)
- default
Schema
data File[]
meta ResultsMeta
links object
{
"data": [
{
"id": "00000000-0000-0000-0000-000000000000",
"type": "file",
"file_name": "file_name.jpg",
"mime_type": "image/jpeg",
"file_size": 36000,
"public": true,
"meta": {
"timestamps": {
"created_at": "2023-10-11T13:02:25.293Z"
},
"dimensions": {
"width": 1800,
"height": 1000
}
},
"links": {
"self": "https://https://euwest.api.elasticpath.com//v2/files/ddc28c74-a7df-46be-b262-8fa69a6e7d52"
},
"link": {
"href": "https://files-eu.epusercontent.com/e8c53cb0-120d-4ea5-8941-ce74dec06038/f8cf26b3-6d38-4275-937a-624a83994702.png"
}
}
],
"meta": {
"page": {
"limit": 100,
"offset": 0,
"current": 1,
"total": 1
},
"results": {
"total": 1
}
},
"links": {
"self": "https://useast.api.elasticpath.com/v2/files?page[offset]=0&page[limit]=100",
"first": "https://useast.api.elasticpath.com/v2/files?page[offset]=0&page[limit]=100",
"last": "https://useast.api.elasticpath.com/v2/files?page[offset]=10&page[limit]=100"
}
}
{
"data": [
{
"type": "file",
"id": "f8cf26b3-6d38-4275-937a-624a83994702",
"link": {
"href": "https://files-eu.epusercontent.com/e8c53cb0-120d-4ea5-8941-ce74dec06038/f8cf26b3-6d38-4275-937a-624a83994702.png"
},
"file_name": "f6669358-85db-4367-9cde-1deb77acb5f4.png",
"mime_type": "image/png",
"file_size": 110041,
"meta": {
"dimensions": {
"width": 1000,
"height": 1000
},
"timestamps": {
"created_at": "2018-03-13T13:45:21.673Z"
}
},
"links": {
"self": "https://useast.api.elasticpath.com/v2/files/f8cf26b3-6d38-4275-937a-624a83994702"
}
}
],
"links": {
"self": "https://useast.api.elasticpath.com/v2/files?page[offset]=0&page[limit]=100&filter=",
"first": "https://useast.api.elasticpath.com/v2/files?page[offset]=0&page[limit]=100&filter=",
"last": null
},
"meta": {
"page": {
"limit": 100,
"offset": 0,
"current": 1,
"total": 1
},
"results": {
"total": 1
}
}
}
Internal server error. There was a system failure in the platform.
- application/json
- Schema
- Example (from schema)
- internal-server-error
Schema
errors Error[]required
{
"errors": [
{
"status": 500,
"title": "Internal server error",
"detail": "An internal error has occurred.",
"request_id": "00000000-0000-0000-0000-000000000000",
"meta": {
"missing_ids": [
"e7d50bd5-1833-43c0-9848-f9d325b08be8"
]
}
}
]
}
{
"errors": [
{
"status": 500,
"title": "Internal Server Error",
"detail": "There was an internal server error, you can report with your request id.",
"request_id": "635da56d-75a1-43cd-b696-7ab119756b3a"
}
]
}
Authorization: http
name: bearerAuthtype: httpscheme: bearer
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L -X GET 'https://https://euwest.api.elasticpath.com/v2/files' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>'
ResponseClear