Areas

Places at a site: buildings, floors, rooms and units, in a tree (ONVIF area; IFC building, storey and space).

The area model

A place at a site, in a tree of areas.

Properties

  • Name
    id
    Type
    string
    Description

    Area ID.

  • Name
    etag
    Type
    string
    Description

    Current version.

  • Name
    site_id
    Type
    string
    Description

    The site the area is at. Cannot change.

  • Name
    parent_id
    Type
    string
    Description

    The area this one is inside, such as the floor of a room; null at the top of the site. Can be null.

  • Name
    name
    Type
    string
    Description

    Display name, unique among the parent's children.

  • Name
    description
    Type
    string
    Description

    Free text.

  • Name
    kind
    Type
    string
    Description

    What kind of place this is. One of building, floor, wing, room, unit, parking, outdoor, other.

  • Name
    anti_passback
    Type
    string
    Description

    soft raises com.passway.access.passback when someone enters the area without having left it, or leaves without having entered. One of off, soft.

  • Name
    labels
    Type
    object
    Description

    Labels.

  • Name
    managed_by
    Type
    string
    Description

    The tool that manages this resource, such as terraform. Can be null.

  • Name
    created_at
    Type
    timestamp
    Description

    When the area was created.

  • Name
    updated_at
    Type
    timestamp
    Description

    When the area last changed.


GET/v1/areas

List areas

Needs the areas:read scope.

Query parameters

  • Name
    page_size
    Type
    integer
    Description

    Results per page, 1 to 200. 0 or absent means 50; more than 200 means 200 (AIP-158).

  • Name
    page_token
    Type
    string
    Description

    next_page_token from the previous page.

  • Name
    updated_since
    Type
    timestamp
    Description

    Only resources changed at or after this time.

  • Name
    site_id
    Type
    string
    Description

    Only areas at this site.

  • Name
    parent_id
    Type
    string
    Description

    Only the direct children of this area.

  • Name
    kind
    Type
    string
    Description

    Only areas of this kind. One of building, floor, wing, room, unit, parking, outdoor, other.

Request

GET
/v1/areas
curl https://acme.ext.passway.com/v1/areas \
  -H "Authorization: Bearer $PASSWAY_TOKEN"

Response

{
  "data": [
    {
      "id": "area_01jd8k3m2v9x4q7r5t6w8y0z1a",
      "etag": "3f9a",
      "site_id": "site_01jd8k3m2v9x4q7r5t6w8y0z1a",
      "parent_id": "area_01jd8k3m2v9x4q7r5t6w8y0z1a",
      "name": "Floor 21",
      "description": "…",
      "kind": "building",
      "anti_passback": "off",
      "labels": {
        "passway.example/cost-center": "4410",
        "team": "facilities"
      },
      "managed_by": "terraform",
      "created_at": "2026-11-30T14:02:11Z",
      "updated_at": "2026-11-30T14:02:11Z"
    }
  ],
  "next_page_token": null
}

POST/v1/areas

Create an area

Needs the areas:write scope.

Headers

  • Name
    Idempotency-Key
    Type
    string
    Description

    A unique key, such as a UUID. Repeating a successful request with the same key within 24 hours returns the original response; reusing it for a different request returns 422; repeating it while the first is still running returns 409 with Retry-After.

Required attributes

  • Name
    site_id
    Type
    string
    Description

    The site the area is at.

  • Name
    name
    Type
    string
    Description

    Display name, unique among the parent's children.

Optional attributes

  • Name
    parent_id
    Type
    string
    Description

    The area this one is inside. It must be at the same site.

  • Name
    description
    Type
    string
    Description

    Free text.

  • Name
    kind
    Type
    string
    Description

    What kind of place this is. One of building, floor, wing, room, unit, parking, outdoor, other.

  • Name
    anti_passback
    Type
    string
    Description

    off (the default) or soft: raise com.passway.access.passback when someone enters the area without having left it, or leaves without having entered. One of off, soft.

  • Name
    labels
    Type
    object
    Description

    Labels.

  • Name
    managed_by
    Type
    string
    Description

    The tool that manages this resource. Terraform sets terraform.

Request

POST
/v1/areas
curl -X POST https://acme.ext.passway.com/v1/areas \
  -H "Authorization: Bearer $PASSWAY_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "site_id": "site_01jd8k3m2v9x4q7r5t6w8y0z1a",
    "parent_id": "area_01jd8k3m2v9x4q7r5t6w8y0z1a",
    "name": "Floor 21",
    "kind": "building",
    "anti_passback": "off",
    "labels": {
      "passway.example/cost-center": "4410",
      "team": "facilities"
    },
    "managed_by": "terraform"
  }'

Response

