Skip to main content

Agents

OpenAPI Specification

Public API (0.0.0)

2GIS GeoFlow Public API

agents

Getting a list of agents

Returns a page with a list of agents.

Authorizations:
BearerAuth
query Parameters
agent_ids
Array of strings

Filter by agent identifiers.

limit
required
integer

Maximum number of agents in the response, from 1 to 500.

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 (AgentResponse)

Current page items.

Response samples

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

Creating an agent

Creates an agent using the specified template.

Authorizations:
BearerAuth
Request Body schema: application/json
required

Data for creating an agent.

Array of objects (Attribute)

Values of agent attributes.

Array of objects (AgentDataSource)

Agent location data sources.

template_id
required
string <uuid>

Agent template identifier.

Responses

Response Schema: application/json
required
Array of objects (Attribute)

Values of agent attributes.

created_at
required
string <date-time>

Date and time of agent creation in RFC 3339 format.

required
Array of objects (AgentDataSource)

Agent location data sources.

id
required
string <uuid>

Agent identifier.

template_id
required
string <uuid>

Agent template identifier.

updated_at
required
string <date-time>

Date and time of the agent's last update in RFC 3339 format.

Request samples

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

Response samples

Content type
application/json
{
  • "attributes": [
    • {
      }
    ],
  • "created_at": "2019-08-24T14:15:22Z",
  • "data_sources": [
    • {
      }
    ],
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "template_id": "c6d67e98-83ea-49f0-8812-e4abae2b68bc",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Deleting an agent

Deletes an agent by its identifier.

Authorizations:
BearerAuth
path Parameters
id
required
string <uuid>

Agent identifier.

Responses

Response samples

Content type
application/json
{
  • "error_code": "string",
  • "message": "string",
  • "metadata": {
    • "property1": "string",
    • "property2": "string"
    },
  • "violations": [
    • {
      }
    ]
}

Getting an agent

Returns agent data by its identifier.

Authorizations:
BearerAuth
path Parameters
id
required
string <uuid>

Agent identifier.

Responses

Response Schema: application/json
required
Array of objects (Attribute)

Values of agent attributes.

created_at
required
string <date-time>

Date and time of agent creation in RFC 3339 format.

required
Array of objects (AgentDataSource)

Agent location data sources.

id
required
string <uuid>

Agent identifier.

template_id
required
string <uuid>

Agent template identifier.

updated_at
required
string <date-time>

Date and time of the agent's last update in RFC 3339 format.

Response samples

Content type
application/json
{
  • "attributes": [
    • {
      }
    ],
  • "created_at": "2019-08-24T14:15:22Z",
  • "data_sources": [
    • {
      }
    ],
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "template_id": "c6d67e98-83ea-49f0-8812-e4abae2b68bc",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Updating an agent

Updates agent data by its identifier.

Authorizations:
BearerAuth
path Parameters
id
required
string <uuid>

Agent identifier.

Request Body schema: application/json
required

New values of agent attributes.

Array of objects (Attribute)

Values of agent attributes.

Array of objects (AgentDataSource)

Agent location data sources.

template_id
required
string <uuid>

Agent template identifier.

Responses

Response Schema: application/json
required
Array of objects (Attribute)

Values of agent attributes.

created_at
required
string <date-time>

Date and time of agent creation in RFC 3339 format.

required
Array of objects (AgentDataSource)

Agent location data sources.

id
required
string <uuid>

Agent identifier.

template_id
required
string <uuid>

Agent template identifier.

updated_at
required
string <date-time>

Date and time of the agent's last update in RFC 3339 format.

Request samples

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

Response samples

Content type
application/json
{
  • "attributes": [
    • {
      }
    ],
  • "created_at": "2019-08-24T14:15:22Z",
  • "data_sources": [
    • {
      }
    ],
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "template_id": "c6d67e98-83ea-49f0-8812-e4abae2b68bc",
  • "updated_at": "2019-08-24T14:15:22Z"
}