Get Content
curl --request GET \
--url https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/content/{id}import requests
url = "https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/content/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/content/{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://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/content/{id}",
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/{id}"
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/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/content/{id}")
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_bodyContent
Get Content
Retrieve a specific content item by ID
GET
/
app
/
v1
/
organizations
/
{organizationId}
/
projects
/
{projectId}
/
content
/
{id}
Get Content
curl --request GET \
--url https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/content/{id}import requests
url = "https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/content/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/content/{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://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/content/{id}",
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/{id}"
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/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/content/{id}")
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
Content ID
Response
Returns the complete Content object including compiled BindJS code.{
"id": "cont124",
"typeId": "ct123",
"typeVersion": 2,
"version": 1,
"lastPublishedVersion": 1,
"packageVersion": "1.0.0",
"name": "Introduction to Metabind",
"description": "Getting Started with Metabind. A comprehensive guide...",
"status": "published",
"isTemplate": false,
"content": {
"title": "Getting Started with Metabind",
"subtitle": "Your complete guide to the platform",
"heroImage": "asset124",
"author": "Jane Doe",
"publishDate": "2024-03-21",
"components": [
{
"type": "ArticleParagraph",
"text": "Metabind is a powerful platform that revolutionizes how teams collaborate..."
},
{
"type": "ArticleHeading",
"text": "What is Metabind?",
"level": 2
},
{
"type": "ArticleParagraph",
"text": "At its core, Metabind provides a unified environment..."
},
{
"type": "ArticleImage",
"image": "asset125",
"caption": "The Metabind dashboard showing key features",
"alt": "Screenshot of Metabind dashboard"
}
]
},
"compiled": "const body = () => { const props = {...}; return ArticleLayout(props); }",
"tags": ["Technology", "Tutorial"],
"metadata": {
"author": "jane.doe@metabind.ai",
"publishedAt": "2024-03-21T14:30:00Z",
"publishedBy": "user456",
"locale": "en-US"
},
"folderId": "folder123",
"organizationId": "org123",
"projectId": "proj456",
"createdAt": "2024-03-21T10:00:00Z",
"updatedAt": "2024-03-21T14:30:00Z",
"createdBy": "user456",
"updatedBy": "user456"
}
Error Responses
Content Not Found
{
"error": {
"code": "NOT_FOUND",
"message": "Content not found",
"details": {
"id": "cont124"
}
}
}
Code Examples
curl -X GET "https://api.metabind.ai/app/v1/organizations/org123/projects/proj456/content/cont124" \
-H "Authorization: Bearer YOUR_JWT"
const response = await fetch(
'https://api.metabind.ai/app/v1/organizations/org123/projects/proj456/content/cont124',
{
headers: {
'Authorization': 'Bearer YOUR_JWT'
}
}
);
const content = await response.json();
console.log(`Content: ${content.name} (v${content.version})`);
// Access compiled code for rendering
const compiledCode = content.compiled;
// Access content structure
const title = content.content.title;
const components = content.content.components;
⌘I