Group Calendar Schedules

Retrieve the group’s calendar schedules list

GET /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/calendar_schedules/

Retrieve the group’s calendar 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/calendar_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 Calendar Schedule"
      }
   ]
}
Response JSON Object:

Example request:

GET /api/v1/tenants/foo/groups/foogroup/calendar_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.

Example response:

HTTP/1.1 200 OK
Content-Type: "application/json"

{
   "schedules": [
      {
         "name": "APIO Test Calendar Schedule",
         "level": "Group"
      }
   ]
}
Response JSON Object:
  • schedules (array) – A list of objects as defined in Schedule entry attributes (only in case the Tenant is an Enterprise).

Status Codes:

Create a new group’s calendar schedule instance

POST /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/calendar_schedules/

Create a new group’s calendar schedule instance without any periods.

Authorization Right:minimum Group Admin.

Example request:

POST /api/v1/tenants/foo/groups/foogroup/calendar_schedules/ HTTP/1.1
Host: example.com
Content-Type: "application/json"

{
   "name": "APIO Test Calendar Schedule"
}
Request JSON Object:

Example response:

Response:

Similar to GET instance method response.

Status Codes:

Create a new group’s calendar schedule instance with some periods.

Example request:

POST /api/v1/tenants/foo/groups/foogroup/calendar_schedules/ HTTP/1.1
Host: example.com
Content-Type: "application/json"

{
   "name": "APIO Test Calendar 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:

Example response:

Response:

Similar to GET instance method response.

Status Codes:

Retrieve a group’s calendar schedule instance

GET /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/calendar_schedules/(string: instance_name)/

Retrieve a group’s calendar schedule instance.

Authorization Right:minimum End User.

Example request:

GET /api/v1/tenants/foo/groups/foogroup/calendar_schedules/APIO%20Test%20Calendar%20Schedule/ HTTP/1.1
Host: example.com

Example response:

HTTP/1.1 200 OK
Content-Type: "application/json"

{
   "name": "APIO Test Calendar 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:
Status Codes:

Update a group’s calendar schedule instance

PUT /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/calendar_schedules/(string: instance_name)/

Update a group’s calendar schedule instance.

Authorization Right:minimum Group Admin.

Example request:

PUT /api/v1/tenants/foo/groups/foogroup/calendar_schedules/APIO%20Test%20Calendar%20Schedule/ HTTP/1.1
Host: example.com

{
   "name": "APIO Test Calendar Schedule New"
}
Request JSON Object:

Example response:

Response:

Similar to GET instance method response.

Status Codes:

Update a group’s calendar 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/calendar_schedules/APIO%20Test%20Calendar%20Schedule/ HTTP/1.1
Host: example.com

{
   "name": "APIO Test Calendar 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:

Example response:

Response:

Similar to GET instance method response.

Status Codes:

Delete group’s calendar schedules list

DELETE /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/calendar_schedules/

Delete a group’s calendar schedules list.

Authorization Right:minimum Group Admin.

Example request:

DELETE /api/v1/tenants/foo/groups/foogroup/calendar_schedules/ HTTP/1.1
Host: example.com
Content-Type: "application/json"

{
   "schedules": [
      {
         "name": "APIO Test Calendar Schedule New"
      }
   ]
}
Request JSON Object:

Example response:

HTTP/1.1 200 OK
Content-Type: "application/json"

{}
Status Codes:

Delete a group’s calendar schedule instance

DELETE /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/calendar_schedules/(string: instance_name)/

Delete a group’s calendar schedule instance.

Authorization Right:minimum Group Admin.

Example request:

DELETE /api/v1/tenants/foo/groups/foogroup/calendar_schedules/APIO%20Test%20Calendar%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:

Calendar Schedule Periods

Add public holidays for group’s calendar schedule

POST /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/calendar_schedules/(string: instance_name)/public_holidays/

Add all public holidays for a specific year and country to group’s calendar schedule instance.

Authorization Right:minimum Group Admin.

Example request:

POST /api/v1/tenants/foo/groups/foogroup/calendar_schedules/APIO%20Test%20Calendar%20Schedule/public_holidays/ HTTP/1.1
Host: example.com
Content-Type: "application/json"

{
   "country": "BE",
   "year": 2019,
   "type": "public"
}
Request JSON Object:
  • country (string) – The country of the public holidays to add.

  • year (integer) – The year of the public holidays to add.

  • type (string) – The type of the holidays to add. Allowed values “public”.

Status Codes:

Create a new group’s calendar schedule period instance

POST /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/calendar_schedules/(string: instance_name)/

Create a new group’s calendar schedule period instance.

Authorization Right:minimum Group Admin.

Example request:

POST /api/v1/tenants/foo/groups/foogroup/calendar_schedules/APIO%20Test%20Calendar%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:

Example response:

Response:

Similar to GET instance method response.

Status Codes:

Retrieve a group’s calendar schedule period instance

GET /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/calendar_schedules/(string: instance_name)/(string: sub_instance_name)/

Retrieve a group’s calendar schedule period instance.

Authorization Right:minimum End User.

Example request:

GET /api/v1/tenants/foo/groups/foogroup/calendar_schedules/APIO%20Test%20Calendar%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:
Status Codes:

Update a group’s calendar schedule period instance

PUT /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/calendar_schedules/(string: instance_name)/(string: sub_instance_name)/

Update a group’s calendar schedule period instance.

Authorization Right:minimum Group Admin.

Example request:

POST /api/v1/tenants/foo/groups/foogroup/calendar_schedules/APIO%20Test%20Calendar%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:

Example response:

Response:

Similar to GET instance method response.

Status Codes:

Delete a group’s calendar schedule period instance

DELETE /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/calendar_schedules/(string: instance_name)/(string: sub_instance_name)/

Delete a group’s calendar schedule period instance.

Authorization Right:minimum Group Admin.

Example request:

DELETE /api/v1/tenants/foo/groups/foogroup/calendar_schedules/APIO%20Test%20Calendar%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: