Cameras

Cameras that watch access points (#382). A camera agent on site reads the camera's analytics (ONVIF Profile M: the line crossing counter and face recognition) and reports what it saw to :observe, where Passway matches it with the doors' grants: more people than grants is tailgating, and a recognized face is checked against the credential that opened the door. Passway keeps no images and no face data. Face recognition needs the organization's face_recognition on, which should wait for counsel: face geometry is biometric information under laws such as Illinois's BIPA.

The camera model

A camera watching access points.

Properties

  • Name
    id
    Type
    string
    Description

    Camera ID.

  • Name
    etag
    Type
    string
    Description

    Current version.

  • Name
    site_id
    Type
    string
    Description

    The site the camera is at. Cannot change.

  • Name
    name
    Type
    string
    Description

    Display name, unique within the site.

  • Name
    description
    Type
    string
    Description

    Free text.

  • Name
    access_point_ids
    Type
    array of strings
    Description

    The access points it watches, at the same site.

  • Name
    face_recognition
    Type
    boolean
    Description

    Whether it reports face recognition. Needs the organization's face_recognition on.

  • Name
    enabled
    Type
    boolean
    Description

    While false, its reports are refused.

  • 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 camera was created.

  • Name
    updated_at
    Type
    timestamp
    Description

    When the camera last changed.


GET/v1/cameras

List cameras

Needs the cameras: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 cameras at this site.

Request

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

Response

{
  "data": [
    {
      "id": "cam_01jd8k3m2v9x4q7r5t6w8y0z1a",
      "etag": "3f9a",
      "site_id": "site_01jd8k3m2v9x4q7r5t6w8y0z1a",
      "name": "Lobby turnstiles, east",
      "description": "…",
      "access_point_ids": [
        "ap_01jd8k3m2v9x4q7r5t6w8y0z1a"
      ],
      "face_recognition": true,
      "enabled": true,
      "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/cameras

Create a camera

face_recognition: true returns 422 while the organization's face_recognition is off.

Needs the cameras: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 camera is at.

  • Name
    name
    Type
    string
    Description

    Display name, unique within the site.

Optional attributes

  • Name
    description
    Type
    string
    Description

    Free text.

  • Name
    access_point_ids
    Type
    array of strings
    Description

    The access points it watches, at the same site.

  • Name
    face_recognition
    Type
    boolean
    Description

    Whether it reports face recognition. Off by default; needs the organization's face_recognition on.

  • Name
    enabled
    Type
    boolean
    Description

    Whether its reports are taken.

  • Name
    labels
    Type
    object
    Description

    Labels.

  • Name
    managed_by
    Type
    string
    Description

    The tool that manages this resource. Terraform sets terraform.

Request

POST
/v1/cameras
curl -X POST https://acme.ext.passway.com/v1/cameras \
  -H "Authorization: Bearer $PASSWAY_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "site_id": "site_01jd8k3m2v9x4q7r5t6w8y0z1a",
    "name": "Lobby turnstiles, east",
    "labels": {
      "passway.example/cost-center": "4410",
      "team": "facilities"
    },
    "managed_by": "terraform"
  }'

Response

{
  "id": "cam_01jd8k3m2v9x4q7r5t6w8y0z1a",
  "etag": "3f9a",
  "site_id": "site_01jd8k3m2v9x4q7r5t6w8y0z1a",
  "name": "Lobby turnstiles, east",
  "description": "…",
  "access_point_ids": [
    "ap_01jd8k3m2v9x4q7r5t6w8y0z1a"
  ],
  "face_recognition": true,
  "enabled": true,
  "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/cameras/{camera_id}

Get a camera

Needs the cameras:read scope.

Path parameters

  • Name
    camera_id
    Type
    string
    Description

    Camera ID: cam_ followed by 1 to 64 lowercase letters and digits.

Request

GET
/v1/cameras/{camera_id}
curl https://acme.ext.passway.com/v1/cameras/cam_01jd8k3m2v9x4q7r5t6w8y0z1a \
  -H "Authorization: Bearer $PASSWAY_TOKEN"

Response

{
  "id": "cam_01jd8k3m2v9x4q7r5t6w8y0z1a",
  "etag": "3f9a",
  "site_id": "site_01jd8k3m2v9x4q7r5t6w8y0z1a",
  "name": "Lobby turnstiles, east",
  "description": "…",
  "access_point_ids": [
    "ap_01jd8k3m2v9x4q7r5t6w8y0z1a"
  ],
  "face_recognition": true,
  "enabled": true,
  "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/cameras/{camera_id}

Update a camera

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 cameras:write scope.

Path parameters

  • Name
    camera_id
    Type
    string
    Description

    Camera ID: cam_ 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
    name
    Type
    string
    Description

    New name.

  • Name
    description
    Type
    string
    Description

    New description.

  • Name
    access_point_ids
    Type
    array of strings
    Description

    The access points it watches, replacing the current ones.

  • Name
    face_recognition
    Type
    boolean
    Description

    Report face recognition, or stop.

  • Name
    enabled
    Type
    boolean
    Description

    Take its reports, or refuse them.

  • 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/cameras/{camera_id}
curl -X PATCH https://acme.ext.passway.com/v1/cameras/cam_01jd8k3m2v9x4q7r5t6w8y0z1a \
  -H "Authorization: Bearer $PASSWAY_TOKEN" \
  -H 'If-Match: "3f9a"' \
  -H "Content-Type: application/merge-patch+json" \
  -d '{
    "labels": {
      "old-label": null,
      "team": "security"
    }
  }'

Response

{
  "id": "cam_01jd8k3m2v9x4q7r5t6w8y0z1a",
  "etag": "3f9a",
  "site_id": "site_01jd8k3m2v9x4q7r5t6w8y0z1a",
  "name": "Lobby turnstiles, east",
  "description": "…",
  "access_point_ids": [
    "ap_01jd8k3m2v9x4q7r5t6w8y0z1a"
  ],
  "face_recognition": true,
  "enabled": true,
  "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/cameras/{camera_id}

Delete a camera

Its reports so far stay in the event log.

Needs the cameras:write scope.

Path parameters

  • Name
    camera_id
    Type
    string
    Description

    Camera ID: cam_ 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/cameras/{camera_id}
curl -X DELETE https://acme.ext.passway.com/v1/cameras/cam_01jd8k3m2v9x4q7r5t6w8y0z1a \
  -H "Authorization: Bearer $PASSWAY_TOKEN" \
  -H 'If-Match: "3f9a"'

Response

204 Deleted

POST/v1/cameras/{camera_id}:observe

Report what a camera saw

People counted and faces recognized at the camera's access points, at most 1,000 at a time. Each is matched with the grants there within 10 seconds of it: more people than grants raises com.passway.access.tailgating; a face raises com.passway.access.face_recognized, with matches_badge saying whether that person's credential opened the door. Report about 30 seconds after the fact, so the readers' taps are in. A face is refused (409) unless the organization and the camera have face_recognition on; so is a disabled camera, an access point the camera doesn't watch, and anything from outside the last day.

Needs the cameras:write scope.

Path parameters

  • Name
    camera_id
    Type
    string
    Description

    Camera ID: cam_ followed by 1 to 64 lowercase letters and digits.

Required attributes

  • Name
    observations
    Type
    array of objects
    Description

    What the camera saw, at most 1,000 at a time.

Request

POST
/v1/cameras/{camera_id}:observe
curl -X POST https://acme.ext.passway.com/v1/cameras/cam_01jd8k3m2v9x4q7r5t6w8y0z1a:observe \
  -H "Authorization: Bearer $PASSWAY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "observations": [
      {
        "at": "2026-11-30T14:02:11Z",
        "count": 1,
        "access_point_id": "ap_01jd8k3m2v9x4q7r5t6w8y0z1a",
        "kind": "people_counted"
      }
    ]
  }'

Response

{
  "accepted": 0,
  "tailgating": 0,
  "faces": 0
}