curl --request GET \
--url https://api.example.com/v1/organizations/{organizationId}/projects/{projectId}/components/{id}Retrieve a single component by ID
curl --request GET \
--url https://api.example.com/v1/organizations/{organizationId}/projects/{projectId}/components/{id}{
"id": "c123",
"name": "ProductCard",
"title": "Product Card",
"description": "Product display card with image, title, and pricing.",
"type": "view",
"status": "published",
"version": 2,
"lastPublishedVersion": 2,
"collectionId": "coll123",
"content": "const metadata = () => ({...});\nconst properties = () => ({...});\nconst body = (props: ComponentProps) => {...};",
"compiled": "const metadata = () => ({...});\nconst properties = () => ({...});\nconst body = (props) => {...};",
"schema": {
"type": "object",
"properties": {
"title": { "type": "string", "description": "Product name" },
"price": { "type": "number", "minimum": 0 }
},
"required": ["title", "price"]
},
"metadata": {
"author": "[email protected]",
"tags": ["product", "card"],
"packageVersions": ["1.0.0", "1.1.0"]
},
"createdAt": "2024-03-20T10:00:00Z",
"updatedAt": "2024-03-21T14:30:00Z"
}
{
"error": {
"code": "NOT_FOUND",
"message": "Component not found",
"details": {
"resourceType": "component",
"resourceId": "c123"
}
}
}
curl -X GET "https://api.metabind.ai/v1/organizations/org123/projects/proj456/components/c123" \
-H "Authorization: Bearer YOUR_API_KEY"