Get media
GET
/media/{id}
const url = 'https://api.colourbox.com/media/1';const options = {method: 'GET', headers: {Authorization: 'CBX-SIMPLE-TOKEN Token=<token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.colourbox.com/media/1 \ --header 'Authorization: CBX-SIMPLE-TOKEN Token=<token>'Get media document.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
integer
Responses
Section titled “Responses”Success
Media typeapplication/json
object
id
The media ID
integer
created
The time the media was uploaded to Colourbox
string
type
The media type
string
filename
The original filename of the media
string
file_md5
MD5 sum of the file
string
uploaded_by
The user ID of the user who uploaded the media, or null if that user no longer exists
integer
metadata
Part of the media information that can be edited after upload. See Return Value for details on content.
object
editorial
boolean
adult_content
boolean
keywords
object
en
Array<string>
title
object
da
string
en
string
de
string
description
object
da
string
en
string
de
string
iptc
The IPTC data embedded in the file, as extracted by exiftool
object
Keywords
Array<string>
Caption-Abstract
string
ApplicationRecordVersion
string
geolocation
object
source
string
longitude
string
latitude
string
Example
{ "id": 90909090, "created": "2014-03-06 12:59:10", "type": "stock", "filename": "COLOURBOX4747447.jpg", "file_md5": "5fe5b4ebfb16aa787c6fdaa3dce6f844", "uploaded_by": 42, "metadata": { "editorial": false, "adult_content": false, "keywords": { "en": [ "attractive", "beach", "beautiful" ] }, "title": { "da": "Ung smuk blond kvinde med hat på en strand", "en": "Young beautiful blond woman with hat on a beach", "de": "Junge schöne blonde Frau mit Hut am Strand" }, "description": { "de": "Junge schiöne blonde Frau mit Hut zu Fuß entlang am Strand Blick auf das Meer", "en": "Young beautiful blond woman with hat walking along on a beach looking at the sea", "da": "Ung smuk blond kvinde med hat går på en strand og ser på havet" }, "iptc": { "Keywords": [ "attractive", "beach", "beautiful" ], "Caption-Abstract": "Young beautiful blond woman with hat on a beach", "ApplicationRecordVersion": 0 }, "geolocation": null }}