Urbi Pro | Uploading data using API | API Reference | 2GIS Documentation
Urbi Pro

API Reference

Urbi.Geo.Push.Api (v1)

Actions to work with dynamic assets

Get dynamic asset metadata

Get dynamic asset metadata

Sample request:

GET /dynamic_asset/user_dyn_pRsBtqGECTpwKqDkCzow
Authorizations:
path Parameters
assetId
required
string [ 1 .. 200 ] characters

Dynamic asset ID

Responses

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

Attribute groups

geometry_dimension
required
string (GeometryDimension)
Enum: "point" "line" "polygon"
id
required
string [ 1 .. 200 ] characters

ID

name
required
string [ 1 .. 100 ] characters

Name

description
string or null [ 1 .. 500 ] characters

Description

Array of objects or null (AttributeFilter)

Filters

Response Schema: application/json
error
string or null
Response Schema: application/json
error
string or null

Response samples

Content type
application/json
{
  • "id": "user_dyn_zq3ZJxPdT0i1vDAvvyWkgQ",
  • "name": "Cars on city map",
  • "description": "Shows positions of different cars on the map",
  • "geometry_dimension": "polygon",
  • "attribute_groups": [
    • {
      • "name": "Main features",
      • "attributes": [
        • {
          • "id": "Model",
          • "type": "string",
          • "caption": "Model"
          },
        • {
          • "id": "Year",
          • "type": "number",
          • "caption": "Year released"
          }
        ]
      }
    ]
}

Create dynamic asset

Create dynamic asset

Sample request:

POST /dynamic_asset
Authorizations:
Request Body schema: application/json
geometry_dimension
required
string (GeometryDimension)
Enum: "point" "line" "polygon"
name
required
string [ 1 .. 100 ] characters

Asset name

description
string or null [ 1 .. 500 ] characters

Asset description

Array of objects or null (AssetAttributeGroup)

Attribute groups

Array of objects or null (AttributeFilter)

Filters

asset_group_id
string or null [ 1 .. 200 ] characters

Asset group ID. Determines the library group to place the asset to

Responses

Response Schema: application/json
asset_id
string or null

Asset ID

task_id
string or null

Task ID

access_token
string or null

Token required to push data to asset

Array of objects or null (UrbiActionError)

Errors (if any)

Response Schema: application/json
error
string or null
Response Schema: application/json
error
string or null

Request samples

Content type
application/json
{
  • "geometry_dimension": "polygon",
  • "name": "Cars on city map",
  • "description": "Shows positions of different cars on the map",
  • "attribute_groups": [
    • {
      • "name": "Main features",
      • "attributes": [
        • {
          • "id": "Model",
          • "type": "string",
          • "caption": "Model"
          },
        • {
          • "id": "Year",
          • "type": "number",
          • "caption": "Year released"
          }
        ]
      }
    ],
  • "filters": [
    • {
      • "attribute_id": "Model",
      • "control_type": "check_box_list",
      • "items": [
        • {
          • "value": "Mercedes Benz S600",
          • "caption": "Mercedes Benz S600"
          },
        • {
          • "value": "Citroen C3",
          • "caption": "Citroen C3"
          }
        ]
      },
    • {
      • "attribute_id": "Year",
      • "control_type": "range",
      • "min": 1969,
      • "max": 2022
      }
    ]
}

Response samples

Content type
application/json
{
  • "asset_id": "user_dyn_zq3ZJxPdT0i1vDAvvyWkgQ",
  • "task_id": "hBAbF8iZVUKoXXUjJBgKpA",
  • "access_token": "VT8UivWdluDSWdXA"
}

Update dynamic asset metadata

Update dynamic asset metadata

Sample request:

PUT /dynamic_asset
Authorizations:
Request Body schema: application/json
id
required
string [ 1 .. 200 ] characters

Asset ID

name
required
string [ 1 .. 100 ] characters

Asset name

description
string or null [ 1 .. 500 ] characters

Asset description

Array of objects or null (AssetAttributeGroup)

Attribute groups

Array of objects or null (AttributeFilter)

Filters

Responses

Response Schema: application/json
asset_id
string or null

