Tasks
Public API (0.0.0)
2GIS GeoFlow Public API
Getting a list of tasks
Returns a page with a list of tasks.
Authorizations:
query Parameters
| limit required | integer Maximum number of tasks in the response, from 1 to 100. |
| cursor | string Cursor for getting the next or previous page of results. |
Responses
Response Schema: application/json
required | object (CursorResponse) Cursors for the next and previous result pages. |
required | Array of objects (TaskResponse) Current page items. |
Response samples
- 200
- 400
- 401
- 500
{- "cursor": {
- "next": "string",
- "prev": "string"
}, - "items": [
- {
- "attributes": [
- {
- "data": {
- "attribute_id": "ef88e6be-6132-42c9-abcd-a9aadce04df6",
- "type": "text",
- "value": "string"
}
}
], - "created_at": "2019-08-24T14:15:22Z",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "status_alias": "created",
- "template_id": "c6d67e98-83ea-49f0-8812-e4abae2b68bc",
- "updated_at": "2019-08-24T14:15:22Z"
}
]
}Creating a task
Creates a task using the specified template.
Authorizations:
Request Body schema: application/jsonrequired
Data for creating a task.
required | Array of objects (Attribute) Values of task attributes. |
| template_id required | string <uuid> Task template identifier. |
Responses
Response Schema: application/json
required | Array of objects (Attribute) Values of task attributes. |
| created_at required | string <date-time> Date and time of task creation in RFC 3339 format. |
| id required | string <uuid> Task identifier. |
| status_alias required | string (TaskStatusAlias) Enum: "created" "ready" "in_progress" "completed" "cancelled" Current task status: |
| template_id required | string <uuid> Task template identifier. |
| updated_at required | string <date-time> Date and time of the task last update in RFC 3339 format. |
Request samples
- Payload
{- "attributes": [
- {
- "data": {
- "attribute_id": "ef88e6be-6132-42c9-abcd-a9aadce04df6",
- "type": "text",
- "value": "string"
}
}
], - "template_id": "c6d67e98-83ea-49f0-8812-e4abae2b68bc"
}Response samples
- 200
- 400
- 401
- 500
{- "attributes": [
- {
- "data": {
- "attribute_id": "ef88e6be-6132-42c9-abcd-a9aadce04df6",
- "type": "text",
- "value": "string"
}
}
], - "created_at": "2019-08-24T14:15:22Z",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "status_alias": "created",
- "template_id": "c6d67e98-83ea-49f0-8812-e4abae2b68bc",
- "updated_at": "2019-08-24T14:15:22Z"
}Getting a task
Returns task data (including status) by its identifier.
Authorizations:
path Parameters
| id required | string <uuid> Task identifier. |
Responses
Response Schema: application/json
required | Array of objects (Attribute) Values of task attributes. |
| created_at required | string <date-time> Date and time of task creation in RFC 3339 format. |
| id required | string <uuid> Task identifier. |
| status_alias required | string (TaskStatusAlias) Enum: "created" "ready" "in_progress" "completed" "cancelled" Current task status: |
| template_id required | string <uuid> Task template identifier. |
| updated_at required | string <date-time> Date and time of the task last update in RFC 3339 format. |
Response samples
- 200
- 400
- 401
- 404
- 500
{- "attributes": [
- {
- "data": {
- "attribute_id": "ef88e6be-6132-42c9-abcd-a9aadce04df6",
- "type": "text",
- "value": "string"
}
}
], - "created_at": "2019-08-24T14:15:22Z",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "status_alias": "created",
- "template_id": "c6d67e98-83ea-49f0-8812-e4abae2b68bc",
- "updated_at": "2019-08-24T14:15:22Z"
}Updating a task
Updates task data by its identifier.
Authorizations:
path Parameters
| id required | string <uuid> Task identifier. |
Request Body schema: application/jsonrequired
New values for task attributes.
Array of objects (Attribute) Values of task attributes. | |
| id required | string <uuid> Task identifier. Must match the identifier in the request path. |
Responses
Response Schema: application/json
required | Array of objects (Attribute) Values of task attributes. |
| created_at required | string <date-time> Date and time of task creation in RFC 3339 format. |
| id required | string <uuid> Task identifier. |
| status_alias required | string (TaskStatusAlias) Enum: "created" "ready" "in_progress" "completed" "cancelled" Current task status: |
| template_id required | string <uuid> Task template identifier. |
| updated_at required | string <date-time> Date and time of the task last update in RFC 3339 format. |
Request samples
- Payload
{- "attributes": [
- {
- "data": {
- "attribute_id": "ef88e6be-6132-42c9-abcd-a9aadce04df6",
- "type": "text",
- "value": "string"
}
}
], - "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}Response samples
- 200
- 400
- 401
- 404
- 500
{- "attributes": [
- {
- "data": {
- "attribute_id": "ef88e6be-6132-42c9-abcd-a9aadce04df6",
- "type": "text",
- "value": "string"
}
}
], - "created_at": "2019-08-24T14:15:22Z",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "status_alias": "created",
- "template_id": "c6d67e98-83ea-49f0-8812-e4abae2b68bc",
- "updated_at": "2019-08-24T14:15:22Z"
}Updating task status
Updates task status by its identifier.
Authorizations:
path Parameters
| id required | string <uuid> Task identifier. |
Request Body schema: application/jsonrequired
New task status.
| status_alias required | string (TaskStatusAlias) Enum: "created" "ready" "in_progress" "completed" "cancelled" New task status: |
Responses
Response Schema: application/json
required | Array of objects (Attribute) Values of task attributes. |
| created_at required | string <date-time> Date and time of task creation in RFC 3339 format. |
| id required | string <uuid> Task identifier. |
| status_alias required | string (TaskStatusAlias) Enum: "created" "ready" "in_progress" "completed" "cancelled" Current task status: |
| template_id required | string <uuid> Task template identifier. |
| updated_at required | string <date-time> Date and time of the task last update in RFC 3339 format. |
Request samples
- Payload
{- "status_alias": "created"
}Response samples
- 200
- 400
- 401
- 404
- 500
{- "attributes": [
- {
- "data": {
- "attribute_id": "ef88e6be-6132-42c9-abcd-a9aadce04df6",
- "type": "text",
- "value": "string"
}
}
], - "created_at": "2019-08-24T14:15:22Z",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "status_alias": "created",
- "template_id": "c6d67e98-83ea-49f0-8812-e4abae2b68bc",
- "updated_at": "2019-08-24T14:15:22Z"
}