Get app snapshot
GET /v1/organisations/{organisation_id}/spaces/{space_id}/apps/{app_id}/snapshot
Exactly what one of the space's apps runs: the manifest's definition (processes, tools with their input schemas, UI resources), every file it is made of with its SHA-256, and the snapshot's hash over them. The first app of this id in listSpaceApps' order (the always-on spaces' versions, then the versions the space imports) comes first, so it shadows an app of the same id in the space's own files; else the app those files declare in a *.ivy-app.toml manifest, read from clean versions.
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: files:read
Security schemes in the OpenAPI document: session_cookie (cookie __Host-ivy_session)bearer (bearer)api_key (bearer)
Parameters
-
organisation_idpathstringrequired -
space_idpathstringrequired -
app_idpathstringrequired
Responses
-
The app's definition, its files' hashes and the snapshot's hash
-
unauthenticated -
workspace_content_restricted,insufficient_scope -
No such space (or the caller can't see it), or the space has no app of this id
-
file_scanning,file_quarantined,file_scan_failed: a file of the app has no clean version -
invalid_app: the app's manifest breaks a rule, named in the message;app_too_large -
rate_limited: the API key's requests per minute are used up; retry afterRetry-Afterseconds -
internal -
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 - 403
workspace_content_restrictedinsufficient_scope - 404
not_foundgeneric code for this status - 409
file_scanningfile_quarantinedfile_scan_failed - 422
invalid_appapp_too_large - 429
rate_limited - 500
internal - 503
unavailable
Examples
curl "$IVY_API_URL/v1/organisations/$ORGANISATION_ID/spaces/$SPACE_ID/apps/$APP_ID/snapshot" \
-H "Authorization: Bearer $IVY_API_KEY" import { client, getAppSnapshot } 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 getAppSnapshot({
path: { organisation_id: organisationId, space_id: spaceId, app_id: appId },
}); {
"definition": {
"access": "read",
"assistant": {
"de": "string",
"el": "string",
"en": "string",
"es": "string",
"fr": "string",
"hu": "string",
"it": "string"
},
"collections": [
{
"access": {},
"name": "Ada Lovelace"
}
],
"creates": [
{
"extension": "string",
"icon": "string",
"template": "string"
}
],
"description": {
"de": "string",
"el": "string",
"en": "string",
"es": "string",
"fr": "string",
"hu": "string",
"it": "string"
},
"egress": [
"string"
],
"environment": "string",
"fallback": "builtin",
"frontend": "builtin",
"id": "id_123",
"manifest": "string",
"name": {
"de": "string",
"el": "string",
"en": "string",
"es": "string",
"fr": "string",
"hu": "string",
"it": "string"
},
"open": "string",
"opens": [
{
"default": false,
"edits": false,
"extensions": [],
"mime_types": []
}
],
"page": "string",
"processes": [
{
"command": [],
"id": "id_123",
"mcp": false,
"port": 0,
"ready": {},
"restart": {}
}
],
"root": "string",
"runs": [
{
"extensions": [],
"runner": {}
}
],
"scratch": [
"string"
],
"secrets": [
{
"kind": {},
"name": "Ada Lovelace",
"optional": false,
"per": {},
"scopes": []
}
],
"services": [
{
"kind": {},
"path": "string",
"process": "string"
}
],
"share_files": [
"string"
],
"shareable": false,
"tools": [
{
"description": "string",
"input_schema": "string",
"name": "Ada Lovelace"
}
],
"ui": [
{
"name": "Ada Lovelace",
"page": "string"
}
]
},
"files": [
{
"file_id": "file_123",
"file_version_id": "file_version_123",
"path": "string",
"sha256": "string",
"size_bytes": 1
}
],
"hash": "string",
"input_schemas": {},
"source": {
"kind": "version",
"space_id": "space_123",
"version_id": "version_123",
"workspace_id": "workspace_123"
}
}