Search Assets
curl --request GET \
--url https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/assetsimport requests
url = "https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/assets"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/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_URL => "https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/assets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/assets"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/assets")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/assets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyAsset Searching
Search Assets
Search and filter assets with query parameters
GET
/
app
/
v1
/
organizations
/
{organizationId}
/
projects
/
{projectId}
/
assets
Search Assets
curl --request GET \
--url https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/assetsimport requests
url = "https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/assets"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/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_URL => "https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/assets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/assets"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/assets")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/assets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyPath Parameters
Organization ID
Project ID
Query Parameters
Pagination cursor from previous response
Items per page (default: 10)
Filter by MIME type (e.g.,
image/jpeg, video/mp4)Filter by tag IDs (comma-separated)
Filter by status:
active or deletedSearch term for name/description
Sort field and direction (e.g.,
name:asc, createdAt:desc)Updated date range start (ISO 8601 format)
Updated date range end (ISO 8601 format)
Response
Returns a paginated list of Asset objects.{
"data": [
{
"id": "asset123",
"name": "hero-image.jpg",
"type": "image/jpeg",
"size": 245760,
"url": "https://cdn.metabind.ai/assets/asset123/hero-image.jpg",
"status": "active",
"tags": ["tag1", "tag2"],
"metadata": {
"width": 1920,
"height": 1080
},
"createdAt": "2024-03-20T10:00:00Z",
"updatedAt": "2024-03-21T15:30:00Z"
}
],
"pagination": {
"lastKey": "eyJwayI6Ik9SR..."
}
}
Code Examples
curl -X GET "https://api.metabind.ai/app/v1/organizations/org123/projects/proj456/assets?type=image/jpeg&sort=createdAt:desc&limit=10" \
-H "Authorization: Bearer YOUR_JWT"
const response = await fetch(
'https://api.metabind.ai/app/v1/organizations/org123/projects/proj456/assets?type=image/jpeg&sort=createdAt:desc',
{
headers: {
'Authorization': 'Bearer YOUR_JWT'
}
}
);
const { data, pagination } = await response.json();
console.log(`Found ${data.length} assets`);
var components = URLComponents(string: "https://api.metabind.ai/app/v1/organizations/org123/projects/proj456/assets")!
components.queryItems = [
URLQueryItem(name: "type", value: "image/jpeg"),
URLQueryItem(name: "sort", value: "createdAt:desc")
]
var request = URLRequest(url: components.url!)
request.setValue("Bearer YOUR_JWT", forHTTPHeaderField: "Authorization")
let (data, _) = try await URLSession.shared.data(for: request)
let result = try JSONDecoder().decode(AssetListResponse.self, from: data)
val response = client.get("https://api.metabind.ai/app/v1/organizations/org123/projects/proj456/assets") {
header("Authorization", "Bearer YOUR_JWT")
parameter("type", "image/jpeg")
parameter("sort", "createdAt:desc")
}
val result = response.body<AssetListResponse>()
println("Found ${result.data.size} assets")
⌘I