Get the administrative state of an instance

GET /machines/{machineSlug}/i/{instanceSlug}/admin

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.

Path parameters

  • machineSlug string Required

    The slug/name for the machine definition.

    Minimum length is 1. Format should match the following pattern: ^[a-zA-Z0-9_-]{1,128}$.

  • instanceSlug string Required

    The slug/name for the machine instance.

    Minimum length is 1. Format should match the following pattern: ^[a-zA-Z0-9_-]{1,128}$.

Responses

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": "2024-05-04T09:42:00+00:00",
    "clientInfo": "string"
  },
  "desiredMachineVersion": {
    "id": "string",
    "createdAt": "2024-05-04T09:42:00+00:00",
    "clientInfo": "string"
  },
  "createdAt": "2024-05-04T09:42:00+00:00"
}
Response examples (403)
{
  "error": "string",
  "code": "missing-scope"
}
Response examples (403)
{
  "error": "string",
  "code": "missing-scope"
}