Events

The event feed: every change and every tap, as CloudEvents, hash-chained with signed checkpoints. Webhooks and streams carry the same events.

The event model

One event, as a CloudEvent. Delivery is at least once and ordered per subject, so receivers deduplicate on source and id.

actortype, actorid and actorvia are CloudEvents extension attributes saying who caused the event and through what.

Properties

  • Name
    specversion
    Type
    string
    Description

    CloudEvents version: 1.0.

  • Name
    id
    Type
    string
    Description

    Event ID, unique within source. Event IDs sort by time.

  • Name
    source
    Type
    string
    Description

    The organization the event belongs to, as /orgs/{org_id}.

  • Name
    type
    Type
    string
    Description

    Event type, such as com.passway.access.denied. Ignore types you do not know.

  • Name
    subject
    Type
    string
    Description

    The ID of the resource the event is about, such as ap_lab3in. Its prefix says its type.

  • Name
    time
    Type
    timestamp
    Description

    When it happened.

  • Name
    datacontenttype
    Type
    string
    Description

    Media type of data: always application/json.

  • Name
    actortype
    Type
    string
    Description

    Who caused it. One of person, api_client, reader, connector, agent, system.

  • Name
    actorid
    Type
    string
    Description

    The actor's ID; null for system. Can be null.

  • Name
    actorvia
    Type
    string
    Description

    The channel the change came through. One of console, api, terraform, mcp, cli, scim, connector, reader, system.

  • Name
    data
    Type
    object
    Description

    Type-specific details.

  • Name
    chainseq
    Type
    integer
    Description

    The event's place in the organization's hash chain, once sealed (seconds after it is written). See [crate::chain]. Can be null.

  • Name
    chainhash
    Type
    string
    Description

    SHA-256, hex, of the previous event's chainhash followed by this event in canonical JSON without chainseq and chainhash. Can be null.


GET/v1/events

List events

Needs the events: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
    type
    Type
    string
    Description

    Only events of this type, such as com.passway.access.denied.

  • Name
    subject
    Type
    string
    Description

    Only events about this resource.

  • Name
    from
    Type
    timestamp
    Description

    Only events at or after this time.

  • Name
    before
    Type
    timestamp
    Description

    Only events strictly before this time.

  • Name
    after
    Type
    string
    Description

    Only events after this one. Use the last event ID you processed to resume.

  • Name
    category
    Type
    string
    Description

    Only events in these categories, comma-separated: access, directory, credentials, sign_in, configuration, system. The console leaves out system to hide housekeeping.

Request

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

Response

{
  "data": [
    {
      "specversion": "1.0",
      "id": "evt_01jd8k3m2v9x4q7r5t6w8y0z1a",
      "source": "/orgs/org_acme",
      "type": "com.passway.access.denied",
      "subject": "ap_lab3in",
      "time": "2026-11-30T14:02:11Z",
      "datacontenttype": "application/json",
      "actortype": "person",
      "actorid": "per_92hd",
      "actorvia": "console",
      "data": {},
      "chainseq": 42,
      "chainhash": null
    }
  ],
  "next_page_token": null
}

GET/v1/events/{event_id}

Get an event

Needs the events:read scope.

Path parameters

  • Name
    event_id
    Type
    string
    Description

    Event ID: evt_ followed by 1 to 64 lowercase letters and digits.

Request

GET
/v1/events/{event_id}
curl https://acme.ext.passway.com/v1/events/evt_01jd8k3m2v9x4q7r5t6w8y0z1a \
  -H "Authorization: Bearer $PASSWAY_TOKEN"

Response

{
  "specversion": "1.0",
  "id": "evt_01jd8k3m2v9x4q7r5t6w8y0z1a",
  "source": "/orgs/org_acme",
  "type": "com.passway.access.denied",
  "subject": "ap_lab3in",
  "time": "2026-11-30T14:02:11Z",
  "datacontenttype": "application/json",
  "actortype": "person",
  "actorid": "per_92hd",
  "actorvia": "console",
  "data": {},
  "chainseq": 42,
  "chainhash": null
}

