Updates a Task for a Schedule.
V10 Endpoint
This endpoint is only supported by v10 schedules. The schedule type can be identified by querying the /schedules/{scheduleId} endpoint.
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.
The unique identifier of the Task.
Request headers
OAuth access token with itwin-platform scope
Setting to application/vnd.bentley.itwin-platform.v1+json is recommended.
Entity to update the Task.
Request body
TaskUpdateRequest (ActualValues)
The amount of time actually consumed in performing the activity. The value is a timestamp of seconds.
The comment of the Task. The comment cannot exceed 1000 characters.
The name of 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 Start Date according to the current project schedule. It can only change for Tasks with Planned Status. nullable: true
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.
A unique Task Id defined by the user.
Example
{ "actualDuration": 3600, "actualFinish": { "dateTime": "2024-12-12T03:21:23Z", "keepDurationWhenEditing": false }, "actualStart": { "dateTime": "2024-12-12T03:21:23Z", "keepDurationWhenEditing": false }, "comment": "Priority Task", "name": "Updated Task", "userDefinedId": "C100" }
TaskUpdateRequest (PlannedValues)
The amount of time actually consumed in performing the activity. The value is a timestamp of seconds.
The comment of the Task. The comment cannot exceed 1000 characters.
The name of 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 Start Date according to the current project schedule. It can only change for Tasks with Planned Status. nullable: true
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.
A unique Task Id defined by the user.
Example
{ "comment": "Priority Task", "name": "Updated Task", "plannedDuration": 2600, "plannedFinish": { "dateTime": "2024-12-12T03:21:23Z", "keepDurationWhenEditing": false }, "plannedStart": { "dateTime": "2024-12-12T03:21:23Z", "keepDurationWhenEditing": false }, "userDefinedId": "C100" }
TaskUpdateRequest (RemainingDuration)
The amount of time actually consumed in performing the activity. The value is a timestamp of seconds.
The comment of the Task. The comment cannot exceed 1000 characters.
The name of 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 Start Date according to the current project schedule. It can only change for Tasks with Planned Status. nullable: true
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.
A unique Task Id defined by the user.
Example
{ "comment": "Priority Task", "name": "Updated Task", "remainingDuration": 2000, "userDefinedId": "C100" }
Response 202 Accepted
This response indicates that the requested long-running operation was Accepted.
{ "operation": { "id": "1604789f-68c4-46ba-b20d-8a19f8319362" }, "task": { "id": "ae73d684-2878-424e-bab2-025eafbf766b" }, "_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": "The 'actualDuration' property must be between 60 and 2147483647.", "target": "actualDuration" }, { "code": "InvalidValue", "message": "The 'comment' property must not exceed 1000 characters.", "target": "comment" }, { "code": "InvalidValue", "message": "The 'plannedDuration' property must be between 60 and 2147483647.", "target": "plannedDuration" }, { "code": "InvalidValue", "message": "The 'remainingDuration' property must be between 60 and 2147483647.", "target": "remainingDuration" } ], "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 update 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 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." }
Task Update Request
Container for the Task to be updated.
The amount of time actually consumed in performing the activity. The value is a timestamp of seconds.
The comment of the Task. The comment cannot exceed 1000 characters.
The name of 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 Start Date according to the current project schedule. It can only change for Tasks with Planned Status. nullable: true
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.
A unique Task Id defined by the user.
{ "title": "Task Update Request", "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": { "$ref": "#/components/schemas/UpdateTaskDateTimeModel", "description": "The date on which the activity actually finished.", "nullable": true }, "actualStart": { "$ref": "#/components/schemas/UpdateTaskDateTimeModel", "description": "The date on which the activity is actually started.", "nullable": true }, "comment": { "type": "string", "description": "The comment of the Task. The comment cannot exceed 1000 characters.", "nullable": true }, "name": { "type": "string", "description": "The name of the 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 }, "plannedFinish": { "$ref": "#/components/schemas/UpdateTaskDateTimeModel", "description": "The Finish Date according to the current project schedule. It can only change for Tasks with Planned Status.", "nullable": true }, "plannedStart": { "$ref": "#/components/schemas/UpdateTaskDateTimeModel", "description": "The Start Date according to the current project schedule. It can only change for Tasks with Planned Status. nullable: true" }, "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 }, "userDefinedId": { "type": "string", "description": "A unique Task Id defined by the user.", "nullable": true } }, "additionalProperties": false, "description": "Container for the Task to be updated." }
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." }
Task Update Date Time Model
Container for updating Task date objects.
Signifies the date.
Should the duration be kept when editing the date.
{ "title": "Task Update Date Time Model", "type": "object", "properties": { "dateTime": { "type": "string", "description": "Signifies the date.", "format": "date-time" }, "keepDurationWhenEditing": { "type": "boolean", "description": "Should the duration be kept when editing the date." } }, "additionalProperties": false, "description": "Container for updating Task date objects." }
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 }