Week Endpoints

Get List of Week Schedules Given User ID

1
/v2/User/{userId}/week

Gets list of GirafRest.Models.DTOs.WeekDTO for all weeks belonging to the user with the provided id, days are not included. A User identifier is needed for the GirafRest.Models.GirafUser to get schedules.

1
/v2/User/{userId}/week

Gets list of GirafRest.Models.DTOs.WeekDTO for all weeks belonging to the user with the provided id, days not are included.

  • A User identifier is needed for the GirafRest.Models.GirafUser to get schedules.

Possible status code responses are 200 Success, 403 Forbidden and 404 Not Found.

Get a List of Week Schedules Given User ID

1
/v1/User/{userId}/week

Gets list of GirafRest.WeekNameDTO for all schedules belonging to the user with the provided id.

  • A User identifier is needed for the GirafRest.Models.GirafUser to get schedules.

Possible status code responses are 200 Success, 403 Forbidden and 404 Not Found.

Get List of Week Schedules with Specified User ID and Week and Year

1
/v1/User/{userId}/week/{weekYear}/{weekNumber}

Gets the GirafRest.Models.DTOs.WeekDTO with the specified week number and year for the user with the given id.

  • userId is the identifier of the GirafRest.Models.GirafUser to request schedule for.
  • weekYear is the year of the week schedule to fetch.
  • weekNumber is the week number of the week schedule to fetch.

Possible status code responses are 200 Success, 403, Forbidden and 404 Not Found.

Update Week Information

1
/v1/User/{userId}/week/{weekYear}/{weekNumber}

Updates the entire information of the week with the given year and week number.

  • userId is the identifier of the GirafRest.Models.GirafUser to request schedule for.
  • weekYear is the year of the week schedule to fetch.
  • weekNumber is the week number of the week schedule to fetch.

An example of a successful week PUT request:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{
      "thumbnail": {
        "id": 0,
        "lastEdit": "2020-10-19T18:49:26.879Z",
        "title": "string",
        "accessLevel": 1,
        "imageHash": "string"
      },
      "name": "string",
      "days": [
        {
          "day": 1,
          "activities": [
            {
              "pictograms": [
                {
                  "id": 0,
                  "lastEdit": "2020-10-19T18:49:26.879Z",
                  "title": "string",
                  "accessLevel": 1,
                  "imageHash": "string"
                }
              ],
              "order": 0,
              "state": 1,
              "id": 0,
              "isChoiceBoard": true,
              "timer": {
                "startTime": 0,
                "progress": 0,
                "fullLength": 0,
                "paused": true,
                "key": 0
              }
            }
          ]
        }
      ]
    }

Possible status code responses are 200 Success, 403, Forbidden and 404 Not Found.

Delete a Week

1
/v1/User/{userId}/week/{weekYear}/{weekNumber}

Deletes all information for the entire week with the given year and week number.

  • {userId} is the identifier of the GirafRest.Models.GirafUser to request a schedule for.
  • {weekYear} is the year of the week schedule to fetch.
  • {weekNumber} is the week number of the week schedule to fetch.

Possible status code responses are 200 Success, 403, Forbidden and 404 Not Found.


Last update: December 12, 2023