References
The /refs
endpoints resolves references to other resources in the platform.
Resolve References
Endpoint: /refs/resolve
Method: POST
Headers
Authorization: Bearer <YOUR_JWT_TOKEN>
Input Parameters
Parameter | Data Type | Description |
---|---|---|
refs | ResolvableRef[] | An array of references to resolve. |
Example Request
{
"refs": [
{
"type": "Environment",
"id": "<ENVIRONMENT_ID>"
},
{
"type": "Project",
"id": "<PROJECT_ID>"
},
{
"type": "User",
"id": "<USER_ID>"
},
{
"type": "Account",
"id": "<ACCOUNT_ID>"
},
{
"type": "Interaction",
"id": "<INTERACTION_ID>"
}
]
}
Example Response
[
{
"id": "<ENVIRONMENT_ID>",
"name": "My Environment",
"type": "Environment",
"provider": "openai",
"default_model": "text-davinci-003"
},
{
"id": "<PROJECT_ID>",
"name": "My Project",
"type": "Project",
"account": "<ACCOUNT_ID>"
},
{
"id": "<USER_ID>",
"name": "John Doe",
"email": "john.doe@example.com",
"type": "User",
"picture": "https://example.com/john.doe.jpg"
},
{
"id": "<ACCOUNT_ID>",
"name": "My Account",
"type": "Account"
},
{
"id": "<INTERACTION_ID>",
"name": "My Interaction",
"type": "Interaction"
}
]
Code Examples
Resolve References
curl --location 'https://studio-server-production.api.becomposable.com/api/v1/refs/resolve' \
--header 'Authorization: Bearer <YOUR_JWT_TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
"refs": [
{
"type": "Environment",
"id": "<ENVIRONMENT_ID>"
},
{
"type": "Project",
"id": "<PROJECT_ID>"
},
{
"type": "User",
"id": "<USER_ID>"
},
{
"type": "Account",
"id": "<ACCOUNT_ID>"
},
{
"type": "Interaction",
"id": "<INTERACTION_ID>"
}
]
}'