curl --request POST \
--url https://api.blaxel.ai/v0/sandboxes/{sandboxName}/previews \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"metadata": {
"name": "<string>",
"displayName": "<string>",
"resourceName": "<string>",
"resourceType": "<string>",
"workspace": "<string>"
},
"spec": {
"customDomain": "<string>",
"expires": "<string>",
"port": 123,
"prefixUrl": "<string>",
"public": true,
"requestHeaders": {},
"responseHeaders": {},
"ttl": "<string>"
}
}
'{
"metadata": {
"name": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"createdBy": "<string>",
"updatedBy": "<string>",
"displayName": "<string>",
"resourceName": "<string>",
"resourceType": "<string>",
"workspace": "<string>"
},
"spec": {
"customDomain": "<string>",
"expires": "<string>",
"port": 123,
"prefixUrl": "<string>",
"public": true,
"region": "<string>",
"requestHeaders": {},
"responseHeaders": {},
"ttl": "<string>",
"url": "<string>"
},
"events": [
{
"canaryRevision": "<string>",
"message": "Deployment successful",
"revision": "rev-abc123",
"status": "DEPLOYED",
"time": "2025-01-15T10:30:00Z",
"type": "deployment"
}
],
"status": "DELETING"
}Create a preview
curl --request POST \
--url https://api.blaxel.ai/v0/sandboxes/{sandboxName}/previews \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"metadata": {
"name": "<string>",
"displayName": "<string>",
"resourceName": "<string>",
"resourceType": "<string>",
"workspace": "<string>"
},
"spec": {
"customDomain": "<string>",
"expires": "<string>",
"port": 123,
"prefixUrl": "<string>",
"public": true,
"requestHeaders": {},
"responseHeaders": {},
"ttl": "<string>"
}
}
'{
"metadata": {
"name": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"createdBy": "<string>",
"updatedBy": "<string>",
"displayName": "<string>",
"resourceName": "<string>",
"resourceType": "<string>",
"workspace": "<string>"
},
"spec": {
"customDomain": "<string>",
"expires": "<string>",
"port": 123,
"prefixUrl": "<string>",
"public": true,
"region": "<string>",
"requestHeaders": {},
"responseHeaders": {},
"ttl": "<string>",
"url": "<string>"
},
"events": [
{
"canaryRevision": "<string>",
"message": "Deployment successful",
"revision": "rev-abc123",
"status": "DEPLOYED",
"time": "2025-01-15T10:30:00Z",
"type": "deployment"
}
],
"status": "DELETING"
}OAuth2 authentication with JWT tokens
Name of the Sandbox
successful operation
Preview of a Resource
PreviewMetadata
Show child attributes
Preview of a Resource
Show child attributes
Events happening on a resource deployed on Blaxel
Show child attributes
Deployment status of a resource deployed on Blaxel
DELETING, TERMINATED, FAILED, DEACTIVATED, DEACTIVATING, UPLOADING, BUILDING, DEPLOYING, DEPLOYED Was this page helpful?