Skip to main content

/locations

GET /locations

Retrieve a list of locations.

Example

http GET https://api.fyma.ai/locations
[
  {
    "id": "my-location",
    "organizationId": "bb56d0e6-95a7-4f34-98c2-86cabd07b723",
    "type": "shopping mall",
    "timezone": "Europe/Tallinn",
    "createdBy": null,
    "updatedBy": null,
    "createdAt": "2024-06-05T12:22:29.295Z",
    "updatedAt": "2024-06-05T12:22:29.295Z"
  }
]

GET /locations/{locationId}/insights/live

Retrieve live insights configured for a location. The response may include multiple insights of the same type for each configured sensor group. Live insights are refreshed every 5 minutes.

Path Parameters

  • locationId (string, required): Location identifier.

Query Parameters

  • filter (string, required): Comma-separated list of insights to include in the response. Possible values are:
    • occupancy

Example

http GET https://api.fyma.ai/locations/my-location/insights/live?filter=occupancy
{
  "insights": {
    "occupancy": [
      {
        "sensorGroup": {
          "id": 1,
          "name": "Office building occupancy"
        },
        "occupancy": 1562
      }
    ]
  }
}

In scenarios where the occupancy area is closed or data is unavailable, the insights occupancy response will return an empty payload.

{
  "insights": {
    "occupancy": []
  }
}