curl --request GET \
--url https://{defaultHost}/v1/medias/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://{defaultHost}/v1/medias/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{defaultHost}/v1/medias/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{defaultHost}/v1/medias/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{defaultHost}/v1/medias/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{defaultHost}/v1/medias/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{defaultHost}/v1/medias/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "bf83840d-0261-46ff-9a1e-ea1d74264857",
"object": "media",
"alt": null,
"byte_size": 12254,
"content_type": "image/png",
"extension": "png",
"filename": "test.png",
"height": null,
"public_access": false,
"release_json": null,
"title": null,
"url": null,
"width": null,
"url_expires_at": null,
"created_at": 1787228413,
"updated_at": 1787228413
}Retrieve
Retrieves details of a specific media.
curl --request GET \
--url https://{defaultHost}/v1/medias/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://{defaultHost}/v1/medias/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{defaultHost}/v1/medias/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{defaultHost}/v1/medias/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{defaultHost}/v1/medias/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{defaultHost}/v1/medias/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{defaultHost}/v1/medias/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "bf83840d-0261-46ff-9a1e-ea1d74264857",
"object": "media",
"alt": null,
"byte_size": 12254,
"content_type": "image/png",
"extension": "png",
"filename": "test.png",
"height": null,
"public_access": false,
"release_json": null,
"title": null,
"url": null,
"width": null,
"url_expires_at": null,
"created_at": 1787228413,
"updated_at": 1787228413
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Query Parameters
Sets how long a private media URL should be valid for, in seconds. The max value allowed is 86400 or 24 hours. When exposing a media through a purchase or license the default value is 900 or 15 minutes.
Response
Success
The UUID of the specific object.
A string describing the object type returned.
The size of the media in bytes.
The content type (i.e. image/png, image/jpg, application/pdf).
The extension (i.e. png, jpg, pdf).
The full filename with extension.
If the media is an image, this will be the height in pixels.
Whether or not this media is publicly accessible.
The JSON that was extracted from the release.json file within the ZIP file.
The URL for accessing this media. If the media is public, this will be a permanent URL. If the media is private, this will be a short-lived URL if the media has been exposed.
The time at which the URL expires. This will only be present if the media is private and has been exposed.
If the media is an image, this will be the width in pixels.
Time at which the object was created. Measured in seconds since the Unix epoch.
Time at which the object was last updated. Measured in seconds since the Unix epoch.
Was this page helpful?