Get/Delete Dataset(s)
This guide details how to retrieve one or multiple datasets.
Get All Datasets:
You can retrieve the full list of all datasets that you own as well as the ones you are allowed to see by sending a GET request to /v2/datasources
Pagination Paramaters
- Page: The page number to retrieve (optional, default and minimum value is 1)
- PageSize: The number of pages to return (optional, default is 10 Policies per page 10)
- Filter: Filter the list of Policies by name (optional)
- AllItems: Retrieves all datasets
- totalPages: The number of total pages
You will receive a list response which lists the datasets following your pagination parameters.
- list: Provides a list of datasets, this will display the dataset name and ID. If you wish for more specific details for a dataset please follow the below steps for "Get One Dataset".
Get One Dataset:
If you have created or are allowed to view a dataset, you can get the dataset details by sending a GET request to /v2/datasources/{datasourceId}
Here is the list of attributes you will receive in the response:
- id
- name
- source
- updateFrequency
- reviewer The email of the reviewer
- status: The state of the dataset (Pending, approved)
- publisher: The email of the publisher
- isAggregation: If the dataset is an aggregation or not
- datasourcesId: If a dataset is comprised of multiple child datasets, this field contains the list of all the IDs associated with the individual child datasets
- policiesIds: The ids of policies that are associated with this dataset
- fields
- dataSourceConnection
- aggregationDatasourceKeys The key (column name) used to virtually join all the child datasets
- contributions Provides a list of data that are contributed to this dataset
Delete a Dataset
A dataset can be deleted by sending a POST request to /v2/datasources/{datasourceId}/delete
In addition to the valid JWT, the ID of the dataset must be specified. The ID of the dataset is available in the create dataset response.
Status code 200 means that the dataset was deleted succesfully.
If the delete request fails, you will receive a 4xx or 5xx error code with details in the response body. The status of the dataset remains "Pending". Please refer to this REST API Tutorial for further guidance on HTTP status codes.