Asset ID

task_id
string or null

Task ID

access_token
string or null

Token required to push data to asset

Array of objects or null (UrbiActionError)

Errors (if any)

Response Schema: application/json
error
string or null
Response Schema: application/json
error
string or null
Response Schema: application/json
error
string or null

Request samples

Content type
application/json
{
  • "id": "user_dyn_zq3ZJxPdT0i1vDAvvyWkgQ",
  • "name": "Cars on city map",
  • "description": "Shows positions of different cars on the map",
  • "attribute_groups": [
    • {
      • "name": "Main features",
      • "attributes": [
        • {
          • "id": "Model",
          • "type": "string",
          • "caption": "Model"
          },
        • {
          • "id": "Year",
          • "type": "number",
          • "caption": "Year released"
          }
        ]
      }
    ],
  • "filters": [
    • {
      • "attribute_id": "Model",
      • "control_type": "check_box_list",
      • "items": [
        • {
          • "value": "Mercedes Benz S600",
          • "caption": "Mercedes Benz S600"
          },
        • {
          • "value": "Citroen C3",
          • "caption": "Citroen C3"
          }
        ]
      },
    • {
      • "attribute_id": "Year",
      • "control_type": "range",
      • "min": 1969,
      • "max": 2022
      }
    ]
}

Response samples

Content type
application/json
{
  • "asset_id": "user_dyn_zq3ZJxPdT0i1vDAvvyWkgQ",
  • "task_id": "hBAbF8iZVUKoXXUjJBgKpA",
  • "access_token": "VT8UivWdluDSWdXA"
}

Push data to dynamic asset

Push data to dynamic asset

Sample request:

PUT /dynamic_asset/user_dyn_pRsBtqGECTpwKqDkCzow/data
Authorizations:
path Parameters
assetId
required
string [ 1 .. 200 ] characters

Dynamic asset ID

Request Body schema: application/json

Payload in GeoJSON format

type
required
string (GeoJsonType)
Enum: "Geometry" "Feature" "FeatureCollection"

GeoJson data type

Members:

  • Geometry - Geometry type
  • Feature - Feature type
  • FeatureCollection - FeatureCollection type

Array of objects or null (GeoJsonFeature) [ 1 .. 100 ] items

Responses

Response Schema: application/json
Array
object or null

Errors grouped by object ID

Response Schema: application/json
object or null

Errors grouped by object ID

Response Schema: application/json
error
string or null
Response Schema: application/json
error
string or null

Request samples

Content type
application/json
{
  • "type": "FeatureCollection",
  • "features": [
    • {
      • "id": "1",
      • "type": "Feature",
      • "geometry": {
        • "type": "Polygon",
        • "coordinates": [
          • [
            ]
          ]
        },
      • "properties": {}
      }
    ]
}

Response samples

Content type
application/json
{
  • "errors_by_id": {
    • "1": [
      • "Invalid geometry"
      ]
    }
}

Delete selected objects from dynamic asset

Delete selected objects from dynamic asset

Sample request:

DELETE /dynamic_asset/user_dyn_pRsBtqGECTpwKqDkCzow/data
Authorizations:
path Parameters
assetId
required
string [ 1 .. 200 ] characters

Dynamic asset ID

Request Body schema: application/json

Objects to delete

Array ([ 1 .. 100 ] items)
string

Responses

Response Schema: application/json
string
Response Schema: application/json
error
string or null
Response Schema: application/json
error
string or null
Response Schema: application/json
error
string or null

Request samples

Content type
application/json
[
  • "1",
  • "2",
  • "3"
]

Response samples

Content type
application/json
"string"

Delete all objects from dynamic asset

Delete all objects from dynamic asset

Sample request:

DELETE /dynamic_asset/user_dyn_pRsBtqGECTpwKqDkCzow/data/all
Authorizations:
path Parameters
assetId
required
string [ 1 .. 200 ] characters

Dynamic asset ID

Responses

Response Schema: application/json
string
Response Schema: application/json
error
string or null
Response Schema: application/json
error
string or null
Response Schema: application/json
error
string or null

Response samples

Content type
application/json
"string"