Skip to content

Get an Asset

Retrieves a single media file by its UUID or filename.

GET /api/{projectId}/files/{identifier}

The identifier can be either the asset’s UUID or its filename.

Parameters

ParameterTypeDescription
projectIduuidYour project UUID
identifierstringAsset UUID or filename

Request

Terminal window
# By UUID
curl https://your-domain.com/api/{projectId}/files/img-uuid-1234 \
-H "Authorization: Bearer YOUR_API_TOKEN"
# By filename
curl https://your-domain.com/api/{projectId}/files/hero.jpg \
-H "Authorization: Bearer YOUR_API_TOKEN"

Response

{
"uuid": "img-uuid-1234",
"filename": "hero.jpg",
"original_filename": "hero-image.jpg",
"mime_type": "image/jpeg",
"size": 204800,
"url": "/uploads/media/abc123/hero.jpg",
"created_at": "2024-01-15T10:00:00+00:00"
}

Status codes

StatusDescription
200Success
404Asset not found