Access profiles
Where and when (ONVIF access profile): a set of access policies, each naming access points, areas, zones or sites, a schedule and Aliro capabilities. Passway compiles each profile into Aliro access levels.
The access profile model
A named set of access policies: where and when, ready to give to people
with an access assignment (ONVIF AccessProfile).
Properties
- Name
id- Type
- string
- Description
Access profile ID.
- Name
etag- Type
- string
- Description
Current version.
- Name
name- Type
- string
- Description
Display name, unique within the organization.
- Name
description- Type
- string
- Description
Free text.
- Name
access_policies- Type
- array of objects
- Description
The policies, 1 to 32. Access is allowed if any policy allows it.
- Name
access_policies[].access_point_ids- Type
- array of strings
- Description
These access points.
- Name
access_policies[].area_ids- Type
- array of strings
- Description
The access points into these areas.
- Name
access_policies[].zone_ids- Type
- array of strings
- Description
The access points into these zones' areas.
- Name
access_policies[].site_ids- Type
- array of strings
- Description
Every access point at these sites.
- Name
access_policies[].schedule_id- Type
- string
- Description
When the policy applies. Leave out for at all times.
- Name
access_policies[].capabilities- Type
- array of strings
- Description
What it allows. Defaults to
momentary_unsecure. One ofmomentary_unsecure,extended_momentary_unsecure,secure,unsecure,toggle_secure_or_unsecure.
- Name
labels- Type
- object
- Description
Labels.
- Name
managed_by- Type
- string
- Description
The tool that manages this resource, such as
terraform. Can benull.
- Name
created_at- Type
- timestamp
- Description
When the profile was created.
- Name
updated_at- Type
- timestamp
- Description
When the profile last changed.
List access profiles
Needs the access-profiles:read scope.
Query parameters
- Name
page_size- Type
- integer
- Description
Results per page, 1 to 200.
0or absent means 50; more than 200 means 200 (AIP-158).
- Name
page_token- Type
- string
- Description
next_page_tokenfrom the previous page.
- Name
updated_since- Type
- timestamp
- Description
Only resources changed at or after this time.
- Name
access_point_id- Type
- string
- Description
Only profiles with a policy that names this access point.
- Name
area_id- Type
- string
- Description
Only profiles with a policy that names this area.
- Name
zone_id- Type
- string
- Description
Only profiles with a policy that names this zone.
- Name
site_id- Type
- string
- Description
Only profiles with a policy that names this site.
- Name
schedule_id- Type
- string
- Description
Only profiles with a policy that uses this schedule.
Request
curl https://acme.ext.passway.com/v1/access-profiles \
-H "Authorization: Bearer $PASSWAY_TOKEN"
Response
{
"data": [
{
"id": "prof_01jd8k3m2v9x4q7r5t6w8y0z1a",
"etag": "3f9a",
"name": "hq-weekdays",
"description": "…",
"access_policies": [
{}
],
"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
}
Create an access profile
Needs the access-profiles: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 returns409withRetry-After.
Required attributes
- Name
name- Type
- string
- Description
Display name, unique within the organization.
- Name
access_policies- Type
- array of objects
- Description
The policies, 1 to 32.
Optional attributes
- Name
description- Type
- string
- Description
Free text.
- Name
access_policies[].access_point_ids- Type
- array of strings
- Description
These access points.
- Name
access_policies[].area_ids- Type
- array of strings
- Description
The access points into these areas.
- Name
access_policies[].zone_ids- Type
- array of strings
- Description
The access points into these zones' areas.
- Name
access_policies[].site_ids- Type
- array of strings
- Description
Every access point at these sites.
- Name
access_policies[].schedule_id- Type
- string
- Description
When the policy applies. Leave out for at all times.
- Name
access_policies[].capabilities- Type
- array of strings
- Description
What it allows. Defaults to
momentary_unsecure. One ofmomentary_unsecure,extended_momentary_unsecure,secure,unsecure,toggle_secure_or_unsecure.
- Name
labels- Type
- object
- Description
Labels.
- Name
managed_by- Type
- string
- Description
The tool that manages this resource. Terraform sets
terraform.
Request
curl -X POST https://acme.ext.passway.com/v1/access-profiles \
-H "Authorization: Bearer $PASSWAY_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"name": "hq-weekdays",
"access_policies": [
{
"schedule_id": "sch_01jd8k3m2v9x4q7r5t6w8y0z1a"
}
],
"labels": {
"passway.example/cost-center": "4410",
"team": "facilities"
},
"managed_by": "terraform"
}'
Response
{
"id": "prof_01jd8k3m2v9x4q7r5t6w8y0z1a",
"etag": "3f9a",
"name": "hq-weekdays",
"description": "…",
"access_policies": [
{
"access_point_ids": [
"ap_01jd8k3m2v9x4q7r5t6w8y0z1a"
],
"area_ids": [
"area_01jd8k3m2v9x4q7r5t6w8y0z1a"
],
"zone_ids": [
"zone_01jd8k3m2v9x4q7r5t6w8y0z1a"
],
"site_ids": [
"site_01jd8k3m2v9x4q7r5t6w8y0z1a"
],
"schedule_id": "sch_01jd8k3m2v9x4q7r5t6w8y0z1a",
"capabilities": [
"momentary_unsecure"
]
}
],
"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 an access profile
Needs the access-profiles:read scope.
Path parameters
- Name
access_profile_id- Type
- string
- Description
Access profile ID:
prof_followed by 1 to 64 lowercase letters and digits.
Request
curl https://acme.ext.passway.com/v1/access-profiles/prof_01jd8k3m2v9x4q7r5t6w8y0z1a \
-H "Authorization: Bearer $PASSWAY_TOKEN"
Response
{
"id": "prof_01jd8k3m2v9x4q7r5t6w8y0z1a",
"etag": "3f9a",
"name": "hq-weekdays",
"description": "…",
"access_policies": [
{
"access_point_ids": [
"ap_01jd8k3m2v9x4q7r5t6w8y0z1a"
],
"area_ids": [
"area_01jd8k3m2v9x4q7r5t6w8y0z1a"
],
"zone_ids": [
"zone_01jd8k3m2v9x4q7r5t6w8y0z1a"
],
"site_ids": [
"site_01jd8k3m2v9x4q7r5t6w8y0z1a"
],
"schedule_id": "sch_01jd8k3m2v9x4q7r5t6w8y0z1a",
"capabilities": [
"momentary_unsecure"
]
}
],
"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"
}
Update an access profile
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 access-profiles:write scope.
Path parameters
- Name
access_profile_id- Type
- string
- Description
Access profile ID:
prof_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_policies- Type
- array of objects
- Description
New policies, replacing the current ones.
- Name
access_policies[].access_point_ids- Type
- array of strings
- Description
These access points.
- Name
access_policies[].area_ids- Type
- array of strings
- Description
The access points into these areas.
- Name
access_policies[].zone_ids- Type
- array of strings
- Description
The access points into these zones' areas.
- Name
access_policies[].site_ids- Type
- array of strings
- Description
Every access point at these sites.
- Name
access_policies[].schedule_id- Type
- string
- Description
When the policy applies. Leave out for at all times.
- Name
access_policies[].capabilities- Type
- array of strings
- Description
What it allows. Defaults to
momentary_unsecure. One ofmomentary_unsecure,extended_momentary_unsecure,secure,unsecure,toggle_secure_or_unsecure.
- Name
labels- Type
- object
- Description
Labels to set or remove, or
nullto remove every label. Can benull.
- Name
managed_by- Type
- string
- Description
New managing tool, or
nullto clear it. Can benull.
Request
curl -X PATCH https://acme.ext.passway.com/v1/access-profiles/prof_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": "prof_01jd8k3m2v9x4q7r5t6w8y0z1a",
"etag": "3f9a",
"name": "hq-weekdays",
"description": "…",
"access_policies": [
{
"access_point_ids": [
"ap_01jd8k3m2v9x4q7r5t6w8y0z1a"
],
"area_ids": [
"area_01jd8k3m2v9x4q7r5t6w8y0z1a"
],
"zone_ids": [
"zone_01jd8k3m2v9x4q7r5t6w8y0z1a"
],
"site_ids": [
"site_01jd8k3m2v9x4q7r5t6w8y0z1a"
],
"schedule_id": "sch_01jd8k3m2v9x4q7r5t6w8y0z1a",
"capabilities": [
"momentary_unsecure"
]
}
],
"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 an access profile
An access profile that assignments use returns 409 with /problems/has-dependents.
Needs the access-profiles:write scope.
Path parameters
- Name
access_profile_id- Type
- string
- Description
Access profile ID:
prof_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
curl -X DELETE https://acme.ext.passway.com/v1/access-profiles/prof_01jd8k3m2v9x4q7r5t6w8y0z1a \
-H "Authorization: Bearer $PASSWAY_TOKEN" \
-H 'If-Match: "3f9a"'
Response
204 Deleted
Try access policies against real passages
Before giving people new access, see how it would have decided the passages they actually made: in place of an existing profile's policies (replaces, for everyone it is assigned to), or as a new profile for person_ids and group_ids. Each of their grants and policy denials in the window (the last 7 days by default, at most 31; the most recent 2,000) is judged by today's policies and by the proposal, as readers judge them: the places that cover the reader's access points, schedules in the site's time zone or their own, and the people's, assignments' and memberships' dates. The answer lists what would change: passages newly allowed and newly refused, and who gains and who loses. Nothing is saved.
Needs the access-profiles:write scope.
Required attributes
- Name
access_policies- Type
- array of objects
- Description
The proposed policies.
Optional attributes
- Name
access_policies[].access_point_ids- Type
- array of strings
- Description
These access points.
- Name
access_policies[].area_ids- Type
- array of strings
- Description
The access points into these areas.
- Name
access_policies[].zone_ids- Type
- array of strings
- Description
The access points into these zones' areas.
- Name
access_policies[].site_ids- Type
- array of strings
- Description
Every access point at these sites.
- Name
access_policies[].schedule_id- Type
- string
- Description
When the policy applies. Leave out for at all times.
- Name
access_policies[].capabilities- Type
- array of strings
- Description
What it allows. Defaults to
momentary_unsecure. One ofmomentary_unsecure,extended_momentary_unsecure,secure,unsecure,toggle_secure_or_unsecure.
- Name
replaces- Type
- string
- Description
Try them in place of this profile's, for everyone it is assigned to.
- Name
person_ids- Type
- array of strings
- Description
Try them as a new profile assigned to these people…
- Name
group_ids- Type
- array of strings
- Description
…and to these groups' members.
- Name
from- Type
- timestamp
- Description
The passages from this time; 7 days before
toby default.
- Name
to- Type
- timestamp
- Description
The passages up to this time, not included; now by default.
Request
curl -X POST https://acme.ext.passway.com/v1/access-profiles:dry-run \
-H "Authorization: Bearer $PASSWAY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"access_policies": [
{
"schedule_id": "sch_01jd8k3m2v9x4q7r5t6w8y0z1a"
}
],
"replaces": "prof_01jd8k3m2v9x4q7r5t6w8y0z1a",
"from": "2026-11-30T14:02:11Z",
"to": "2026-11-30T14:02:11Z"
}'
Response
{
"from": "2026-11-30T14:02:11Z",
"to": "2026-11-30T14:02:11Z",
"people": 0,
"passages": 0,
"truncated": true,
"newly_allowed_count": 0,
"newly_refused_count": 0,
"newly_allowed": [
{
"event_id": "evt_01jd8k3m2v9x4q7r5t6w8y0z1a",
"at": "2026-11-30T14:02:11Z",
"person_id": "per_01jd8k3m2v9x4q7r5t6w8y0z1a",
"access_point_ids": [
"ap_01jd8k3m2v9x4q7r5t6w8y0z1a"
]
}
],
"newly_refused": [
{
"event_id": "evt_01jd8k3m2v9x4q7r5t6w8y0z1a",
"at": "2026-11-30T14:02:11Z",
"person_id": "per_01jd8k3m2v9x4q7r5t6w8y0z1a",
"access_point_ids": [
"ap_01jd8k3m2v9x4q7r5t6w8y0z1a"
]
}
],
"people_gaining": [
"per_01jd8k3m2v9x4q7r5t6w8y0z1a"
],
"people_losing": [
"per_01jd8k3m2v9x4q7r5t6w8y0z1a"
]
}