Get the administrative state of an instance
Retrieve the state of the machine instance that was previously created by
calling POST /machines/{machineSlug}
and may have had events sent to it
by calling POST /machines/{machineSlug}/i/{instanceSlug}/events
.
No machine authorizers will be called to authorize this read and it returns private context data so this requires instances.admin scope.
The full context for the instance (instead of only public context) will be returned.
GET
/machines/{machineSlug}/i/{instanceSlug}/admin
curl \
-X GET https://api.statebacked.dev/machines/my-machine/i/user-1234/admin \
-H "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
"state": "string",
"context": {},
"status": "running",
"tags": [
"string"
],
"done": true,
"machineVersion": {
"id": "string",
"createdAt": "2023-05-04T09:42:00+00:00",
"clientInfo": "string"
},
"desiredMachineVersion": {
"id": "string",
"createdAt": "2023-05-04T09:42:00+00:00",
"clientInfo": "string"
},
"createdAt": "2023-05-04T09:42:00+00:00"
}
Response examples (200)
{
"state": "string",
"context": {},
"status": "running",
"tags": [
"string"
],
"done": true,
"machineVersion": {
"id": "string",
"createdAt": "2025-05-04T09:42:00Z",
"clientInfo": "string"
},
"desiredMachineVersion": {
"id": "string",
"createdAt": "2025-05-04T09:42:00Z",
"clientInfo": "string"
},
"createdAt": "2025-05-04T09:42:00Z"
}
Response examples (403)
{
"error": "string",
"code": "missing-scope"
}
Response examples (403)
{
"error": "string",
"code": "missing-scope"
}