v1 · preview

Try webhook signature, alert.created, location_withheld or 429.

↑ ↓ moveEnter openEsc close

Reference

Sites

The client’s sites and their zones.

The client’s sites

GET/v1/sites

Any valid token.

Responses

  • 200

    Sites the client can access.

    application/json SiteList

  • 401

    The token is missing, has expired or has been revoked.

    application/problem+json Problem

  • 403

    The token lacks the scope the route requires, or the site doesn’t belong to the client.

    application/problem+json Problem

  • 429

    Too many requests, or too much query time: each client has a number of requests per minute (600 by default) and a query time per minute (30 s by default), and each request spends however long it takes, so a long list counts for more than a single alert. Retry-After says when to retry.

    application/problem+json Problem

Request · sandbox

curl "https://sandbox.api.safeonuba.com/v1/sites" \
  -H "Authorization: Bearer $SAFEONUBA_TOKEN"

Response 200

JSON
{
  "data": [
    {
      "id": "0f6c2b7e-3a1d-4c55-9b0e-7d2f4a8c1e90",
      "name": "Planta Ejemplo — simulación",
      "location": "Polígono industrial de ejemplo",
      "privacy_mode": "on_demand",
      "unveil_min_severity": "low"
    }
  ]
}

A site’s zones and muster points

GET/v1/sites/{id}/zones

Scope alerts:read

GeoJSON in WGS84. Privacy zones come with name and type but no geometry.

Path parameters

  • idstring (uuid)required

    Site id.

Responses

  • 200

    Zones in force.

    application/json ZoneList

  • 401

    The token is missing, has expired or has been revoked.

    application/problem+json Problem

  • 403

    The token lacks the scope the route requires, or the site doesn’t belong to the client.

    application/problem+json Problem

  • 404

    The site doesn’t exist or doesn’t belong to the client.

    application/problem+json Problem

  • 429

    Too many requests, or too much query time: each client has a number of requests per minute (600 by default) and a query time per minute (30 s by default), and each request spends however long it takes, so a long list counts for more than a single alert. Retry-After says when to retry.

    application/problem+json Problem

Request · sandbox

curl "https://sandbox.api.safeonuba.com/v1/sites/0f6c2b7e-3a1d-4c55-9b0e-7d2f4a8c1e90/zones" \
  -H "Authorization: Bearer $SAFEONUBA_TOKEN"

Response 200

JSON
{
  "data": [
    {
      "id": "f6040b41-be81-4bf3-af68-bfaf3e284c54",
      "name": "Punto de reunión PR-3 · Zona alta",
      "type": "assembly_point",
      "geometry": {
        "type": "Polygon",
        "coordinates": [
          [
            [
              -2.9825,
              40.0081
            ],
            [
              -2.9818,
              40.0081
            ],
            [
              -2.9818,
              40.0076
            ],
            [
              -2.9825,
              40.0076
            ],
            [
              -2.9825,
              40.0081
            ]
          ]
        ]
      },
      "assembly_point": {
        "serves": [
          "general",
          "tsunami"
        ],
        "elevation_m": 50,
        "elevation_source": "verified",
        "vertical": false,
        "capacity": 200
      }
    }
  ]
}