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

  • 200

    The instance was retrieved successfully.

    Hide response attributes Show response attributes object
    • state string | object Required

      One of:

      A simple state

    • context object Required

      The full context of the machine instance.

      Hide context attribute Show context attribute object
      • Additional properties are allowed
    • status string Required

      The status of a machine instance.

      Values are running or paused.

    • tags array[string] Required

      Array of tags for the current states

    • done boolean Required

      Is the state machine complete

    • machineVersion object Required
      Hide machineVersion attributes Show machineVersion attributes object
      • id string Required

        The ID of a machine definition version.

      • createdAt string(date-time) Required
      • clientInfo string Required
    • desiredMachineVersion object
      Hide desiredMachineVersion attributes Show desiredMachineVersion attributes object
      • id string Required

        The ID of a machine definition version.

      • createdAt string(date-time) Required
      • clientInfo string Required
    • createdAt string(date-time) Required
  • 403

    The request was unauthorized.

    Hide response attributes Show response attributes object
    • error string

      A description of the error.

    • code string

      A code specifying the type of error.

      Values are missing-scope, rejected-by-machine-authorizer, missing-user, or missing-org.

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"
}