Creates a Task for a Schedule.
Tasks are but not limited to portions of work that are used to help determine the overall workload required and timeframe needed to complete the project.
Task Types
Tasks can be of differing types. The following Task types have different behaviors:
- Work: The default Task type. Work represents an expenditure of effort and resources achieving the Task. Work type Tasks have a Start, Finish and a Duration.
- StartKeyDate: A Project Milestone - setting a Task as a Key Date will also change its representation in the Gantt Chart to a diamond, and give the Task a zero duration. Start Key Dates have no Finish Date or Duration.
- FinishKeyDate: A Project Milestone - setting a Task as a Key Date will also change its representation in the Gantt Chart to a diamond, and give the Task a zero duration. Finish Key Dates have no Start Date or Duration.
- ShortHammock: Spans the shortest duration between all its predecessor and successor Tasks. The Start, Finish, and Duration of the Short Hammock is derived from its predecessor and successor Tasks and cannot be edited directly.
- LongHammock: Spans the longest duration between all its predecessor and successor Tasks. The Start, Finish, and Duration of the Long Hammock is derived from its predecessor and successor Tasks and cannot be edited directly
The remaining Task Types behave the same as the Work type and can be used to help label Tasks.
Operation
Operations, also known as LROs (Long Running Operations), are time-consuming tasks that would not be completed in the appropriate timeframe for a single request response. Endpoints that use operations return an operation id that can be used on a separate endpoint to track the progress of the task that is being handled.
Authentication
Requires Authorization
header with valid Bearer token for scope itwin-platform
.
For more documentation on authorization and how to get access token visit OAUTH2 Authorization page.
Rate limits
All iTwin Platform API operations have a rate limit. For more documentation on that visit Rate limits and quotas page.
Request parameters
The unique identifier of the Schedule.
Request headers
OAuth access token with itwin-platform
scope
Setting to application/vnd.bentley.itwin-platform.v1+json
is recommended.
Request body
Task Create Request
The comment of the Task. The comment cannot exceed 1000 characters.
The unique identifier of the Task.
The name of the Task.
The unique identifier of the parent Task.
The time allotted to complete a Task. It can only change for Tasks with Planned Status. The value is a timestamp of seconds.
The Start Date of the Task.
The unique identifier of the Rule.
A URL associated with the Task.
A unique Task Id defined by the user.
Example
{ "comment": "Comment about demolishing", "id": "fc3673d9-e385-4031-abbe-663535a329f5", "name": "Demolish Old Building", "parentId": "e3e4f597-8b58-4c0a-8931-1f3f55a7b34b", "plannedDuration": 144000, "plannedStart": "2019-12-02T08:00:00Z", "type": "Work", "url": "https://example.com", "userDefinedId": "D256" }
Response 201 Created
This response indicates that the requested Task was Created.
{ "operation": { "id": "1604789f-68c4-46ba-b20d-8a19f8319362" }, "task": { "actualDuration": 230400, "actualFinish": "2019-11-15T12:00:00Z", "actualPhysicalQuantity": 0, "actualStart": "2019-11-04T12:00:00Z", "calendarId": "8fad9677-a26d-452d-b3fb-42fcf3be782e", "comment": "Comment about demolishing", "constraintEarlyDate": "2019-11-04T08:00:00Z", "constraintLateDate": null, "constraintType": "StartAfter", "deleted": false, "durationType": "Fixed", "estimatedRate": 0, "expectedFinish": null, "id": "fc3673d9-e385-4031-abbe-663535a329f5", "isWbs": false, "name": "Demolish Old Building", "parentId": "e3e4f597-8b58-4c0a-8931-1f3f55a7b34b", "percentComplete": 100, "physicalQuantity": 0, "physicalQuantityUnit": "Unknown", "plannedDuration": 144000, "plannedFinish": "2019-12-06T05:00:00Z", "plannedPhysicalQuantity": 0, "plannedStart": "2019-12-02T08:00:00Z", "progressType": "Duration", "remainingDuration": null, "remainingPhysicalQuantity": 0, "ruleId": null, "status": "Finished", "statusId": "20cf6c69-b9df-422a-a509-a164c59d668b", "type": "Work", "url": "", "userDefinedId": "D256" }, "_links": { "operationLocation": { "href": "https://api.bentley.com/schedules/5e11b21e-cba2-48a8-a2c1-2977d2d373e0/operations/1604789f-68c4-46ba-b20d-8a19f8319362" } } }
Response headers
A header that identifies a specific version of a resource or resource collection. For more information see the official documentation.
A header that identifies the location of a specific resource. For more information see the official documentation.
The unique identifier of the Operation.
URL to the Operations endpoint with pre-entered Operation ID.
Response 202 Accepted
This response indicates that the requested long-running operation was Accepted.
{ "operation": { "id": "1604789f-68c4-46ba-b20d-8a19f8319362" }, "task": { "id": "fc3673d9-e385-4031-abbe-663535a329f5" }, "_links": { "operationLocation": { "href": "https://api.bentley.com/schedules/5e11b21e-cba2-48a8-a2c1-2977d2d373e0/operations/1604789f-68c4-46ba-b20d-8a19f8319362" } } }
Response headers
The unique identifier of the Operation.
URL to the Operations endpoint with pre-entered Operation ID.
Response 400 Bad Request
The 400 (Bad Request) status code indicates that the request cannot be processed by the server due to a client error (e.g. malformed request syntax)
{ "error": { "code": "InvalidSchedulesRequest", "details": [{ "code": "InvalidValue", "message": "Provided 'parentId' value is not valid. Requested Task is not available.", "target": "parentId" }], "message": "The request contains invalid properties." } }
Response 401 Unauthorized
This response indicates that request lacks valid authentication credentials. Access token might not been provided, issued by the wrong issuer, does not have required scopes or request headers were malformed.
{ "error": { "code": "HeaderNotFound", "message": "Header Authorization was not found in the request. Access denied." } }
Response 403 Forbidden
User is not authorized to create a Task.
{ "error": { "code": "InsufficientPermissions", "message": "The user has insufficient permissions for the requested operation." } }
Response 404 Not Found
This response indicates that the provided Schedule is not available.
{ "error": { "code": "ScheduleNotFound", "message": "Requested Schedule is not available.", "target": "scheduleId" } }
Response 409 Conflict
Indicates that the entity being created conflicts with an existing one.
{ "error": { "code": "TaskExists", "message": "Task with provided Id already exists." } }
Response 429 Too many requests
This response indicates that the client sent more requests than allowed by this API for the current tier of the client.
{ "error": { "code": "RateLimitExceeded", "message": "The client sent more requests than allowed by this API for the current tier of the client." } }
Response headers
Number of seconds to wait until client is allowed to make more requests.
Link
Hyperlink container.
Hyperlink to the specific entity.
{ "type": "object", "properties": { "href": { "type": "string", "description": "Hyperlink to the specific entity." } }, "additionalProperties": false, "description": "Hyperlink container." }
Operation Create Response Properties
Contains the id of the created long-running operation.
The unique identifier of the Operation.
{ "title": "Operation Create Response Properties", "type": "object", "properties": { "id": { "type": "string", "description": "The unique identifier of the Operation.", "nullable": true } }, "additionalProperties": false, "description": "Contains the id of the created long-running operation." }
Operation Location
Contains the URL to the Operations endpoint to check the information about a long-running operation.
{ "title": "Operation Location", "type": "object", "properties": { "operationLocation": { "$ref": "#/components/schemas/Link", "description": "URL to the Operations endpoint with pre-entered Operation ID." } }, "additionalProperties": false, "description": "Contains the URL to the Operations endpoint to check the information about a long-running operation." }
Resource Unit Type
The possible unit types for resources.
{ "title": "Resource Unit Type", "enum": [ "CubicFeet", "CubicMeter", "Liter", "Millimeter", "Meter", "Feet", "Each", "Pair", "Dozen", "Gross", "SqFoot", "SqYard", "SqMeter", "Pound", "Gram", "Kilo", "Bag", "Box", "Bucket", "Bundle", "Card", "Carton", "Coil", "Pack", "Pegs", "Length", "Outer", "Pallet", "Roll", "Sachet", "Set", "Sheet", "Ton", "Person", "Item", "CubicYard", "MetricTon", "Hour", "LinearMeter", "Unknown" ], "type": "string", "description": "The possible unit types for resources." }
Task
Representation of a Task.
The amount of time actually consumed in performing the activity. The value is a timestamp of seconds.
The date on which the activity actually finished.
The physical quantity completed to date.
The date on which the activity is actually started.
The unique identifier of the assigned Calendar.
The comment of the Task.
Early date in the date range for Task Constraint Types: StartBetween, FinishBetween, WorkBetween, WorkOut.
Late date in the date range for Task Constraint Types: StartBetween, FinishBetween, WorkBetween, WorkOut.
Task Constraints determine the rules under which a Task can be started and rescheduled.
Is this Task deleted.
The Duration Type of a Task specifies how the Task duration will be calculated.
The estimated production rate to accomplish the given Physical Quantity in the given Duration (when Duration Type is Fixed).
The expected Task End Date, based upon the Actual Start plus the Percent Complete and Remaining Duration.
The unique identifier of the Task.
Is Task a Work Breakdown Structure (WBS).
The name of the Task.
The unique identifier of the parent Task.
The due level of progress for the Task as a percentage of its overall duration. Depends on the Progress Type selected.
The total quantity required by the Task, used to calculate the duration of a Physical Quantity Dependent Task.
The unit used to measure the Physical Quantity assigned to the Task.
The time allotted to complete a Task. It can only change for Tasks with Planned Status. The value is a timestamp of seconds.
The Finish Date according to the current project schedule. It can only change for Tasks with Planned Status.
The planned physical quantity.
The Start Date according to the current project schedule. It can only change for Tasks with Planned Status.
The amount of work time required to complete the Task. It is automatically calculated from the Percent Complete or can be entered manually once a Task has been Started. The value is a timestamp of seconds.
The physical quantity required to complete the Task.
The unique identifier of the Rule.
The unique identifier of the Task Status.
A URL associated with the Task.
A unique Task Id defined by the user.
{ "title": "Task", "type": "object", "properties": { "actualDuration": { "type": "integer", "description": "The amount of time actually consumed in performing the activity. The value is a timestamp of seconds.", "format": "int32", "nullable": true }, "actualFinish": { "type": "string", "description": "The date on which the activity actually finished.", "format": "date-time", "nullable": true }, "actualPhysicalQuantity": { "type": "number", "description": "The physical quantity completed to date.", "format": "double" }, "actualStart": { "type": "string", "description": "The date on which the activity is actually started.", "format": "date-time", "nullable": true }, "calendarId": { "type": "string", "description": "The unique identifier of the assigned Calendar." }, "comment": { "type": "string", "description": "The comment of the Task.", "nullable": true }, "constraintEarlyDate": { "type": "string", "description": "Early date in the date range for Task Constraint Types: StartBetween, FinishBetween, WorkBetween, WorkOut.", "format": "date-time", "nullable": true }, "constraintLateDate": { "type": "string", "description": "Late date in the date range for Task Constraint Types: StartBetween, FinishBetween, WorkBetween, WorkOut.", "format": "date-time", "nullable": true }, "constraintType": { "$ref": "#/components/schemas/TaskConstraintType", "description": "Task Constraints determine the rules under which a Task can be started and rescheduled." }, "deleted": { "type": "boolean", "description": "Is this Task deleted.", "nullable": true }, "durationType": { "$ref": "#/components/schemas/TaskDurationType", "description": "The Duration Type of a Task specifies how the Task duration will be calculated." }, "estimatedRate": { "type": "number", "description": "The estimated production rate to accomplish the given Physical Quantity in the given Duration (when Duration Type is Fixed).", "format": "double" }, "expectedFinish": { "type": "string", "description": "The expected Task End Date, based upon the Actual Start plus the Percent Complete and Remaining Duration.", "format": "date-time", "nullable": true }, "id": { "type": "string", "description": "The unique identifier of the Task." }, "isWbs": { "type": "boolean", "description": "Is Task a Work Breakdown Structure (WBS)." }, "name": { "type": "string", "description": "The name of the Task." }, "parentId": { "type": "string", "description": "The unique identifier of the parent Task.", "nullable": true }, "percentComplete": { "type": "integer", "description": "The due level of progress for the Task as a percentage of its overall duration. Depends on the Progress Type selected.", "format": "int32" }, "physicalQuantity": { "type": "number", "description": "The total quantity required by the Task, used to calculate the duration of a Physical Quantity Dependent Task.", "format": "double" }, "physicalQuantityUnit": { "$ref": "#/components/schemas/ResourceUnitType", "description": "The unit used to measure the Physical Quantity assigned to the Task." }, "plannedDuration": { "type": "integer", "description": "The time allotted to complete a Task. It can only change for Tasks with Planned Status. The value is a timestamp of seconds.", "format": "int32" }, "plannedFinish": { "type": "string", "description": "The Finish Date according to the current project schedule. It can only change for Tasks with Planned Status.", "format": "date-time" }, "plannedPhysicalQuantity": { "type": "number", "description": "The planned physical quantity.", "format": "double" }, "plannedStart": { "type": "string", "description": "The Start Date according to the current project schedule. It can only change for Tasks with Planned Status.", "format": "date-time" }, "progressType": { "$ref": "#/components/schemas/TaskProgressType", "description": "This value specifies way that Progress is determined." }, "remainingDuration": { "type": "integer", "description": "The amount of work time required to complete the Task. It is automatically calculated from the Percent Complete or can be entered manually once a Task has been Started. The value is a timestamp of seconds.", "format": "int32", "nullable": true }, "remainingPhysicalQuantity": { "type": "number", "description": "The physical quantity required to complete the Task.", "format": "double" }, "ruleId": { "type": "string", "description": "The unique identifier of the Rule.", "nullable": true }, "status": { "$ref": "#/components/schemas/TaskStatusType", "description": "The current Task status." }, "statusId": { "type": "string", "description": "The unique identifier of the Task Status." }, "type": { "$ref": "#/components/schemas/TaskType", "description": "Task Type provides a categorization (or classification) of project Tasks." }, "url": { "type": "string", "description": "A URL associated with the Task." }, "userDefinedId": { "type": "string", "description": "A unique Task Id defined by the user." } }, "additionalProperties": false, "description": "Representation of a Task." }
Task Constraint Type
Task Constraints determine the rules under which a Task can be started and rescheduled. See the Task Constraint Types section for details.
{ "title": "Task Constraint Type", "enum": [ "NoConstraint", "CannotReschedule", "StartAsap", "StartAlap", "StartOn", "StartAfter", "StartBefore", "StartBetween", "FinishOn", "FinishAfter", "FinishBefore", "FinishBetween", "MandatoryStart", "MandatoryFinish", "WorkBetween", "WorkOut", "Unknown" ], "type": "string", "description": "Task Constraints determine the rules under which a Task can be started and rescheduled. See the [Task Constraint Types](#task-constraint-types) section for details." }
Task Create Request
Properties of the Task to be created.
The comment of the Task. The comment cannot exceed 1000 characters.
The unique identifier of the Task.
The name of the Task.
The unique identifier of the parent Task.
The time allotted to complete a Task. It can only change for Tasks with Planned Status. The value is a timestamp of seconds.
The Start Date of the Task.
The unique identifier of the Rule.
A URL associated with the Task.
A unique Task Id defined by the user.
{ "title": "Task Create Request", "type": "object", "properties": { "comment": { "type": "string", "description": "The comment of the Task. The comment cannot exceed 1000 characters.", "nullable": true }, "id": { "type": "string", "description": "The unique identifier of the Task.", "nullable": true }, "name": { "type": "string", "description": "The name of the Task." }, "parentId": { "type": "string", "description": "The unique identifier of the parent Task.", "nullable": true }, "plannedDuration": { "type": "integer", "description": "The time allotted to complete a Task. It can only change for Tasks with Planned Status. The value is a timestamp of seconds.", "format": "int32", "nullable": true }, "plannedStart": { "type": "string", "description": "The Start Date of the Task.", "format": "date-time" }, "ruleId": { "type": "string", "description": "The unique identifier of the Rule.", "nullable": true }, "type": { "$ref": "#/components/schemas/TaskType", "description": "The type of the Task." }, "url": { "type": "string", "description": "A URL associated with the Task.", "nullable": true }, "userDefinedId": { "type": "string", "description": "A unique Task Id defined by the user.", "nullable": true } }, "additionalProperties": false, "description": "Properties of the Task to be created." }
Task Create Response
Contains properties of the created task.
Contains properties of the created long-running operation.
Contains the hyperlink to the Operations endpoint to check the operation information.
{ "title": "Task Create Response", "type": "object", "properties": { "operation": { "$ref": "#/components/schemas/OperationCreateResponseProperties", "description": "Contains properties of the created long-running operation.", "nullable": true }, "task": { "$ref": "#/components/schemas/Task", "description": "Properties of the Task." }, "_links": { "$ref": "#/components/schemas/OperationLocationLink", "description": "Contains the hyperlink to the Operations endpoint to check the operation information.", "nullable": true } }, "additionalProperties": false, "description": "Contains properties of the created task.", "x-codegen-extends-class": "OperationCreateResponse" }
Task Duration Type
The Task duration type value specifies way that Task Duration is determined. See the Task Duration Types section for details.
{ "title": "Task Duration Type", "enum": [ "Fixed", "PhysicalQuantityDependent", "ResourceUnitsDependent", "Unknown" ], "type": "string", "description": "The Task duration type value specifies way that Task Duration is determined. See the [Task Duration Types](#task-duration-types) section for details." }
Task Progress Type
The Task progress type value specifies way that Task Progress is determined. See the Task Progress Types section for details.
{ "title": "Task Progress Type", "enum": [ "Automatic", "Manual", "Duration", "Physical", "Unit", "Unknown" ], "type": "string", "description": "The Task progress type value specifies way that Task Progress is determined. See the [Task Progress Types](#task-progress-types) section for details." }
Task Status Type
Task status type specifies the current status of the Task.
{ "title": "Task Status Type", "enum": [ "Planned", "Started", "Finished", "Unknown" ], "type": "string", "description": "Task status type specifies the current status of the Task." }
Task Type
Task Type provides a categorization (or classification) of project Tasks. See the Task Types section for details.
{ "title": "Task Type", "enum": [ "Work", "StartKeyDate", "FinishKeyDate", "ShortHammock", "LongHammock", "Rfi", "ChangeOrder", "Testing", "Delivery", "Meeting", "Rework", "Design", "Maintenance", "Manufacture", "Storage", "Purchase", "Receive", "Delay", "WeatherDelay", "Unknown" ], "type": "string", "description": "Task Type provides a categorization (or classification) of project Tasks. See the [Task Types](#task-types) section for details." }
Task Operation Response
Contains properties of the created long-running operation, and a link to this operation.
Contains properties of the created long-running operation.
Contains the hyperlink to the Operations endpoint to check the operation information.
{ "title": "Task Operation Response", "type": "object", "properties": { "operation": { "$ref": "#/components/schemas/OperationCreateResponseProperties", "description": "Contains properties of the created long-running operation." }, "task": { "$ref": "#/components/schemas/TaskOperationResponseProperties", "description": "Properties of the Task." }, "_links": { "$ref": "#/components/schemas/OperationLocationLink", "description": "Contains the hyperlink to the Operations endpoint to check the operation information." } }, "additionalProperties": false, "description": "Contains properties of the created long-running operation, and a link to this operation.", "x-codegen-extends-class": "OperationCreateResponse" }
Task Operation Response Properties
Contains properties of the Task that is queued for an Operation.
The unique identifier of the Task.
{ "title": "Task Operation Response Properties", "type": "object", "properties": { "id": { "type": "string", "description": "The unique identifier of the Task." } }, "additionalProperties": false, "description": "Contains properties of the Task that is queued for an Operation." }
DetailedError
Contains error information and an array of more specific errors.
One of a server-defined set of error codes.
A human-readable representation of the error.
The target of the error.
{ "type": "object", "description": "Contains error information and an array of more specific errors.", "properties": { "code": { "type": "string", "description": "One of a server-defined set of error codes." }, "message": { "type": "string", "description": "A human-readable representation of the error." }, "target": { "type": "string", "description": "The target of the error.", "nullable": true }, "details": { "type": "array", "description": "Optional array of more specific errors.", "items": { "$ref": "#/components/schemas/Error" } } }, "required": [ "code", "message", "details" ], "additionalProperties": true }
Detailed Error Response
Gives details for an error that occurred while handling the request. Note that clients MUST NOT assume that every failed request will produce an object of this schema, or that all of the properties in the response will be non-null, as the error may have prevented this response from being constructed.
{ "type": "object", "title": "Detailed Error Response", "description": "Gives details for an error that occurred while handling the request. Note that clients MUST NOT assume that every failed request will produce an object of this schema, or that all of the properties in the response will be non-null, as the error may have prevented this response from being constructed.", "properties": { "error": { "description": "Error Detailed information.", "$ref": "#/components/schemas/DetailedError" } }, "required": [ "error" ], "additionalProperties": false }
Error
Contains error information.
One of a server-defined set of error codes.
A human-readable representation of the error.
The target of the error.
{ "type": "object", "description": "Contains error information.", "properties": { "code": { "type": "string", "description": "One of a server-defined set of error codes." }, "message": { "type": "string", "description": "A human-readable representation of the error." }, "target": { "type": "string", "description": "The target of the error.", "nullable": true } }, "required": [ "code", "message" ], "additionalProperties": true }
Error Response
Gives details for an error that occurred while handling the request. Note that clients MUST NOT assume that every failed request will produce an object of this schema, or that all of the properties in the response will be non-null, as the error may have prevented this response from being constructed.
{ "type": "object", "title": "Error Response", "description": "Gives details for an error that occurred while handling the request. Note that clients MUST NOT assume that every failed request will produce an object of this schema, or that all of the properties in the response will be non-null, as the error may have prevented this response from being constructed.", "properties": { "error": { "description": "Error information.", "$ref": "#/components/schemas/Error" } }, "required": [ "error" ], "additionalProperties": false }
Was this page helpful?