GET/v1/events/statistics

Get events statistics

Event counts by time and category in the requested time zone. Calendar periods return hours, days or months through the present, each with a preview of its newest events.

Needs the events:read scope.

Query parameters

  • Name
    days
    Type
    integer
    Description

    Number of calendar days, including today. Defaults to seven when no period is given.

  • Name
    period
    Type
    string
    Description

    Calendar period to date. Mutually exclusive with days. One of today, week, month, year.

  • Name
    time_zone
    Type
    string
    Description

    IANA time zone used for calendar day boundaries. Defaults to UTC.

Request

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

Response

{
  "daily": [
    {
      "date": "2026-12-06",
      "count": 1,
      "by_category": [
        {}
      ]
    }
  ],
  "buckets": null,
  "recent": [
    {
      "specversion": "1.0",
      "id": "evt_01jd8k3m2v9x4q7r5t6w8y0z1a",
      "source": "/orgs/org_acme",
      "type": "com.passway.access.denied",
      "subject": "ap_lab3in",
      "time": "2026-11-30T14:02:11Z",
      "datacontenttype": "application/json",
      "actortype": "person",
      "actorid": "per_92hd",
      "actorvia": "console",
      "data": {},
      "chainseq": 42,
      "chainhash": null
    }
  ]
}

GET/v1/events/summary

Event counts for charts

Counts for a window, by hour or by day in a time zone, so a chart needn't page through the events. Every bucket in the window is there, empty ones too, each with the events in it by category and the decisions at doors. Over the whole window: totals by category, and denials by reason and at the five access points with the most. Days are calendar days in the time zone; an hour repeated when the clocks go back is one bucket. At most 400 buckets.

Needs the events:read scope.

Query parameters

  • Name
    from
    Type
    string
    Description

    The window's start, RFC 3339. Required.

  • Name
    to
    Type
    string
    Description

    The window's end, RFC 3339, not included. Required.

  • Name
    bucket
    Type
    string
    Description

    hour or day (the default).

  • Name
    time_zone
    Type
    string
    Description

    An IANA time zone such as America/New_York; UTC by default.

Request

GET
/v1/events/summary
curl -G https://acme.ext.passway.com/v1/events/summary \
  -H "Authorization: Bearer $PASSWAY_TOKEN" \
  -d from=%E2%80%A6 \
  -d to=%E2%80%A6

Response

{
  "from": "…",
  "to": "…",
  "bucket": "day",
  "time_zone": "America/New_York",
  "totals": {
    "access": 0,
    "directory": 0,
    "credentials": 0,
    "sign_in": 0,
    "configuration": 0,
    "system": 0
  },
  "buckets": [
    {
      "start": "2026-12-02T00:00:00-05:00",
      "counts": {
        "access": 0,
        "directory": 0,
        "credentials": 0,
        "sign_in": 0,
        "configuration": 0,
        "system": 0
      },
      "granted": 0,
      "denied": 0
    }
  ],
  "access": {
    "granted": 0,
    "denied": 0,
    "denied_by_reason": [
      {
        "reason_code": "unknown_credential",
        "count": 0
      }
    ],
    "denied_by_access_point": [
      {
        "access_point_id": "ap_01jd8k3m2v9x4q7r5t6w8y0z1a",
        "count": 0
      }
    ],
    "granted_not_permitted": 0
  }
}

GET/v1/events/occupancy

Who is in each area

Each person's last passage through an access point in the last hours, and the area it led into (area_to_id): that is where they are. A passage into no area is a way out, and a reader whose access points lead into different areas, such as an elevator's, says nothing. Each area counts the people in it (count) and in it or any area inside it (total), as a building counts its floors. Only what readers saw: someone who came in behind another is not counted, and someone who left through a door without a reader still is until hours pass.

Needs the events:read scope.

