Dataset API

1. Access Admin > System > API Toolkit

2. Configure Dataset Info

2.1. Get Dataset Info

  1. Item: dataset
  2. Methods: GET
  3. Enter ID of the Dataset
    • If no ID is provided, the API will return the data of all Datasets
  4. Enter an API Token
  5. [Run request]
  6. The returned object contains Dataset's info
Example Response
{
            "id": "63",
            "source_dataset_id": "0",
            "source_dataset_filter_id": "0",
            "name": "Suppliers Analysis",
            "description": "Suppliers Analysis",
            "measurement_interval": "3",
            "data_storage": "1",
            "category": "65",
            "data_collection_trigger": "1",
            "keep_history": "yes",
            "measurement_time_source": "Measurement time command",
            "can_historical_instances_be_backfilled": "yes",
            "weekly_data_for": "Last day of Week",
            "custom_effective_date": "19",
            "data_source": "57_sql",
            "data_fetch_command": "SELECT * from dataset_61\nWHERE date = :measurement_time",
            "omit_partial_periods_ind": "no",
            "generate_empty_instance_ind": "skip generation",
            "has_access_map_ind": "user has access to all rows",
            "instances_to_keep": "1095"
        }

Fields Description

Field Name Value Type Description
can_historical_instances_be_backfilled string Whether or not multiple instances of the Snapshot Dataset can be computed at run time.
category string The ID of Dataset Category.
data_collection_trigger string The ID of the Data Collection Trigger.
data_fetch_command string The command that is used to fetch the Dataset data.
data_source string The source of the Dataset data.
data_storage string The ID of the Data Storage.
description string The description of the Dataset.
has_access_map_ind string Whether the user has access to all Dataset rows or an access map is applied.
id string The ID of the Dataset.
instances_to_keep string The number of Dataset Shapshot instances to keep.
keep_history string Whether the Dataset is a Snapshot Dataset.
measurement_interval string The ID of the measurement interval.
name string The name of the Dataset
source_dataset_filter_id string The ID of the Dataset's filter from which this Dataset has been sourced.
source_dataset_id string The ID of the Dataset from which this Dataset has been sourced.

2.2. Create Dataset

  1. Item: dataset
  2. Methods: POST
  3. Enter ID of an existing Dataset that you want to use as a model for a new Dataset
    • After you enter the Dataset ID, the Request field will display the settings for that Dataset
  4. Select JSON request and modify the new Dataset's data
  5. Enter an API Token
  6. [Run request]
  7. The returned object contains the new Dataset's info
    • Note that the new Dataset's ID is auto-created

2.3. Update Dataset Info

  1. Item: dataset
  2. Methods: PUT
  3. Enter ID of the Dataset you want to update
  4. Select JSON request and modify the Dataset's data
  5. Enter an API Token
  6. [Run request]

2.4. Validate Dataset

  1. Item: dataset
  2. Methods: PUT
  3. Enter ID of the Dataset you want to validate
  4. Actions: Validate
  5. Enter an API Token
  6. [Run request]
  7. If the Dataset is validated successfully, a corresponding message is returned

2.5. Delete Dataset Data

  1. Item: dataset
  2. Methods: PUT
  3. Enter ID of the Dataset which data you want to delete
  4. Actions: Delete data
  5. Select JSON request and enter the time interval for which you want to delete Dataset data in the following format:
{
    "call": "delete_data",
    "delete_measurements_from": "<Date and time from which the Dataset data is deleted>",
    "delete_measurements_through": "<Date and time until which the Dataset data is deleted>"
}
  1. Enter an API Token
  2. [Run request]
  3. If the Dataset data is deleted successfully, a corresponding message is returned

2.6. Get Dataset Access Map (User Map)

  1. Item: dataset
  2. Methods: PUT
  3. Enter ID of the Dataset for which you want to get an Access Map
  4. Actions: Get Access Map
  5. Enter an API Token
  6. [Run request]
  7. If the Dataset's Access Map data is fetched successfully, its data is returned

2.7. Set Dataset Access Map (User Map)

  1. Item: dataset
  2. Methods: PUT
  3. Enter ID of the Dataset for which you want to get an Access Map
  4. Actions: Set Access Map
  5. Select JSON request and provide JSON mapping Dataset parameters with User Map parameters
  6. Enter an API Token
  7. [Run request]
  8. If the Dataset's Access Map data is set successfully, a corresponding message is returned

2.8. Enable Dataset

  1. Item: dataset
  2. Methods: PUT
  3. Enter ID of the Dataset you want to enable
  4. Actions: Enable
  5. Enter an API Token
  6. [Run request]
  7. If the Dataset is enabled successfully, a corresponding message is returned

2.9. Disable Dataset

  1. Item: dataset
  2. Methods: PUT
  3. Enter ID of the Dataset you want to disable
  4. Actions: Disable
  5. Enter an API Token
  6. [Run request]
  7. If the Dataset is disabled successfully, a corresponding message is returned

2.10. Update Dataset Data

  1. Item: dataset
  2. Methods: PUT
  3. Enter ID of the Dataset which data you want to update
    • This action is an equivalent of [Update Dataset] from the Dataset Editor
  4. Actions: Update Dataset
  5. Enter an API Token
  6. [Run request]
  7. If the Dataset has been updated successfully, a corresponding message is returned

2.11. Delete Dataset

  1. Item: dataset
  2. Methods: DELETE
  3. Enter ID of the Dataset you want to delete
  4. Enter an API Token
  5. [Run request]
  6. If the Dataset is deleted successfully, a corresponding message is returned