Get code execution
GET /v1/organisations/{organisation_id}/code-execution
Code execution on this installation for the organisation: unavailable without gVisor, never unsandboxed.
Authentication
Send an API key, or an access token from your organisation’s identity provider, in the Authorization header. How API keys work
Scope the API key needs: code_runs:read
Security schemes in the OpenAPI document: session_cookie (cookie __Host-ivy_session)bearer (bearer)api_key (bearer)
Parameters
-
organisation_idpathstringrequired
Responses
-
Availability and limits
-
unauthenticated -
No such organisation (or not yours)
-
rate_limited: the API key's requests per minute are used up; retry afterRetry-Afterseconds -
unavailable: the database is briefly unavailable; retry afterRetry-Afterseconds
Error codes
Errors come back as an ErrorBody whose code is one of these.
- 401
unauthenticated - 404
not_foundgeneric code for this status - 429
rate_limited - 503
unavailable
Examples
curl "$IVY_API_URL/v1/organisations/$ORGANISATION_ID/code-execution" \
-H "Authorization: Bearer $IVY_API_KEY" import { client, getCodeExecution } from "@spacivapp/ivy-sdk";
client.setConfig({
baseUrl: process.env.IVY_API_URL,
headers: { Authorization: `Bearer ${process.env.IVY_API_KEY}` },
});
const { data, error, response } = await getCodeExecution({
path: { organisation_id: organisationId },
}); {
"available": false,
"builds": false,
"default_timeout_seconds": 0,
"max_concurrent_runs": 0,
"max_concurrent_sessions": 0,
"max_timeout_seconds": 0,
"reason": "string",
"reason_code": "not_gvisor",
"sizes": [
{
"memory_mib": 0,
"name": "Ada Lovelace",
"space_mib": 0,
"vcpu": 0,
"workspace_mib": 0
}
],
"status": "available",
"tiers": [
"string"
]
}