Get Resolved Package
curl --request GET \
--url https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/packages/{version}/resolvedimport requests
url = "https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/packages/{version}/resolved"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/packages/{version}/resolved', 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}/packages/{version}/resolved",
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}/packages/{version}/resolved"
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}/packages/{version}/resolved")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/packages/{version}/resolved")
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": {
"id": "<string>",
"version": "<string>",
"components": {},
"assets": {},
"dependencies": {}
}
}Packages
Get Resolved Package
Get a package with all dependencies resolved and ready for execution
GET
/
app
/
v1
/
organizations
/
{organizationId}
/
projects
/
{projectId}
/
packages
/
{version}
/
resolved
Get Resolved Package
curl --request GET \
--url https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/packages/{version}/resolvedimport requests
url = "https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/packages/{version}/resolved"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/packages/{version}/resolved', 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}/packages/{version}/resolved",
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}/packages/{version}/resolved"
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}/packages/{version}/resolved")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/packages/{version}/resolved")
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": {
"id": "<string>",
"version": "<string>",
"components": {},
"assets": {},
"dependencies": {}
}
}The resolved package endpoint returns the complete package with all compiled components, assets, and resolved dependencies in a format ready for runtime execution. This is the format used by client SDKs to render content.
Path Parameters
Query Parameters
Response
Example Response
{
"data": {
"id": "pkg123",
"version": "1.0.0",
"components": {
"ProductCard": "const body = (props, children) => { return VStack([...]); }",
"ArticleLayout": "const body = (props, children) => { return VStack([Header(props), ...children]); }",
"Button": "const body = (props, children) => { return Button(props.label); }"
},
"assets": {
"ProductCard": [
{ "name": "logo-primary", "url": "https://cdn.metabind.ai/assets/logo-2x.png" }
],
"ArticleLayout": [
{ "name": "hero-background", "url": "https://cdn.metabind.ai/assets/hero-image.jpg" }
]
},
"dependencies": {
"proj456@2.0.0": {
"components": {
"Button": "const body = (props, children) => { ... }",
"Card": "const body = (props, children) => { ... }"
},
"assets": {
"Button": [
{ "name": "default-icon", "url": "https://cdn.metabind.ai/assets/default-icon.svg" }
]
}
}
}
}
}
Dependency Resolution
The package’s direct dependencies are resolved into thedependencies object. Each dependency is keyed by {projectId}@{version}.
Only direct dependencies are included. Dependencies of a dependency (such as core@1.0.0 above) are not resolved.
Code Examples
curl -X GET "https://api.metabind.ai/app/v1/organizations/org123/projects/proj456/packages/1.0.0/resolved" \
-H "Authorization: Bearer YOUR_JWT"
const response = await fetch(
'https://api.metabind.ai/app/v1/organizations/org123/projects/proj456/packages/1.0.0/resolved',
{
headers: {
'Authorization': 'Bearer YOUR_JWT'
}
}
);
const { data: resolved } = await response.json();
// Access main package components
const components = Object.keys(resolved.components);
console.log(`Package has ${components.length} components`);
// Access dependencies
const deps = Object.keys(resolved.dependencies || {});
console.log(`Package has ${deps.length} dependencies`);