younifyd
Menu

Get All Files

Get all Files

GET/v2/files

Use it in a workflow

  1. Add a step and choose the Elastic Path connector.
  2. Pick the Get All Files action (under Files).
  3. Fill in the fields below, then reference the result from later steps as {{getAllFiles.response.data}}.

Request

Query parameters

filterstring (string)

Filtering is available for this endpoint. See [Filtering](/docs/api/pxm/files/get-all-files#filtering).

page[limit]string (int64)

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**](/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used.

page[offset]string (int64)

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**](/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used.

Response

Returns 200 with an object. Read it in later steps with {{getAllFiles.response.data.<field>}}.

dataarray<object>
idstring (uuid)
typestring

The type represents the object being returned.

file_namestring

The name of the file.

mime_typestring

The mime type of the file.

file_sizeinteger

The size of the file. Required when uploading files.

publicboolean

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

metaobject2 fields
linksobject1 fields

Links are used to allow you to move between requests.

linkobject1 fields

The publicly available URL for this file.

metaobject
pageobject4 fields

Contains the results for the entire collection.

resultsobject1 fields

Contains the results for the entire collection.

linksobject

Links are used to allow you to move between requests.

selfstring | null

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

currentstring | null

The current page.

firststring | null

Always the first page.

laststring | null

This is `null` if there is only one page.

prevstring | null

The previous page. This is `null` if on the first page.

nextstring | null

The next page. This is `null` if there is no next page.

json
{
  "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",
    "current": "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",
    "prev": "https://useast.api.elasticpath.com/v2/files?page[offset]=0&page[limit]=100",
    "next": "https://useast.api.elasticpath.com/v2/files?page[offset]=100&page[limit]=100"
  }
}

Need more? See the Elastic Path guide for connection setup and behaviour shared by every action.

Was this page helpful?