Skip to main content

Tasks

OpenAPI Specification

Public API (0.0.0)

2GIS GeoFlow Public API

tasks

Getting a list of tasks

Returns a page with a list of tasks.

Authorizations:
BearerAuth
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

Content type
application/json
{
  • "cursor": {
    • "next": "string",
    • "prev": "string"
    },
  • "items": [
    • {
      }
    ]
}

Creating a task

Creates a task using the specified template.

Authorizations:
BearerAuth
Request Body schema: application/json
required

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: created, ready, in_progress, completed, or cancelled.

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

Content type
application/json
{
  • "attributes": [
    • {
      }
    ],
  • "template_id": "c6d67e98-83ea-49f0-8812-e4abae2b68bc"
}

Response samples

Content type
application/json
{
  • "attributes": [
    • {
      }
    ],
  • "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:
BearerAuth
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: created, ready, in_progress, completed, or cancelled.

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

Content type
application/json
{
  • "attributes": [
    • {
      }
    ],
  • "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:
BearerAuth
path Parameters
id
required
string <uuid>

Task identifier.

Request Body schema: application/json
required

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: created, ready, in_progress, completed, or cancelled.

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

Content type
application/json
{
  • "attributes": [
    • {
      }
    ],
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}

Response samples

Content type
application/json
{
  • "attributes": [
    • {
      }
    ],
  • "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:
BearerAuth
path Parameters
id
required
string <uuid>

Task identifier.

Request Body schema: application/json
required

New task status.

status_alias
required
string (TaskStatusAlias)
Enum: "created" "ready" "in_progress" "completed" "cancelled"

New task status: created, ready, in_progress, completed, or cancelled.

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: created, ready, in_progress, completed, or cancelled.

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

Content type
application/json
{
  • "status_alias": "created"
}

Response samples

Content type
application/json
{
  • "attributes": [
    • {
      }
    ],
  • "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"
}