Creates a Task Query Filter for a Schedule.
Task Query Filter
Task Query Filters allows to define rules on how to filter tasks. They can then be used to filter tasks on the client side. These filters can be shared with others.
Task Query Filter Operations
Based on the property type it can have different types of operations to perform when filtering data.
- Number or DateTime:
- Equals
- NotEquals
- More
- Less
- MoreOrEqual
- LessOrEqual
- Enum or Boolean:
- Equals
- NotEquals
- Text:
- Equals
- NotEquals
- Contains
- StartsWith
- EndsWith
- NotContains
- NotStartsWith
- NotEndsWith
- ContainsCaseInsensitive
- StartsWithCaseInsensitive
- EndsWithCaseInsensitive
- EqualsCaseInsensitive
- NotEqualsCaseInsensitive
- NotContainsCaseInsensitive
- NotStartsWithCaseInsensitive
- NotEndsWithCaseInsensitive
V10 Endpoint
This endpoint is only supported by v10 schedules. The schedule type can be identified by querying the /schedules/{scheduleId} endpoint.
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 Query Filter Create Request
The unique identifier of the Task Query Filter.
Is this Task Query Filter shared.
The name of the Task Query Filter.
The version of the Task Query Filter.
Should the children of filtered tasks be shown.
Example
{ "id": "bfe4d22d-027c-45d4-b3cc-50ecfa4b1bd7", "isShared": true, "name": "Nearly completed work", "taskName": { "operation": "EndsWith", "values": ["TaskSuffix"] }, "taskPercentComplete": { "operation": "MoreOrEqual", "values": [90] }, "taskType": { "operation": "Equals", "values": ["Work"] }, "version": 1, "withChildren": true }
Response 201 Created
Created
{ "taskQueryFilter": { "createdBy": "ca76991e-3b1a-4c9a-9b90-e4fcf7beec52", "deleted": false, "id": "bfe4d22d-027c-45d4-b3cc-50ecfa4b1bd7", "isShared": true, "name": "Nearly completed work", "taskActualDuration": null, "taskActualPhysicalQuantity": null, "taskConstraintEarlyDate": null, "taskConstraintLateDate": null, "taskConstraintType": null, "taskDurationType": null, "taskEstimatedRate": null, "taskExpectedFinish": null, "taskIsWbs": null, "taskName": null, "taskPercentComplete": { "operation": "MoreOrEqual", "values": [90] }, "taskPhysicalQuantityUnit": null, "taskPlannedDuration": null, "taskPlannedPhysicalQuantity": null, "taskRemainingPhysicalQuantity": null, "taskStatus": null, "taskType": { "operation": "Equals", "values": ["Work"] }, "taskUrl": null, "taskUserDefinedId": null, "version": 1, "withChildren": true } }
Response headers
A header that identifies the location of a specific resource. For more information see the official documentation.
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": "MissingRequiredProperty", "message": "Required property is missing.", "target": "name" }, { "code": "MissingRequiredProperty", "message": "Required property is missing.", "target": "version" }, { "code": "InvalidProperty", "message": "The 'values' property must not contain more than 200 items.", "target": "taskPercentComplete.values" }, { "code": "InvalidProperty", "message": "The 'values' property must not be empty.", "target": "taskName.values" }], "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 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": "TaskQueryFilterExists", "message": "Task Query Filter 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.
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.
{ "required": [ "code", "message" ], "type": "object", "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 } }, "description": "Contains error information." }
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.
{ "required": [ "code", "message", "details" ], "type": "object", "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", "items": { "$ref": "#/components/schemas/Error" }, "description": "Optional array of more specific errors." } }, "description": "Contains error information and an array of more specific errors." }
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.
{ "title": "Detailed Error Response", "required": [ "error" ], "type": "object", "properties": { "error": { "$ref": "#/components/schemas/DetailedError" } }, "additionalProperties": false, "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." }
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.
{ "title": "Error Response", "required": [ "error" ], "type": "object", "properties": { "error": { "$ref": "#/components/schemas/Error" } }, "additionalProperties": false, "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." }
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." }
Filter Number Operation
Defines the type of number matching operation for filtering. The match succeeds if a value matches any of the provided filter values. Note that only the Equals operation makes sense if providing multiple filter values.
{ "title": "Filter Number Operation", "enum": [ "Equals", "NotEquals", "More", "Less", "MoreOrEqual", "LessOrEqual" ], "type": "string", "description": "Defines the type of number matching operation for filtering. The match succeeds if a value matches any of the provided filter values. Note that only the Equals operation makes sense if providing multiple filter values." }
Int32 Filter Field
Representation of a filter field for int32 numeric values.
{ "title": "Int32 Filter Field", "type": "object", "properties": { "operation": { "$ref": "#/components/schemas/FilterNumberOperation" }, "values": { "type": "array", "items": { "type": "integer", "format": "int32" }, "description": "Int32 numeric values to filter by." } }, "additionalProperties": false, "description": "Representation of a filter field for int32 numeric values." }
Double Filter Field
Representation of a filter field for double numeric values.
{ "title": "Double Filter Field", "type": "object", "properties": { "operation": { "$ref": "#/components/schemas/FilterNumberOperation" }, "values": { "type": "array", "items": { "type": "number", "format": "double" }, "description": "Double numeric values to filter by." } }, "additionalProperties": false, "description": "Representation of a filter field for double numeric values." }
Date Time Filter Field
Representation of a filter field for datetime values.
{ "title": "Date Time Filter Field", "type": "object", "properties": { "operation": { "$ref": "#/components/schemas/FilterNumberOperation" }, "values": { "type": "array", "items": { "type": "string", "format": "date-time" }, "description": "Date Time values to filter by." } }, "additionalProperties": false, "description": "Representation of a filter field for datetime values." }
Filter Enum Operation
Defines the type of enum matching operation for filtering. The match succeeds if a value matches any of the provided filter values.
{ "title": "Filter Enum Operation", "enum": [ "Equals", "NotEquals" ], "type": "string", "description": "Defines the type of enum matching operation for filtering. The match succeeds if a value matches any of the provided filter values." }
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 Constraint Type Filter Field
Representation of a filter field for Task Constraint Type enum values.
{ "title": "Task Constraint Type Filter Field", "type": "object", "properties": { "operation": { "$ref": "#/components/schemas/FilterEnumOperation" }, "values": { "type": "array", "items": { "$ref": "#/components/schemas/TaskConstraintType" }, "description": "Task Constraint Type enum values to filter by." } }, "additionalProperties": false, "description": "Representation of a filter field for Task Constraint Type enum values." }
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 Duration Type Filter Field
Representation of a filter field for Task Duration Type enum values.
{ "title": "Task Duration Type Filter Field", "type": "object", "properties": { "operation": { "$ref": "#/components/schemas/FilterEnumOperation" }, "values": { "type": "array", "items": { "$ref": "#/components/schemas/TaskDurationType" }, "description": "Task Duration Type enum values to filter by." } }, "additionalProperties": false, "description": "Representation of a filter field for Task Duration Type enum values." }
Boolean Filter Field
Representation of a filter field for boolean values.
{ "title": "Boolean Filter Field", "type": "object", "properties": { "operation": { "$ref": "#/components/schemas/FilterEnumOperation" }, "values": { "type": "array", "items": { "type": "boolean" }, "description": "Boolean values to filter by." } }, "additionalProperties": false, "description": "Representation of a filter field for boolean values." }
Filter Text Operation
Defines the type of text matching operation for filtering. The match succeeds if a value matches any of the provided filter values.
{ "title": "Filter Text Operation", "enum": [ "Equals", "NotEquals", "Contains", "StartsWith", "EndsWith", "NotContains", "NotStartsWith", "NotEndsWith", "ContainsCaseInsensitive", "StartsWithCaseInsensitive", "EndsWithCaseInsensitive", "EqualsCaseInsensitive", "NotEqualsCaseInsensitive", "NotContainsCaseInsensitive", "NotStartsWithCaseInsensitive", "NotEndsWithCaseInsensitive" ], "type": "string", "description": "Defines the type of text matching operation for filtering. The match succeeds if a value matches any of the provided filter values." }
String Filter Field
Representation of a filter field for string values.
{ "title": "String Filter Field", "type": "object", "properties": { "operation": { "$ref": "#/components/schemas/FilterTextOperation" }, "values": { "type": "array", "items": { "type": "string" }, "description": "String values to filter by." } }, "additionalProperties": false, "description": "Representation of a filter field for string values." }
Resource Unit Type Filter Field
Representation of a filter field for Resource Unit Type enum values.
{ "title": "Resource Unit Type Filter Field", "type": "object", "properties": { "operation": { "$ref": "#/components/schemas/FilterEnumOperation" }, "values": { "type": "array", "items": { "$ref": "#/components/schemas/ResourceUnitType" }, "description": "Resource Unit Type enum values to filter by." } }, "additionalProperties": false, "description": "Representation of a filter field for Resource Unit Type enum values." }
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 Progress Type Filter Field
Representation of a filter field for Task Progress Type enum values.
{ "title": "Task Progress Type Filter Field", "type": "object", "properties": { "operation": { "$ref": "#/components/schemas/FilterEnumOperation" }, "values": { "type": "array", "items": { "$ref": "#/components/schemas/TaskProgressType" }, "description": "Task Progress Type enum values to filter by." } }, "additionalProperties": false, "description": "Representation of a filter field for Task Progress Type enum values." }
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 Status Type Filter Field
Representation of a filter field for Task Status Type enum values.
{ "title": "Task Status Type Filter Field", "type": "object", "properties": { "operation": { "$ref": "#/components/schemas/FilterEnumOperation" }, "values": { "type": "array", "items": { "$ref": "#/components/schemas/TaskStatusType" }, "description": "Task Status Type enum values to filter by." } }, "additionalProperties": false, "description": "Representation of a filter field for Task Status Type enum values." }
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 Type Filter Field
Representation of a filter field for Task Type enum values.
{ "title": "Task Type Filter Field", "type": "object", "properties": { "operation": { "$ref": "#/components/schemas/FilterEnumOperation" }, "values": { "type": "array", "items": { "$ref": "#/components/schemas/TaskType" }, "description": "Task Type enum values to filter by." } }, "additionalProperties": false, "description": "Representation of a filter field for Task Type enum values." }
Task Query Filter
Representation of a filtered task query. The returned tasks will match all applied filters.
The unique identifier of who created this Task Query Filter.
Is this Task Query Filter deleted.
The unique identifier of the Task Query Filter.
Is this Task Query Filter shared.
The name of the Task Query Filter.
The version of the Task Query Filter.
Should the children of filtered tasks be shown.
{ "title": "Task Query Filter", "type": "object", "properties": { "createdBy": { "type": "string", "description": "The unique identifier of who created this Task Query Filter." }, "deleted": { "type": "boolean", "description": "Is this Task Query Filter deleted." }, "id": { "type": "string", "description": "The unique identifier of the Task Query Filter." }, "isShared": { "type": "boolean", "description": "Is this Task Query Filter shared." }, "name": { "type": "string", "description": "The name of the Task Query Filter.", "nullable": true }, "taskActualDuration": { "$ref": "#/components/schemas/Int32FilterField" }, "taskActualPhysicalQuantity": { "$ref": "#/components/schemas/DoubleFilterField" }, "taskConstraintEarlyDate": { "$ref": "#/components/schemas/DateTimeFilterField" }, "taskConstraintLateDate": { "$ref": "#/components/schemas/DateTimeFilterField" }, "taskConstraintType": { "$ref": "#/components/schemas/TaskConstraintTypeFilterField" }, "taskDurationType": { "$ref": "#/components/schemas/TaskDurationTypeFilterField" }, "taskEstimatedRate": { "$ref": "#/components/schemas/DoubleFilterField" }, "taskExpectedFinish": { "$ref": "#/components/schemas/DateTimeFilterField" }, "taskIsWbs": { "$ref": "#/components/schemas/BooleanFilterField" }, "taskName": { "$ref": "#/components/schemas/StringFilterField" }, "taskPercentComplete": { "$ref": "#/components/schemas/DoubleFilterField" }, "taskPhysicalQuantityUnit": { "$ref": "#/components/schemas/ResourceUnitTypeFilterField" }, "taskPlannedDuration": { "$ref": "#/components/schemas/Int32FilterField" }, "taskPlannedPhysicalQuantity": { "$ref": "#/components/schemas/DoubleFilterField" }, "taskProgressType": { "$ref": "#/components/schemas/TaskProgressTypeFilterField" }, "taskRemainingDuration": { "$ref": "#/components/schemas/Int32FilterField" }, "taskRemainingPhysicalQuantity": { "$ref": "#/components/schemas/DoubleFilterField" }, "taskStatus": { "$ref": "#/components/schemas/TaskStatusTypeFilterField" }, "taskType": { "$ref": "#/components/schemas/TaskTypeFilterField" }, "taskUrl": { "$ref": "#/components/schemas/StringFilterField" }, "taskUserDefinedId": { "$ref": "#/components/schemas/StringFilterField" }, "version": { "type": "integer", "description": "The version of the Task Query Filter.", "format": "int32" }, "withChildren": { "type": "boolean", "description": "Should the children of filtered tasks be shown." } }, "additionalProperties": false, "description": "Representation of a filtered task query. The returned tasks will match all applied filters." }
Task Query Filter Create Request
Properties of the Task Query Filter to be created.
The unique identifier of the Task Query Filter.
Is this Task Query Filter shared.
The name of the Task Query Filter.
The version of the Task Query Filter.
Should the children of filtered tasks be shown.
{ "title": "Task Query Filter Create Request", "type": "object", "properties": { "id": { "type": "string", "description": "The unique identifier of the Task Query Filter." }, "isShared": { "type": "boolean", "description": "Is this Task Query Filter shared." }, "name": { "minLength": 1, "type": "string", "description": "The name of the Task Query Filter." }, "taskActualDuration": { "$ref": "#/components/schemas/Int32FilterField" }, "taskActualPhysicalQuantity": { "$ref": "#/components/schemas/DoubleFilterField" }, "taskConstraintEarlyDate": { "$ref": "#/components/schemas/DateTimeFilterField" }, "taskConstraintLateDate": { "$ref": "#/components/schemas/DateTimeFilterField" }, "taskConstraintType": { "$ref": "#/components/schemas/TaskConstraintTypeFilterField" }, "taskDurationType": { "$ref": "#/components/schemas/TaskDurationTypeFilterField" }, "taskEstimatedRate": { "$ref": "#/components/schemas/DoubleFilterField" }, "taskExpectedFinish": { "$ref": "#/components/schemas/DateTimeFilterField" }, "taskIsWbs": { "$ref": "#/components/schemas/BooleanFilterField" }, "taskName": { "$ref": "#/components/schemas/StringFilterField" }, "taskPercentComplete": { "$ref": "#/components/schemas/DoubleFilterField" }, "taskPhysicalQuantityUnit": { "$ref": "#/components/schemas/ResourceUnitTypeFilterField" }, "taskPlannedDuration": { "$ref": "#/components/schemas/Int32FilterField" }, "taskPlannedPhysicalQuantity": { "$ref": "#/components/schemas/DoubleFilterField" }, "taskProgressType": { "$ref": "#/components/schemas/TaskProgressTypeFilterField" }, "taskRemainingDuration": { "$ref": "#/components/schemas/Int32FilterField" }, "taskRemainingPhysicalQuantity": { "$ref": "#/components/schemas/DoubleFilterField" }, "taskStatus": { "$ref": "#/components/schemas/TaskStatusTypeFilterField" }, "taskType": { "$ref": "#/components/schemas/TaskTypeFilterField" }, "taskUrl": { "$ref": "#/components/schemas/StringFilterField" }, "taskUserDefinedId": { "$ref": "#/components/schemas/StringFilterField" }, "version": { "type": "integer", "description": "The version of the Task Query Filter.", "format": "int32" }, "withChildren": { "type": "boolean", "description": "Should the children of filtered tasks be shown.", "nullable": true } }, "additionalProperties": false, "description": "Properties of the Task Query Filter to be created." }
Task Query Filter Response
Container for Task Query Filter object.
{ "title": "Task Query Filter Response", "type": "object", "properties": { "taskQueryFilter": { "$ref": "#/components/schemas/TaskQueryFilter" } }, "additionalProperties": false, "description": "Container for Task Query Filter object." }
Was this page helpful?