POST api/taskbooking/create

Creates a new task and associated booking Supports natural language parameters (project names, user emails, date descriptions)

Request Information

URI Parameters

None.

Body Parameters

Task/booking creation request with flexible parameters

TaskBookingRequest
NameDescriptionTypeAdditional information
Project

Project name or ID (e.g., "Annual Leave" or "42")

string

None.

TaskName

Task/booking name/title

string

None.

StartDate

Start date (ISO format, natural language, or standard date format)

string

None.

EndDate

End date (ISO format, natural language, or standard date format)

string

None.

Tentative

Is this a tentative booking?

boolean

None.

Timesheet

Want to add a timesheet entry for this booking

boolean

None.

Resources

Resource assignments - supports multiple users on same task Example: [ { "User": "colin@company.com", "Hours": 40 }, { "User": "tom", "Hours": 20 }, { "User": "john", "Hours": 30 } ]

Collection of ResourceAssignment

None.

TaskId

Task ID (required for updates)

string

None.

BookingId

Booking/Resource Manager ID (required for updates)

string

None.

Billable

Default billable setting for all resources (overridden by per-resource Billable)

boolean

None.

Request Formats

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

Sample:
{
  "Project": "sample string 1",
  "TaskName": "sample string 2",
  "StartDate": "sample string 3",
  "EndDate": "sample string 4",
  "Tentative": true,
  "Timesheet": true,
  "Resources": [
    {
      "User": "sample string 1",
      "Role": "sample string 2",
      "AllocationType": "sample string 3",
      "AllocationValue": 1.1,
      "Billable": true
    },
    {
      "User": "sample string 1",
      "Role": "sample string 2",
      "AllocationType": "sample string 3",
      "AllocationValue": 1.1,
      "Billable": true
    }
  ],
  "TaskId": "sample string 5",
  "BookingId": "sample string 6",
  "Billable": 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 'TaskBookingRequest'.

Response Information

Resource Description

Created task and booking IDs with resolved parameters

IHttpActionResult

None.

Response Formats

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

Sample:

Sample not available.