Get a machine definition.

GET /machines/{machineSlug}

Retrieve the machine definition

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}$.

Responses

  • The machine was retrieved successfully.

    Hide response attribute Show response attribute object
    • machine object Required
      Hide machine attributes Show machine attributes object
      • createdAt string(date-time) Required
      • Hide currentVersion attributes Show currentVersion attributes object
      • indexes array[string] Required

        Name of an index on machines

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

  • 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}
curl \
 -X GET https://api.statebacked.dev/machines/my-machine \
 -H "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "machine": {
    "createdAt": "2023-05-04T09:42:00+00:00",
    "currentVersion": {
      "id": "string",
      "createdAt": "2023-05-04T09:42:00+00:00",
      "clientInfo": "string"
    },
    "indexes": [
      "string"
    ]
  }
}
Response examples (200)
{
  "machine": {
    "createdAt": "2024-05-04T09:42:00+00:00",
    "currentVersion": {
      "id": "string",
      "createdAt": "2024-05-04T09:42:00+00:00",
      "clientInfo": "string"
    },
    "indexes": [
      "string"
    ]
  }
}
Response examples (403)
{
  "error": "string",
  "code": "missing-scope"
}
Response examples (403)
{
  "error": "string",
  "code": "missing-scope"
}