Skip to main content

Get all Files

GET 

https://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.

AttributeTypeOperatorsExample
file_namestringeq / likeeq(file_name, my_image.jpg)
widthintegergt / ge / lt / legt(width,200)
heightintegergt / ge / lt / lelt(height,500)
file_sizeintegergt / ge / lt / lele(file_size,20953)

Request

Query Parameters

    filter string

    Filtering is available for this endpoint. See Filtering.

    page[limit] int64

    Possible values: >= 0 and <= 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: >= 0 and <= 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

OK

Schema
    data File[]
  • Array [
  • idstring<uuid>

    The unique identifier for this file.

    Example: 00000000-0000-0000-0000-000000000000
    typestring

    The type represents the object being returned.

    Example: file
    file_namestring

    The name of the file.

    Example: file_name.jpg
    mime_typestring

    The mime type of the file.

    Example: image/jpeg
    file_sizeinteger

    The size of the file. Required when uploading files.

    Example: 36000
    publicboolean

    DEPRECATED Whether the file public or not. Required when uploading files.

    Example: true
    meta FileMeta
    timestamps object

    The date and time the file was created.

    created_atstring

    The date and time the file was created.

    Example: 2023-10-11T13:02:25.293Z
    dimensions object

    The file dimensions.

    widthinteger

    The width of the file.

    Example: 1800
    heightinteger

    The height of the file.

    Example: 1000
    links object

    Links are used to allow you to move between requests.

    selfstring

    Single entities use a self parameter with a link to that specific resource.

    Example: https://https://euwest.api.elasticpath.com//v2/files/ddc28c74-a7df-46be-b262-8fa69a6e7d52
    link object

    The publicly available URL for this file.

    hrefstring

    The publicly available URL for this file.

    Example: https://files-eu.epusercontent.com/e8c53cb0-120d-4ea5-8941-ce74dec06038/f8cf26b3-6d38-4275-937a-624a83994702.png
  • ]
  • meta ResultsMeta
    page object

    Contains the results for the entire collection.

    limitinteger

    The maximum number of records for all pages.

    Example: 100
    offsetinteger

    The current offset by number of pages.

    Example: 0
    currentinteger

    The current number of pages.

    Example: 1
    totalinteger

    The total number of records for the entire collection.

    Example: 1
    results object

    Contains the results for the entire collection.

    totalinteger

    The total number of records for the entire collection.

    Example: 1
    links object

    Links are used to allow you to move between requests.

    selfstring | nullnullable

    Single entities use a self parameter with a link to that specific resource.

    Example: https://useast.api.elasticpath.com/v2/files?page[offset]=0&page[limit]=100
    firststring | nullnullable

    Always the first page.

    Example: https://useast.api.elasticpath.com/v2/files?page[offset]=0&page[limit]=100
    laststring | nullnullable

    This is null if there is only one page.

    Example: https://useast.api.elasticpath.com/v2/files?page[offset]=10&page[limit]=100

Authorization: http

name: bearerAuthtype: httpscheme: bearer
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://https://euwest.api.elasticpath.com/v2/files");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <token>");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Request Collapse all
Base URL
https://https://euwest.api.elasticpath.com
Auth
Parameters
— query
— query
— query
ResponseClear

Click the Send API Request button above and see the response here!