Get all Files
GET/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
Filtering is available for this endpoint. See Filtering.
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.
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
- Array [
- ]
data File[]
The unique identifier for this file.
The type represents the object being returned.
The name of the file.
The mime type of the file.
The size of the file. Required when uploading files.
DEPRECATED Whether the file public or not. Required when uploading files.
meta FileMeta
timestamps object
The date and time the file was created.
The date and time the file was created.
dimensions object
The file dimensions.
The width of the file.
The height of the file.
links object
Links are used to allow you to move between requests.
Single entities use a self parameter with a link to that specific resource.
link object
The publicly available URL for this file.
The publicly available URL for this file.
meta ResultsMeta
page object
Contains the results for the entire collection.
The maximum number of records for all pages.
The current offset by number of pages.
The current number of pages.
The total number of records for the entire collection.
results object
Contains the results for the entire collection.
The total number of records for the entire collection.
links object
Links are used to allow you to move between requests.
Single entities use a self parameter with a link to that specific resource.
Always the first page.
This is null
if there is only one page.
{
"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
- Array [
- ]
errors Error[]required
The HTTP response code of the error.
A brief summary of the error.
Optional additional detail about the error.
Internal request ID.
Additional supporting meta data for the error.
{
"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"
}
]
}