younifyd
Menu

Get A File

Get a File

GET/v2/files/{fileID}

Use it in a workflow

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

Request

Path parameters

fileIDstringrequired

The unique identifier for a file.

Response

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

dataobject
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.

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"
    }
  }
}

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

Was this page helpful?