Schedules
Weekly time windows that access policies refer to.
The schedule model
Weekly time windows. Access is allowed while any rule matches.
Properties
- Name
id- Type
- string
- Description
Schedule 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
time_zone- Type
- string
- Description
Time zone for the rules.
nullmeans each door's site time zone. Can benull.
- Name
rules- Type
- array of objects
- Description
The windows.
- Name
rules[].days- Type
- array of strings
- Description
Days the window applies to. One of
mon,tue,wed,thu,fri,sat,sun.
- Name
rules[].from- Type
- string
- Description
Start of the window, inclusive.
- Name
rules[].to- Type
- string
- Description
End of the window, exclusive.
24:00runs to midnight.
- 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 schedule was created.
- Name
updated_at- Type
- timestamp
- Description
When the schedule last changed.
List schedules
Needs the schedules: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.
Request
curl https://acme.ext.passway.com/v1/schedules \
-H "Authorization: Bearer $PASSWAY_TOKEN"
Response
{
"data": [
{
"id": "sch_01jd8k3m2v9x4q7r5t6w8y0z1a",
"etag": "3f9a",
"name": "weekdays",
"description": "…",
"time_zone": "America/New_York",
"rules": [
{}
],
"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 a schedule
Needs the schedules: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
rules- Type
- array of objects
- Description
The windows, 1 to 32.
Optional attributes
- Name
description- Type
- string
- Description
Free text.
- Name
time_zone- Type
- string
- Description
Time zone for the rules. Leave out to use each door's site time zone.
- Name
rules[].days- Type
- array of strings
- Description
Days the window applies to. One of
mon,tue,wed,thu,fri,sat,sun.
- Name
rules[].from- Type
- string
- Description
Start of the window, inclusive.
- Name
rules[].to- Type
- string
- Description
End of the window, exclusive.
24:00runs to midnight.
- 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/schedules \
-H "Authorization: Bearer $PASSWAY_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"name": "weekdays",
"time_zone": "America/New_York",
"rules": [
{
"days": [
"mon"
],
"from": "07:30",
"to": "07:30"
}
],
"labels": {
"passway.example/cost-center": "4410",
"team": "facilities"
},
"managed_by": "terraform"
}'
Response
{
"id": "sch_01jd8k3m2v9x4q7r5t6w8y0z1a",
"etag": "3f9a",
"name": "weekdays",
"description": "…",
"time_zone": "America/New_York",
"rules": [
{
"days": [
"mon"
],
"from": "07:30",
"to": "07:30"
}
],
"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 a schedule
Needs the schedules:read scope.
Path parameters
- Name
schedule_id- Type
- string
- Description
Schedule ID:
sch_followed by 1 to 64 lowercase letters and digits.
Request
curl https://acme.ext.passway.com/v1/schedules/sch_01jd8k3m2v9x4q7r5t6w8y0z1a \
-H "Authorization: Bearer $PASSWAY_TOKEN"
Response
{
"id": "sch_01jd8k3m2v9x4q7r5t6w8y0z1a",
"etag": "3f9a",
"name": "weekdays",
"description": "…",
"time_zone": "America/New_York",
"rules": [
{
"days": [
"mon"
],
"from": "07:30",
"to": "07:30"
}
],
"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 a schedule
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 schedules:write scope.
Path parameters
- Name
schedule_id- Type
- string
- Description
Schedule ID:
sch_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
time_zone- Type
- string
- Description
New time zone, or
nullto use each door's site time zone. Can benull.
- Name
rules- Type
- array of objects
- Description
New rules, replacing the current ones.
- Name
rules[].days- Type
- array of strings
- Description
Days the window applies to. One of
mon,tue,wed,thu,fri,sat,sun.
- Name
rules[].from- Type
- string
- Description
Start of the window, inclusive.
- Name
rules[].to- Type
- string
- Description
End of the window, exclusive.
24:00runs to midnight.
- 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/schedules/sch_01jd8k3m2v9x4q7r5t6w8y0z1a \
-H "Authorization: Bearer $PASSWAY_TOKEN" \
-H 'If-Match: "3f9a"' \
-H "Content-Type: application/merge-patch+json" \
-d '{
"time_zone": "America/New_York",
"labels": {
"old-label": null,
"team": "security"
}
}'
Response
{
"id": "sch_01jd8k3m2v9x4q7r5t6w8y0z1a",
"etag": "3f9a",
"name": "weekdays",
"description": "…",
"time_zone": "America/New_York",
"rules": [
{
"days": [
"mon"
],
"from": "07:30",
"to": "07:30"
}
],
"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 a schedule
A schedule that access policies use returns 409 with /problems/has-dependents.
Needs the schedules:write scope.
Path parameters
- Name
schedule_id- Type
- string
- Description
Schedule ID:
sch_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/schedules/sch_01jd8k3m2v9x4q7r5t6w8y0z1a \
-H "Authorization: Bearer $PASSWAY_TOKEN" \
-H 'If-Match: "3f9a"'
Response
204 Deleted