{
  "id": "area_01jd8k3m2v9x4q7r5t6w8y0z1a",
  "etag": "3f9a",
  "site_id": "site_01jd8k3m2v9x4q7r5t6w8y0z1a",
  "parent_id": "area_01jd8k3m2v9x4q7r5t6w8y0z1a",
  "name": "Floor 21",
  "description": "…",
  "kind": "building",
  "anti_passback": "off",
  "labels": {
    "passway.example/cost-center": "4410",
    "team": "facilities"
  },
  "managed_by": "terraform",
  "created_at": "2026-11-30T14:02:11Z",
  "updated_at": "2026-11-30T14:02:11Z"
}

GET/v1/areas/{area_id}

Get an area

Needs the areas:read scope.

Path parameters

  • Name
    area_id
    Type
    string
    Description

    Area ID: area_ followed by 1 to 64 lowercase letters and digits.

Request

GET
/v1/areas/{area_id}
curl https://acme.ext.passway.com/v1/areas/area_01jd8k3m2v9x4q7r5t6w8y0z1a \
  -H "Authorization: Bearer $PASSWAY_TOKEN"

Response

{
  "id": "area_01jd8k3m2v9x4q7r5t6w8y0z1a",
  "etag": "3f9a",
  "site_id": "site_01jd8k3m2v9x4q7r5t6w8y0z1a",
  "parent_id": "area_01jd8k3m2v9x4q7r5t6w8y0z1a",
  "name": "Floor 21",
  "description": "…",
  "kind": "building",
  "anti_passback": "off",
  "labels": {
    "passway.example/cost-center": "4410",
    "team": "facilities"
  },
  "managed_by": "terraform",
  "created_at": "2026-11-30T14:02:11Z",
  "updated_at": "2026-11-30T14:02:11Z"
}

PATCH/v1/areas/{area_id}

Update an area

A JSON merge patch (RFC 7396): fields in the body replace the current ones, null removes a field where the schema allows null, and objects such as labels are merged. Requires If-Match with the current etag.

Needs the areas:write scope.

Path parameters

  • Name
    area_id
    Type
    string
    Description

    Area ID: area_ followed by 1 to 64 lowercase letters and digits.

Headers

  • Name
    If-Match
    Type
    string
    Description

    The resource's current etag, in double quotes. Required.

Optional attributes

  • Name
    parent_id
    Type
    string
    Description

    New parent, or null to move the area to the top of the site. Can be null.

  • Name
    name
    Type
    string
    Description

    New name.

  • Name
    description
    Type
    string
    Description

    New description.

  • Name
    kind
    Type
    string
    Description

    New kind. One of building, floor, wing, room, unit, parking, outdoor, other.

  • Name
    anti_passback
    Type
    string
    Description

    Turn the anti-passback check on (soft) or off. One of off, soft.

  • Name
    labels
    Type
    object
    Description

    Labels to set or remove, or null to remove every label. Can be null.

  • Name
    managed_by
    Type
    string
    Description

    New managing tool, or null to clear it. Can be null.

Request

PATCH
/v1/areas/{area_id}
curl -X PATCH https://acme.ext.passway.com/v1/areas/area_01jd8k3m2v9x4q7r5t6w8y0z1a \
  -H "Authorization: Bearer $PASSWAY_TOKEN" \
  -H 'If-Match: "3f9a"' \
  -H "Content-Type: application/merge-patch+json" \
  -d '{
    "parent_id": "area_01jd8k3m2v9x4q7r5t6w8y0z1a",
    "kind": "building",
    "anti_passback": "off",
    "labels": {
      "old-label": null,
      "team": "security"
    }
  }'

Response

{
  "id": "area_01jd8k3m2v9x4q7r5t6w8y0z1a",
  "etag": "3f9a",
  "site_id": "site_01jd8k3m2v9x4q7r5t6w8y0z1a",
  "parent_id": "area_01jd8k3m2v9x4q7r5t6w8y0z1a",
  "name": "Floor 21",
  "description": "…",
  "kind": "building",
  "anti_passback": "off",
  "labels": {
    "passway.example/cost-center": "4410",
    "team": "facilities"
  },
  "managed_by": "terraform",
  "created_at": "2026-11-30T14:02:11Z",
  "updated_at": "2026-11-30T14:02:11Z"
}

DELETE/v1/areas/{area_id}

Delete an area

An area with child areas, or that access points lead into or out of, returns 409 with /problems/has-dependents.

Needs the areas:write scope.

Path parameters

  • Name
    area_id
    Type
    string
    Description

    Area ID: area_ followed by 1 to 64 lowercase letters and digits.

Headers

  • Name
    If-Match
    Type
    string
    Description

    The resource's current etag, in double quotes. Required.

Request

DELETE
/v1/areas/{area_id}
curl -X DELETE https://acme.ext.passway.com/v1/areas/area_01jd8k3m2v9x4q7r5t6w8y0z1a \
  -H "Authorization: Bearer $PASSWAY_TOKEN" \
  -H 'If-Match: "3f9a"'

Response

204 Deleted