Group Advanced Time Schedules¶
Retrieve the group’s advanced time schedules list¶
-
GET
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/advanced_time_schedules/
¶ Retrieve the group’s advanced time schedules list.
Authorization Right:minimum End User.
Restricted authorization rights: minimum Group Admin for these parameters:
allLevels
Example request:
GET /api/v1/tenants/foo/groups/foogroup/advanced_time_schedules/ HTTP/1.1 Host: example.com Content-Type: "application/json"
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" { "schedules": [ { "name": "APIO Test Adv Time Schedule" } ] }
- Response JSON Object:
schedules (array) – A list of objects as defined in Schedule entry attributes.
Example request:
GET /api/v1/tenants/foo/groups/foogroup/advanced_time_schedules/ HTTP/1.1 Host: example.com Content-Type: "application/json" { "allLevels": True }
- Request JSON Object:
allLevels (boolean) – (Optional) If true, the parent level schedules will be included within the response (only in case the Tenant is an Enterprise).
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" { "schedules": [ { "name": "APIO Test Adv Time Schedule", "level": "Group" } ] }
- Response JSON Object:
schedules (array) – A list of objects as defined in Schedule entry attributes.
- Status Codes:
200 OK – no error
Create a new group’s advanced time schedule instance¶
-
POST
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/advanced_time_schedules/
¶ Create a new group’s advanced time schedule instance.
Authorization Right:minimum Group Admin.
Example request:
POST /api/v1/tenants/foo/groups/foogroup/advanced_time_schedules/ HTTP/1.1 Host: example.com Content-Type: "application/json" { "name": "APIO Test Adv Time Schedule" }
- Request JSON Object:
name (string) – see name from Schedule entry attributes.
periods (string) – see periods from Schedule entry attributes.
Example response:
- Response:
Similar to GET instance method response.
- Status Codes:
201 Created – created
400 Bad Request – failed to create
Create a new group’s advanced time schedule instance with some periods.
Example request:
POST /api/v1/tenants/foo/groups/foogroup/advanced_time_schedules/ HTTP/1.1 Host: example.com Content-Type: "application/json" { "name": "APIO Test Adv Time Schedule", "periods" [ { "name": "APIO Test Group Period 1", "type": "Full days", "startDay": "2018-05-01", "stopDay": "2018-05-05" }, { "name": "APIO Test Group Period 2", "type": "Partial days", "startDay": "2018-05-07", "stopDay": "2018-05-12", "startTime": "10:30", "stopTime": "18:30" }, { "name": "APIO Test Group Period 4", "type": "Partial days", "startDay": "2022-05-06", "stopDay": "2022-05-10", "startTime": "10:30", "stopTime": "18:30", "recurrence": { "recurWeekly": { "recurInterval": 1, "Monday": False, "Tuesday": False, "Wednesday": False, "Thursday": False, "Friday": True, "Saturday": False, "Sunday": False }, "recurForEver": False, "recurEndOccurrence": 3 } } ] }
- Request JSON Object:
name (string) – see name from Schedule entry attributes.
periods (string) – see periods from Schedule entry attributes.
Example response:
- Response:
Similar to GET instance method response.
- Status Codes:
201 Created – created
400 Bad Request – failed to create
Retrieve a group’s advanced time schedule instance¶
-
GET
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/advanced_time_schedules/
(string: instance_name)/
¶ Retrieve a group’s advanced time schedule instance.
Authorization Right:minimum End User.
Example request:
GET /api/v1/tenants/foo/groups/foogroup/advanced_time_schedules/APIO%20Test%20Adv%20Time%20Schedule/ HTTP/1.1 Host: example.com
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" { "name": "APIO Test Adv Time Schedule", "periods" [ {"name": "APIO Test Group Period 1"}, {"name": "APIO Test Group Period 2"}, {"name": "APIO Test Group Period 4"}, {"name": "APIO Test Group Period 5"}, {"name": "APIO Test Group Period 6"} ] }
- Response JSON Object:
name (string) – see name from Schedule entry attributes.
periods (array) – see periods from Schedule entry attributes.
- Status Codes:
200 OK – no error
400 Bad Request – failed
404 Not Found – not found
Update a group’s advanced time schedule instance¶
-
PUT
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/advanced_time_schedules/
(string: instance_name)/
¶ Update a group’s advanced time schedule instance.
Authorization Right:minimum Group Admin.
Example request:
PUT /api/v1/tenants/foo/groups/foogroup/advanced_time_schedules/APIO%20Test%20Adv%20Time%20Schedule/ HTTP/1.1 Host: example.com { "name": "APIO Test Adv Time Schedule New" }
- Request JSON Object:
name (string) – see name from Schedule entry attributes.
periods (array) – see periods from Schedule entry attributes.
Example response:
- Response:
Similar to GET instance method response.
- Status Codes:
200 OK – no error
400 Bad Request – failed
Update a group’s advanced time schedule instance with period list (1. update an existing one, 2. delete an existing one, 3. create a new one).
Example request:
PUT /api/v1/tenants/foo/groups/foogroup/advanced_time_schedules/APIO%20Test%20Adv%20Time%20Schedule/ HTTP/1.1 Host: example.com { "name": "APIO Test Adv Time Schedule New", "periods" [ { "name": "APIO Test Group Period 1", "newName": "APIO Test Group Updated Period 1", "startDay": "2018-05-10", "stopDay": "2018-05-20" }, { "name": "APIO Test Group Period 2", "delete": true }, { "name": "APIO Test Group Period 3", "type": "Partial days", "startDay": "2018-05-10", "stopDay": "2018-05-15", "startTime": "12:00", "stopTime": "14:00" } ] }
- Request JSON Object:
name (string) – see name from Schedule entry attributes.
periods (array) – see periods from Schedule entry attributes.
Example response:
- Response:
Similar to GET instance method response.
- Status Codes:
200 OK – no error
400 Bad Request – failed
Delete group’s advanced time schedules list¶
-
DELETE
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/advanced_time_schedules/
¶ Delete a group’s advanced time schedules list.
Authorization Right:minimum Group Admin.
Example request:
DELETE /api/v1/tenants/foo/groups/foogroup/advanced_time_schedules/ HTTP/1.1 Host: example.com Content-Type: "application/json" { "schedules": [ { "name": "APIO Test Adv Time Schedule New" } ] }
- Request JSON Object:
schedules (array) – A list of objects as defined in Schedule entry attributes.
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" {}
- Status Codes:
200 OK – no error
Delete a group’s advanced time schedule instance¶
-
DELETE
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/advanced_time_schedules/
(string: instance_name)/
¶ Delete a group’s advanced time schedule instance.
Authorization Right:minimum Group Admin.
Example request:
DELETE /api/v1/tenants/foo/groups/foogroup/advanced_time_schedules/APIO%20Test%20Adv%20Time%20Schedule%20New/ HTTP/1.1 Host: example.com Content-Type: "application/json"
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" {}
- Status Codes:
200 OK – no error
Advanced Time Schedule Periods¶
Create a new group’s advanced time schedule period instance¶
-
POST
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/advanced_time_schedules/
(string: instance_name)/
¶ Create a new group’s advanced time schedule period instance.
Authorization Right:minimum Group Admin.
Example request:
POST /api/v1/tenants/foo/groups/foogroup/advanced_time_schedules/APIO%20Test%20Adv%20Time%20Schedule/ HTTP/1.1 Host: example.com Content-Type: "application/json" { "name": "APIO Test Group Period 1", "type": "Full days", "startDay": "2018-05-01", "stopDay": "2018-05-05", "recurrence": { "recurWeekly": { "recurInterval": 1, "Monday": False, "Tuesday": False, "Wednesday": False, "Thursday": False, "Friday": True, "Saturday": False, "Sunday": False }, "recurForEver": False, "recurEndOccurrence": 3 } }
- Request JSON Object:
name (string) – see name from Advanced Time Schedule Period entry attributes.
startDay (string) – see startDay from Advanced Time Schedule Period entry attributes.
stopDay (string) – see stopDay from Advanced Time Schedule Period entry attributes.
type (string) – see type from Advanced Time Schedule Period entry attributes.
startTime (string) – see startTime from Advanced Time Schedule Period entry attributes.
stopTime (string) – see stopTime from Advanced Time Schedule Period entry attributes.
recurrence (object) – an object as defined as Schedule recurrence attributes.
Example response:
- Response:
Similar to GET instance method response.
- Status Codes:
201 Created – created
400 Bad Request – failed to create
Retrieve a group’s advanced time schedule period instance¶
-
GET
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/advanced_time_schedules/
(string: instance_name)/
(string: sub_instance_name)/
¶ Retrieve a group’s advanced time schedule period instance.
Authorization Right:minimum End User.
Example request:
GET /api/v1/tenants/foo/groups/foogroup/advanced_time_schedules/APIO%20Test%20Adv%20Time%20Schedule/ HTTP/1.1 Host: example.com
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" { "name": "APIO Test Group Period 1", "type": "Full days", "startDay": "2018-05-01", "stopDay": "2018-05-05", "recurrence": { "recurWeekly": { "recurInterval": 1, "Monday": False, "Tuesday": False, "Wednesday": False, "Thursday": False, "Friday": True, "Saturday": False, "Sunday": False }, "recurForEver": False, "recurEndOccurrence": 3 } }
- Response JSON Object:
name (string) – see name from Advanced Time Schedule Period entry attributes.
startDay (string) – see startDay from Advanced Time Schedule Period entry attributes.
stopDay (string) – see stopDay from Advanced Time Schedule Period entry attributes.
type (string) – see type from Advanced Time Schedule Period entry attributes.
startTime (string) – see startTime from Advanced Time Schedule Period entry attributes.
stopTime (string) – see stopTime from Advanced Time Schedule Period entry attributes.
recurrence (object) – an object as defined as Schedule recurrence attributes.
- Status Codes:
200 OK – no error
400 Bad Request – failed
404 Not Found – not found
Update a group’s advanced time schedule period instance¶
-
PUT
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/advanced_time_schedules/
(string: instance_name)/
(string: sub_instance_name)/
¶ Update a group’s advanced time schedule period instance.
Authorization Right:minimum Group Admin.
Example request:
POST /api/v1/tenants/foo/groups/foogroup/advanced_time_schedules/APIO%20Test%20Adv%20Time%20Schedule/APIO%20Test%20Group%20Period%201/ HTTP/1.1 Host: example.com Content-Type: "application/json" { "name": "APIO Test Group Updated Period 1", "startDay": "2018-05-10", "stopDay": "2018-05-20", "recurrence": { "recurWeekly": { "recurInterval": 1, "Monday": False, "Tuesday": False, "Wednesday": False, "Thursday": False, "Friday": True, "Saturday": False, "Sunday": False }, "recurForEver": False, "recurEndOccurrence": 3 } }
- Request JSON Object:
name (string) – see name from Advanced Time Schedule Period entry attributes.
startDay (string) – see startDay from Advanced Time Schedule Period entry attributes.
stopDay (string) – see stopDay from Advanced Time Schedule Period entry attributes.
type (string) – see type from Advanced Time Schedule Period entry attributes.
startTime (string) – see startTime from Advanced Time Schedule Period entry attributes.
stopTime (string) – see stopTime from Advanced Time Schedule Period entry attributes.
recurrence (object) – an object as defined as Schedule recurrence attributes.
Example response:
- Response:
Similar to GET instance method response.
- Status Codes:
200 OK – no error
400 Bad Request – failed to
Delete a group’s advanced time schedule period instance¶
-
DELETE
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/advanced_time_schedules/
(string: instance_name)/
(string: sub_instance_name)/
¶ Delete a group’s advanced time schedule period instance.
Authorization Right:minimum Group Admin.
Example request:
DELETE /api/v1/tenants/foo/groups/foogroup/advanced_time_schedules/APIO%20Test%20Adv%20Time%20Schedule/APIO%20Test%20Group%20Period%201/ HTTP/1.1 Host: example.com Content-Type: "application/json"
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" {}
- Status Codes:
200 OK – no error