Query parameters

  • Name
    site_id
    Type
    string
    Description

    Only areas at this site.

  • Name
    hours
    Type
    string
    Description

    How far back passages count: 1 to 168, 24 by default.

Request

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

Response

{
  "areas": [
    {
      "area_id": "area_01jd8k3m2v9x4q7r5t6w8y0z1a",
      "site_id": "site_01jd8k3m2v9x4q7r5t6w8y0z1a",
      "count": 0,
      "total": 0,
      "people": [
        {}
      ]
    }
  ],
  "from": "2026-11-30T14:02:11Z",
  "checked_at": "2026-11-30T14:02:11Z"
}

GET/v1/attention

What needs attention

What in the organization needs someone's attention now, most severe first: doors forced or held open, readers offline, passes turned away again and again, taps from unknown phones, break-glass sign-ins, failing or held directory syncs, failing log streams, agents about to expire, domains not served or waiting for DNS, active people with no wallet pass, and enrolment links not used yet. Each item has a count, a sentence, a severity and up to 10 IDs. Anyone signed in may ask; each kind of item needs the read scope of what it is about and is left out without it. Empty items means all is clear.

Request

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

Response

{
  "items": [
    {
      "kind": "musters",
      "severity": "critical",
      "count": 0,
      "summary": "2 readers haven't checked in for 5 minutes.",
      "ids": [
        "…"
      ]
    }
  ],
  "checked_at": "2026-11-30T14:02:11Z"
}

GET/v1/time-punches

Time clock punches

Grants at access points with timekeeping on (#324), as com.passway.time.punch events record them: who, where, when by the reader's own clock, and in (into the site from outside) or out (out of it). Raw punches: Passway never pairs, rounds or edits them, and a tap means someone was there, not that they started work. Earliest first, at most 10,000 and 31 days at a time. Needs time-punches:read, so payroll staff can read punches without the rest of the event log.

Needs the time-punches:read scope.

Query parameters

  • Name
    from
    Type
    string
    Description

    The window's start, RFC 3339, by the readers' clocks. Required.

  • Name
    to
    Type
    string
    Description

    The window's end, RFC 3339, not included. Required.

  • Name
    site_id
    Type
    string
    Description

    Only punches at this site.

  • Name
    person_id
    Type
    string
    Description

    Only this person's punches.

Request

GET
/v1/time-punches
curl -G https://acme.ext.passway.com/v1/time-punches \
  -H "Authorization: Bearer $PASSWAY_TOKEN" \
  -d from=%E2%80%A6 \
  -d to=%E2%80%A6

Response

{
  "punches": [
    {
      "event_id": "evt_01jd8k3m2v9x4q7r5t6w8y0z1a",
      "at": "2026-11-30T14:02:11Z",
      "person_id": "per_01jd8k3m2v9x4q7r5t6w8y0z1a",
      "access_point_id": "ap_01jd8k3m2v9x4q7r5t6w8y0z1a",
      "site_id": "site_01jd8k3m2v9x4q7r5t6w8y0z1a",
      "reader_id": "rdr_01jd8k3m2v9x4q7r5t6w8y0z1a",
      "direction": "in"
    }
  ],
  "truncated": true
}

GET/v1/display-names

What things are called

Names for the IDs that events and lists show, up to 100 at once: a person's name, a group's, an app's, and so on, and Admin token for admin. An ID the caller may not read, that doesn't exist or that has no name is left out, so show the ID instead. Anyone signed in may ask; a person's name needs people:read.

Query parameters

  • Name
    ids
    Type
    string
    Description

    IDs, comma-separated: at most 100. Required.

Request

GET
/v1/display-names
curl -G https://acme.ext.passway.com/v1/display-names \
  -H "Authorization: Bearer $PASSWAY_TOKEN" \
  -d ids=%E2%80%A6

Response

{
  "display_names": {
    "admin": "Admin token",
    "per_92hd": "Ada Lovelace"
  }
}