Operations with datasets | Urbi Pro | 2GIS Documentation
Urbi Pro

Operations with datasets

After you uploaded your own datasets, you can manage them. The available functions depend on how you uploaded the data: as a file or via API.

You can combine all uploaded datasets into groups and moved datasets between them: see the Operations with dataset groups instruction.

In the Urbi Pro interface, you can manage only datasets that you uploaded as a file:


To work with a dataset, go to the Main tab and click All datasets or go to the Data tab.

Data tab
  1. Go to the Data tab.
  2. On the required dataset card, click Dataset menu icon and select Edit.
  3. Enter a new name of the dataset (not longer than 100 characters).
  4. Click Apply.
  1. Go to the Data tab.
  2. On the required dataset card, click Dataset menu icon and select Edit.
  3. Fill in the Description field (not longer than 200 characters).
  4. Click Apply.

If the description is too long, only its abstract is displayed by default. Hover the cursor over the dataset card to see the full description:

Tooltip with the full description

If your uploaded data contains geometries of the polygon type, you can use it to filter other data by these polygons.

  1. Go to the Data tab.
  2. On the required dataset card, click Dataset menu icon and select Create a filter by territory.

Now when you create layers, you can select the uploaded dataset from a list in the Territories field.

  1. Go to the Data tab.
  2. On the required dataset card, click Dataset menu icon and select Remove a filter by territory.
  3. To confirm deleting, click Delete.

After creating a layer with a data sample, when you hover the cursor over an item on the map, a tooltip with a short help about the item appears.

A tooltip with the short help about the item

You can customize the list of data attributes that are displayed in the tooltip. By default, all layers created from this dataset use the tooltip settings. You can change the settings after creating the layer: see the documentation for the visualization methods.

The tooltip configuring is only available for layers with the Point, Buildings, Line, and Polygon visualization methods.

  1. Go to the Data tab.

  2. On the required dataset card, click Dataset menu icon and select Edit.

  3. To display the attributes you specify in the tooltip, enable the Tooltip setup option.

    If the option is disabled, the tooltip shows all data attributes from the dataset. The attributes are displayed in the order that was specified during uploading.

  4. Set the list of attributes that will be displayed in the element tooltip. Select the required attributes and change their order if necessary. The available values ​​depend on the data in the sample.

    Configuring a tooltip
  5. In the Tooltip field to the right of the attribute list, a preview of the tooltip on the map is shown. Check the tooltip display and click Apply.

  1. Go to the Data tab.
  2. On the required dataset card, click Dataset menu icon and select Delete.
  3. To confirm deleting, click Delete.

Via API, you can manage only datasets that you uploaded using API:

You can delete a dataset uploaded via API only in Urbi Pro interface.


To send requests, use the data that you received when creating a dataset:

  • Dataset ID (assetId). Also, you can copy the ID in Urbi Pro: go to the Data tab, on the required dataset card, click Dataset menu icon and select Copy ID.
  • Access token for authorization (access_token). Also, you can copy the token in Urbi Pro: click Profile icon in the lower-left corner, go to the Tokens section and copy the value from the Token for dynamic datasets field.

Send a GET request to /dynamic_asset and specify the dataset ID (assetId parameter):

https://pro-api.2gis.ru/dynamic_asset/{assetId}

For more information about the response body, see the API Reference.

Important

If you add a new filter for an existing attribute, the filter only works for new data uploaded after the filter was added. Old data is not indexed. To index all data, you can add a new attribute together with a new filter.

  1. Send a PUT request to /dynamic_asset:

    https://pro-api.2gis.ru/dynamic_asset
    
  2. In the request body, pass the dataset ID (assetId parameter), dataset name, and other parameters that must be changed in the JSON format.

    For the full list of parameters, see the API Reference.

  1. Send a DELETE request to /dynamic_asset

    https://pro-api.2gis.ru/dynamic_asset/{assetId}/data
    
  2. In the request body, pass the dataset ID (assetId parameter) and a list of object IDs in the JSON format.

    For more information, see the API Reference.

Send a DELETE request to /dynamic_asset and specify the dataset ID (assetId parameter):

https://pro-api.2gis.ru/dynamic_asset/{assetId}/data/all

For more information, see the API Reference.

  1. Go to the Data tab.
  2. On the required dataset card, click Dataset menu icon and select Delete.
  3. To confirm deleting, click Delete.