PUT api/resource/{id}/booking/{year}
Replaces a user's resource bookings for a set of projects within a given year.
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| id |
The ID of the user whose bookings are being replaced. |
integer |
Required |
| year |
The calendar year the replacement applies to. |
integer |
Required |
Body Parameters
The project IDs whose existing bookings for the year should be cleared, and the new bookings to create in their place.
ReplaceUserBookings| Name | Description | Type | Additional information |
|---|---|---|---|
| userID | integer |
None. |
|
| eventIds | Collection of integer |
None. |
|
| replacementBookings | Collection of EventBooking |
None. |
Request Formats
application/json, text/json, application/scim+json
Sample:
{
"userID": 1,
"eventIds": [
1,
2
],
"replacementBookings": [
{
"userID": 1,
"resourceEventName": "sample string 2",
"startTime": "2026-08-13T06:38:18.9622602+00:00",
"endTime": "2026-08-13T06:38:18.9622602+00:00"
},
{
"userID": 1,
"resourceEventName": "sample string 2",
"startTime": "2026-08-13T06:38:18.9622602+00:00",
"endTime": "2026-08-13T06:38:18.9622602+00:00"
}
]
}
application/x-www-form-urlencoded
Sample:
Response Information
Resource Description
On success: HTTP 200 OK. On failure: HTTP 400 Bad Request if the input is invalid or the existing bookings could not be deleted.
BookingCTO| Name | Description | Type | Additional information |
|---|---|---|---|
| taskID | integer |
None. |
|
| bookingID | integer |
None. |
Response Formats
application/json, text/json, application/scim+json
Sample:
{
"taskID": 1,
"bookingID": 2
}