Skip to main content

Get a File

GET 

https://https://euwest.api.elasticpath.com/v2/files/:fileID

Get a File

Request

Path Parameters

    fileID stringrequired

    The unique identifier for a file.

Responses

Schema
    data File
    iduuid

    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

Authorization: http

name: bearerAuthtype: httpscheme: bearer
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://https://euwest.api.elasticpath.com/v2/files/:fileID");
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
— pathrequired
ResponseClear

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

We use cookies to enhance your experience. By continuing to visit this site you agree to our use of cookies.