Autumn Labs
DocsBlogCareers
API

Sites

Get site data with nested structure

GET
/sites
AuthorizationBearer <token>

In: header

Query Parameters

id?string

ID of the site. Default is all sites.

Match^[0-9a-fA-F]{24}$

Response Body

curl -X GET "http://localhost:3000/sites?id=507f1f77bcf86cd799439011"
{
  "data": [
    {
      "id": "507f1f77bcf86cd799439011",
      "name": "California Factory - CAL01",
      "description": "Automated Assembly Factory",
      "lines": [
        {
          "id": "507f1f77bcf86cd799439011",
          "name": "FATP Line",
          "description": "Assembly line",
          "elements": [
            {
              "id": "507f1f77bcf86cd799439011",
              "name": "Top Assembly 1",
              "description": "First of the assembly stations",
              "type": "station"
            }
          ]
        }
      ]
    }
  ],
  "message": "Success",
  "meta": {
    "timestamp": "2019-08-24T14:15:22Z",
    "request_id": "c2ed3e07-8c5f-4be9-b7ec-86bddcedd154",
    "query_duration_ms": 0
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null
  }
}