List Content
curl --request GET \
--url https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/contentimport requests
url = "https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/content"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/content', 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}/content",
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}/content"
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}/content")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/content")
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_body{
"data": [
{}
],
"pagination": {}
}Content
List Content
Retrieve a list of content items with filtering and sorting
GET
/
app
/
v1
/
organizations
/
{organizationId}
/
projects
/
{projectId}
/
content
List Content
curl --request GET \
--url https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/contentimport requests
url = "https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/content"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/content', 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}/content",
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}/content"
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}/content")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/content")
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_body{
"data": [
{}
],
"pagination": {}
}The Content API provides flexible search with both simple query parameters and advanced filtering through request bodies.
Path Parameters
string
required
Organization ID
string
required
Project ID
Query Parameters
number
default:"20"
Items per page
string
Cursor for pagination (from previous response)
string
Filter by ContentType ID
string
Filter by tags (comma-separated)
string
Filter by status:
draft, modified, published, unpublished, or deletedstring
Full-text search term
string
Natural language query for semantic search
string
Filter by template status (
true or false)string
Filter by folder ID (use
null to get unfiled content)Response
Content[]
Array of content objects
object
Pagination information
Example Response
{
"data": [
{
"id": "cont124",
"typeId": "ct123",
"typeVersion": 2,
"version": 1,
"lastPublishedVersion": 1,
"packageVersion": "1.0.0",
"name": "Getting Started Guide",
"status": "published",
"isTemplate": false,
"content": { ... },
"tags": ["Tutorial"],
"metadata": {
"author": "jane.doe@metabind.ai",
"locale": "en-US"
},
"createdAt": "2024-03-21T10:00:00Z",
"updatedAt": "2024-03-21T14:30:00Z"
}
],
"pagination": {
"lastKey": "eyJwayI6Ik9SR..."
}
}
Advanced Filtering (POST Method)
For complex queries, use the POST method with a JSON request body:POST /app/v1/organizations/{organizationId}/projects/{projectId}/content
Request Body
{
"filter": {
"type": {
"eq": "article"
},
"tags": {
"all": ["technology", "ai"]
},
"status": {
"eq": "published"
},
"metadata.author": {
"eq": "jane.doe@metabind.ai"
},
"createdAt": {
"gte": "2024-01-01T00:00:00Z",
"lte": "2024-12-31T23:59:59Z"
}
},
"sort": [
{ "field": "updatedAt", "order": "desc" },
{ "field": "name", "order": "asc" }
],
"page": 1,
"limit": 20
}
Filter Operators
| Operator | Description | Example |
|---|---|---|
eq | Equals | {"status": {"eq": "published"}} |
neq | Not equals | {"status": {"neq": "deleted"}} |
in | In array | {"typeId": {"in": ["article", "blog"]}} |
all | Contains all values (tags) | {"tags": {"all": ["featured", "news"]}} |
any | Contains any values (tags) | {"tags": {"any": ["tech", "ai"]}} |
gte | Greater than or equal (date) | {"updatedAt": {"gte": "2024-01-01"}} |
lte | Less than or equal (date) | {"updatedAt": {"lte": "2024-12-31"}} |
gt | Greater than (date) | {"updatedAt": {"gt": "2024-01-01"}} |
lt | Less than (date) | {"updatedAt": {"lt": "2024-12-31"}} |
like | Pattern matching (name) | {"name": {"like": "intro"}} |
Available Sort Fields
| Field | Description |
|---|---|
updatedAt | Sort by last modification date (only field supported) |
When no sort is specified, content is sorted by
updatedAt:desc by default.Code Examples
curl -X GET "https://api.metabind.ai/app/v1/organizations/org123/projects/proj456/content?type=article&status=published&sort=updatedAt:desc" \
-H "Authorization: Bearer YOUR_JWT"
curl -X POST "https://api.metabind.ai/app/v1/organizations/org123/projects/proj456/content" \
-H "Authorization: Bearer YOUR_JWT" \
-H "Content-Type: application/json" \
-d '{
"filter": {
"tags": { "all": ["technology", "ai"] },
"status": { "eq": "published" }
},
"sort": [{ "field": "updatedAt", "order": "desc" }]
}'
// Simple query
const response = await fetch(
'https://api.metabind.ai/app/v1/organizations/org123/projects/proj456/content?status=published',
{
headers: {
'Authorization': 'Bearer YOUR_JWT'
}
}
);
// Advanced query
const advancedResponse = await fetch(
'https://api.metabind.ai/app/v1/organizations/org123/projects/proj456/content',
{
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_JWT',
'Content-Type': 'application/json'
},
body: JSON.stringify({
filter: {
tags: { all: ['technology', 'ai'] },
status: { eq: 'published' }
}
})
}
);
const { data: content, pagination } = await response.json();
console.log(`Found ${content.length} content items`);