POST api/resource/booking?retrospectiveBooking={retrospectiveBooking}

Adds a new resource booking for a user to a specified project or event.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
retrospectiveBooking

(Optional) If true, allows bookings to be created in the past. Defaults to false.

boolean

Default value is False

Body Parameters

The booking object containing user, event, time range, and allocation details.

Booking
NameDescriptionTypeAdditional information
user

string

None.

identifierType

string

None.

resourceEvent

string

None.

eventIdentifierType

string

None.

startTime

string

None.

endTime

string

None.

comment

string

None.

taskID

integer

None.

hoursPerDay

decimal number

None.

timesheet

boolean

None.

Request Formats

application/json, text/json, application/scim+json

Sample:
{
  "user": "sample string 1",
  "identifierType": "sample string 2",
  "resourceEvent": "sample string 3",
  "eventIdentifierType": "sample string 4",
  "startTime": "sample string 5",
  "endTime": "sample string 6",
  "comment": "sample string 7",
  "taskID": 8,
  "hoursPerDay": 9.1,
  "timesheet": true
}

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'Booking'.

Response Information

Resource Description

On success: HTTP 200 OK with the created booking and task IDs. On failure: HTTP 400 Bad Request with a specific validation or processing error.

BookingCTO
NameDescriptionTypeAdditional information
taskID

integer

None.

bookingID

integer

None.

Response Formats

application/json, text/json, application/scim+json

Sample:
{
  "taskID": 1,
  "bookingID": 2
}