Skip to main content

Schedules API 1.6.0

Schedules and time intervals used by access rules.

Base path: https://{controller_ip}/api/v1. API description version: 1.6.0.

Examples use placeholder values for passwords, tokens, UUIDs, addresses and secrets. Replace them with values from your controller before sending requests.

Section methods

MethodPath
GET/schedules/
GET/schedules/{uuid}
POST/schedules/
PUT/schedules/{uuid}
DELETE/schedules/{uuid}

GET /schedules/

Section: Schedules.

Returns data for the schedules endpoint /schedules/.

Request example

curl -k -X GET "https://{controller_ip}/api/v1/schedules/" \
-H "Authorization: Bearer <token>"

Response command example

curl -k -sS -X GET "https://{controller_ip}/api/v1/schedules/" \
-H "Authorization: Bearer <token>" | jq .

Response example

{
"data": [],
"meta": {
"api_version": "1.6.0",
"path": "/schedules/"
}
}

GET /schedules/{uuid}

Section: Schedules.

Returns data for the schedules endpoint /schedules/{uuid}.

Request example

curl -k -X GET "https://{controller_ip}/api/v1/schedules/{uuid}" \
-H "Authorization: Bearer <token>"

Response command example

curl -k -sS -X GET "https://{controller_ip}/api/v1/schedules/{uuid}" \
-H "Authorization: Bearer <token>" | jq .

Response example

{
"data": [],
"meta": {
"api_version": "1.6.0",
"path": "/schedules/{uuid}"
}
}

POST /schedules/

Section: Schedules.

Creates a record or starts an operation for the schedules endpoint /schedules/.

Request example

curl -k -X POST "https://{controller_ip}/api/v1/schedules/" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
--data-raw '{
"name": "Working hours",
"intervals": [
{
"days": [
"mon",
"tue",
"wed",
"thu",
"fri"
],
"from": "09:00",
"to": "18:00"
}
]
}'

Request body example

{
"name": "Working hours",
"intervals": [
{
"days": [
"mon",
"tue",
"wed",
"thu",
"fri"
],
"from": "09:00",
"to": "18:00"
}
]
}

Response command example

curl -k -sS -X POST "https://{controller_ip}/api/v1/schedules/" \
-H "Authorization: Bearer <token>" | jq .

Response example

{
"status": "success",
"data": {
"uuid": "<uuid>"
}
}

PUT /schedules/{uuid}

Section: Schedules.

Updates data for the schedules endpoint /schedules/{uuid}.

Request example

curl -k -X PUT "https://{controller_ip}/api/v1/schedules/{uuid}" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
--data-raw '{
"name": "Working hours",
"intervals": [
{
"days": [
"mon",
"tue",
"wed",
"thu",
"fri"
],
"from": "09:00",
"to": "18:00"
}
]
}'

Request body example

{
"name": "Working hours",
"intervals": [
{
"days": [
"mon",
"tue",
"wed",
"thu",
"fri"
],
"from": "09:00",
"to": "18:00"
}
]
}

Response command example

curl -k -sS -X PUT "https://{controller_ip}/api/v1/schedules/{uuid}" \
-H "Authorization: Bearer <token>" | jq .

Response example

{
"status": "success",
"data": {
"uuid": "<uuid>"
}
}

DELETE /schedules/{uuid}

Section: Schedules.

Deletes data for the schedules endpoint /schedules/{uuid}.

Request example

curl -k -X DELETE "https://{controller_ip}/api/v1/schedules/{uuid}" \
-H "Authorization: Bearer <token>"

Response command example

curl -k -sS -X DELETE "https://{controller_ip}/api/v1/schedules/{uuid}" \
-H "Authorization: Bearer <token>" | jq .

Response example

{
"status": "success",
"deleted": true
}