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.
For datasets uploaded as a file
In the Urbi Pro interface, you can manage only datasets that you uploaded as a file:
- rename a dataset
- add and edit a description of a dataset
- create a filter by territory and delete it
- delete a dataset (also available for datasets uploaded via API)
To work with a dataset, go to the Main tab and click All datasets or go to the Data tab.
Renaming a dataset
- Go to the Data tab.
- On the required dataset card, click icon and select Rename.
- Enter a new name of the dataset.
- Click Rename.
Editing a description of a dataset
- Go to the Data tab.
- On the required dataset card, click icon and select Edit description.
- Fill in the Description field (there is a 200 characters limit).
- Click Save.
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:
Creating a filter by territory
If your uploaded data contains geometries of the polygon type, you can use it to filter other data by these polygons.
- Go to the Data tab.
- On the required dataset card, click 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.
Deleting a filter by territory
- Go to the Data tab.
- On the required dataset card, click icon and select Remove a filter by territory.
- To confirm deleting, click Delete.
Deleting a dataset
- Go to the Data tab.
- On the required dataset card, click icon and select Delete.
- To confirm deleting, click Delete.
For datasets uploaded via API
Via API, you can manage only datasets that you uploaded using API:
- upload a new portion of data to a dataset after creating it
- get dataset parameters
- change dataset parameters
- delete several objects from a dataset
- delete all objects from a dataset
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 icon and select Copy ID. - Access token for authorization (
access_token
). Also, you can copy the token in Urbi Pro: click icon in the lower-left corner, go to the Tokens section and copy the value from the Token for dynamic datasets field.
Getting dataset parameters
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.
Changing dataset parameters
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.
-
Send a PUT request to
/dynamic_asset
:https://pro-api.2gis.ru/dynamic_asset
-
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.
Deleting several objects from a dataset
-
Send a DELETE request to
/dynamic_asset
https://pro-api.2gis.ru/dynamic_asset/{assetId}/data
-
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.
Deleting all objects from a dataset
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.
Deleting a dataset
- Go to the Data tab.
- On the required dataset card, click icon and select Delete.
- To confirm deleting, click Delete.
What's next?
- See available Operations with dataset groups.
- Quick start.
- Get to know how to work with Data visualization.
- Get to know more about Layers, Dashboards, and Widgets.
- Get to know prepared Analytics presets.