Show examples in:
Javascript HTTP
Endpoint info
Available examples

Content Management API > Upload

Retrieve an upload

Returns

Returns a resource object of type upload.

Examples

1
GET https://site-api.datocms.com/uploads/:upload_id HTTP/1.1
2
Authorization: Bearer YOUR-API-TOKEN
3
Accept: application/json
4
X-Api-Version: 3
Terminal window
1
curl -g 'https://site-api.datocms.com/uploads/:upload_id' \
2
\
3
-H "Authorization: Bearer YOUR-API-TOKEN" \
4
-H "Accept: application/json" \
5
-H "X-Api-Version: 3"
1
await fetch("https://site-api.datocms.com/uploads/:upload_id", {
2
headers: {
3
Authorization: "Bearer YOUR-API-TOKEN",
4
Accept: "application/json",
5
"X-Api-Version": "3",
6
},
7
});
1
HTTP/1.1 200 OK
2
Content-Type: application/json
3
Cache-Control: cache-control: max-age=0, private, must-revalidate
4
X-RateLimit-Limit: 30
5
X-RateLimit-Remaining: 28
6
7
{
8
"data": {
9
"type": "upload",
10
"id": "q0VNpiNQSkG6z0lif_O1zg",
11
"attributes": {
12
"size": 444,
13
"width": 30,
14
"height": 30,
15
"path": "/45/1496845848-digital-cats.jpg",
16
"basename": "digital-cats",
17
"filename": "digital-cats.jpg",
18
"url": "https://www.datocms-assets.com/45/1496845848-digital-cats.jpg",
19
"format": "jpg",
20
"author": "Mark Smith",
21
"copyright": "2020 DatoCMS",
22
"notes": "Nyan the cat",
23
"md5": "873c296d0f2b7ee569f2d7ddaebc0d33",
24
"duration": 62,
25
"frame_rate": 30,
26
"blurhash": "LEHV6nWB2yk8pyo0adR*.7kCMdnj",
27
"thumbhash": "UhqCDQIkrHOfVG8wBa2v39z7CXeqZWFLdg==",
28
"mux_playback_id": "a1B2c3D4e5F6g7H8i9",
29
"mux_mp4_highest_res": "high",
30
"default_field_metadata": {
31
"en": {
32
"title": "this is the default title",
33
"alt": "this is the default alternate text",
34
"custom_data": {
35
"foo": "bar"
36
},
37
"focal_point": {
38
"x": 0.5,
39
"y": 0.5
40
}
41
}
42
},
43
"is_image": true,
44
"created_at": "2020-04-21T07:57:11.124Z",
45
"updated_at": "2020-04-21T07:57:11.124Z",
46
"mime_type": "image/jpeg",
47
"tags": [
48
"cats"
49
],
50
"smart_tags": [
51
"robot-cats"
52
],
53
"exif_info": {
54
"iso": 10000,
55
"model": "ILCE-7",
56
"flash_mode": 16,
57
"focal_length": 35,
58
"exposure_time": 0.0166667
59
},
60
"colors": [
61
{
62
"red": 206,
63
"green": 203,
64
"blue": 167,
65
"alpha": 255
66
},
67
{
68
"red": 158,
69
"green": 163,
70
"blue": 93,
71
"alpha": 255
72
}
73
]
74
},
75
"relationships": {
76
"creator": {
77
"data": {
78
"type": "account",
79
"id": "312"
80
}
81
},
82
"upload_collection": {
83
"data": {
84
"type": "upload_collection",
85
"id": "uinr2zfqQLeCo_1O0-ao-Q"
86
}
87
}
88
}
89
}
90
}