Search and browse assets
curl --request GET \
--url http://localhost:3000/api/v1/assets \
--header 'Authorization: Bearer <token>'import requests
url = "http://localhost:3000/api/v1/assets"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://localhost:3000/api/v1/assets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/api/v1/assets",
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 := "http://localhost:3000/api/v1/assets"
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("http://localhost:3000/api/v1/assets")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/api/v1/assets")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sha256": "<string>",
"filename": "<string>",
"mime": "<string>",
"size": 0,
"width": 0,
"height": 0,
"probe": {},
"metadata": {
"title": "<string>",
"description": "<string>",
"keywords": [
"<string>"
],
"creator": "<string>",
"copyright": "<string>",
"capturedAt": "<string>",
"camera": "<string>",
"lens": "<string>",
"gps": {
"lat": 123,
"lon": 123
}
},
"tags": [
"<string>"
],
"fields": {},
"inherited": {},
"status": "draft",
"state": "draft",
"deletedAt": "2023-11-07T05:31:56Z",
"stackId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": 0,
"current": true,
"proposedBy": "<string>",
"reviewNote": "<string>",
"proposedTags": [
"<string>"
],
"rights": {
"license": "<string>",
"territories": [
"<string>"
],
"channels": [
"<string>"
],
"embargo": "2023-12-25",
"expires": "2023-12-25",
"modelRelease": "released"
},
"origin": "shot",
"parentAssetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"generator": "<string>",
"prompt": "<string>",
"c2pa": {
"manifests": 0,
"generator": "<string>",
"title": "<string>",
"signedBy": "<string>",
"actions": [
"<string>"
],
"digitalSourceType": "<string>",
"softwareAgent": "<string>",
"ingredients": 0
},
"supersededBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"private": true,
"collections": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"total": 0,
"facets": {
"tags": [
{
"value": "<string>",
"count": 0
}
],
"types": [
{
"value": "<string>",
"count": 0
}
],
"states": [
{
"value": "<string>",
"count": 0
}
],
"fields": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"detail": "<unknown>"
}
}API Reference
Search and browse assets
Newest first without q. Custom fields filter as f.{key}={value} (repeat to OR) and f.{key}.gte / f.{key}.lte for numbers and dates. A filter on an unknown field is a 422. Of a stack of versions, only the current approved one is listed; GET /api/v1/assets//versions has the rest.
Scope: read.
GET
/
api
/
v1
/
assets
Search and browse assets
curl --request GET \
--url http://localhost:3000/api/v1/assets \
--header 'Authorization: Bearer <token>'import requests
url = "http://localhost:3000/api/v1/assets"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://localhost:3000/api/v1/assets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/api/v1/assets",
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 := "http://localhost:3000/api/v1/assets"
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("http://localhost:3000/api/v1/assets")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/api/v1/assets")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sha256": "<string>",
"filename": "<string>",
"mime": "<string>",
"size": 0,
"width": 0,
"height": 0,
"probe": {},
"metadata": {
"title": "<string>",
"description": "<string>",
"keywords": [
"<string>"
],
"creator": "<string>",
"copyright": "<string>",
"capturedAt": "<string>",
"camera": "<string>",
"lens": "<string>",
"gps": {
"lat": 123,
"lon": 123
}
},
"tags": [
"<string>"
],
"fields": {},
"inherited": {},
"status": "draft",
"state": "draft",
"deletedAt": "2023-11-07T05:31:56Z",
"stackId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": 0,
"current": true,
"proposedBy": "<string>",
"reviewNote": "<string>",
"proposedTags": [
"<string>"
],
"rights": {
"license": "<string>",
"territories": [
"<string>"
],
"channels": [
"<string>"
],
"embargo": "2023-12-25",
"expires": "2023-12-25",
"modelRelease": "released"
},
"origin": "shot",
"parentAssetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"generator": "<string>",
"prompt": "<string>",
"c2pa": {
"manifests": 0,
"generator": "<string>",
"title": "<string>",
"signedBy": "<string>",
"actions": [
"<string>"
],
"digitalSourceType": "<string>",
"softwareAgent": "<string>",
"ingredients": 0
},
"supersededBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"private": true,
"collections": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"total": 0,
"facets": {
"tags": [
{
"value": "<string>",
"count": 0
}
],
"types": [
{
"value": "<string>",
"count": 0
}
],
"states": [
{
"value": "<string>",
"count": 0
}
],
"fields": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"detail": "<unknown>"
}
}Authorizations
bearersession
An API key: ab_...
Query Parameters
Every word must match, each as a prefix
Repeat; assets carrying every tag
Repeat; assets of any of these types
Available options:
image, video, audio, font, document, other Only this collection: its id, or its name
Repeat; assets in any of these states. Without it, approved (active) and unexpired ones
Available options:
draft, proposed, active, expired, archived, rejected, deleted true: proposed assets and assets with suggested tags, whatever status says
Available options:
true, false Page size
Required range:
1 <= x <= 200Skip this many
Required range:
x >= 0