Query with SQL
Playground
POSTEndpoint:
/api/query/v1/execute/:datasetId
This endpoint executes an SQL query on the specified DataSet and returns the result in the form of a list of objects.
Parameters
Example
Response
Dataset Access List
Playground
GET
Endpoint: /api/data/v3/datasources/{dataset_id}/permissions
Description:Retrieves a list of users and groups with access to the dataset, along with their permissions. Parameters:
Example Request:
Revoke Dataset Access
Playground
DELETEEndpoint:
/api/data/v3/datasources/:datasetId/permissions/USER/:userId
This endpoint revokes access to a specified DataSet for a given user.
Parameters
Example
Response
Get Metadata
Playground
GETEndpoint:
/api/data/v3/datasources/:datasetId
This endpoint retrieves metadata for a specified DataSet, including the dataset’s properties and optionally requested parts of the metadata.
Parameters
Example
Response
Append row to Dataset
Playground
POSTEndpoint:
/api/data/v3/datasources/:datasetId/uploads
Description
This endpoint appends a row of values to a specified dataset.Parameters
Example Request
Response
Stream (Connector) - Create
Playground
POSTEndpoint:
/api/data/v1/streams
Description:Creates a new data stream using a connector and specifies configuration details. Parameters:
Example Request:
Stream (Connector) - Get
Playground
GETEndpoint:
/api/data/v1/streams/{stream_id}
Description:Retrieves configuration details for a specific data stream. Parameters:
Example Request:
Stream (Connector) - Update
Playground
PUTEndpoint:
/api/data/v1/streams/{stream_id}
Description:Updates the configuration of an existing data stream. Parameters:
Example Request:
Stream Execution History
Playground
GETEndpoint:
/api/data/v1/streams/{stream_id}/history/aggregate
Description:Retrieves the execution history for a specific data stream, including details about completed operations, errors, and performance metrics. Parameters:
Example Request:
Execute Dataset Stream
Playground
POSTEndpoint:
/api/data/v1/streams/:streamId/executions
Description
This endpoint queries a dataset’s stream ID and executes the dataset stream.Parameters
Example Request
Response
createDatasetTag
Playground
POSTEndpoint:
/api/data/ui/v3/datasources/:datasetId/tags
Description
This endpoint creates a tag for the specified dataset.Parameters
Example Request
Response
Share Dataset with Access permissions
Playground
POSTEndpoint:
/api/data/v3/datasources/:datasetId/share
Description
This endpoint shares a dataset and grants access permissions to specified users.Parameters
Example Request
Response
Remove user from dataset
Playground
DELETEEndpoint:
/api/data/v3/datasources/:datasetId/USERS/:userId
Description
This endpoint removes a user from a dataset’s permissions.Parameters
Example Request
Response
Remove multiple users from dataset
Playground
DELETEEndpoint:
/api/data/v3/datasources/:datasetId/users
Description
This endpoint removes multiple people from a dataset’s permissions.Parameters
Example Request
Response
Upload CSV - APPEND or REPLACE
Stage 1 - Get Upload ID
Playground
POSTEndpoint:
/api/data/v3/datasources/:dataset_id/uploads
Description:Generates an
uploadId for appending or replacing data in the dataset. The uploadId is required for subsequent upload stages.
Parameters:
Example Request:
Stage 2 - Upload CSV
Playground
PUTEndpoint:
/api/data/v3/datasources/:dataset_id/uploads/:upload_id/parts/:part
Description:Uploads the CSV file data. The dataset is divided into parts for uploading multiple streams simultaneously. Parameters:
Example Request:
Stage 3 - Commit and Index
Playground
PUT
Endpoint: /api/data/v3/datasources/:dataset_id/uploads/:upload_id/commit
Description:Finalizes the data upload by committing the uploaded parts and indexing the dataset. Parameters:
Body Parameters:
Example Request:
Upload CSV - APPEND with Partitioning
Stage 1 - Get Partition Tag
Playground
POST
Endpoint: /api/data/v3/datasources/{dataset_id}/uploads/?restateDataTag={dataset_partition_id}
Description:Initializes a data upload with partitioning and generates an
uploadId. The uploadId is required for subsequent upload stages. Note that restateDataTag is largely deprecated and retained for backward compatibility.
Parameters:
Example Request:
Stage 2 - Upload CSV
Playground
PUT
Endpoint: /api/data/v3/datasources/{dataset_id}/uploads/{dataset_upload_id}/parts/:part
Description:Uploads data in CSV format. Multiple parts can be uploaded simultaneously for larger datasets. Parameters:
Example Request:
Stage 3 - Commit and Index
Playground
PUT
Endpoint: /api/data/v3/datasources/{dataset_id}/uploads/{dataset_upload_id}/commit
Description:Finalizes the data upload by committing all parts and optionally indexing the dataset for query access. Parameters:
Example Request:
GET Data Versions
Playground
GETEndpoint:
/api/data/v3/datasources/{dataset_id}/dataversions/details
Description:Retrieves detailed information about all data versions associated with the dataset. Parameters:
Example Request:
GET Partition List
Playground
GETEndpoint:
/api/query/v1/datasources/{dataset_id}/partition
Description:Retrieves a list of partitions associated with the dataset. Does not include metadata such as row counts. Parameters:
Example Request:
- To include row count metadata, use the
/partition/listendpoint. - This endpoint does not differentiate between partitions marked for deletion and those not marked.
Search Partition List
Playground
POSTEndpoint:
/api/query/v1/datasources/{dataset_id}/partition/list
Description:Searches for partitions associated with the dataset. Allows pagination, sorting, and filtering of results. Parameters:
Example Request:
Data Version List from Magic
Playground
POSTEndpoint:
/api/dataprocessing/v2/dataflows/data-version-hydrate
Description:Retrieves a list of data versions for datasets processed with the MAGIC engine. Parameters:
Example Request:
Delete Data Version
Playground
DELETE
Endpoint: /api/query/v1/datasources/{dataset_id}/tag/{dataset_partition_id}/data
Description:Marks the data version associated with a partition tag as deleted. This does not delete the partition tag itself or remove the association between the partition tag and the data version. Parameters:
Example Request:
- Use this endpoint to mark data versions as deleted without removing the partition tag.
- To only remove the partition tag, use the “Delete Partition Tag” endpoint.
Delete Partition Tag
Playground
DELETE
Endpoint: /api/query/v1/datasources/{dataset_id}/partition/{dataset_partition_id}
Description:Removes the association of a partition tag with its dataset, ensuring it no longer appears in the partition list. Parameters:
Example Request:
- Removing the partition tag does not count against the 400-partition limit in Magic 2.0.
- Partitions against deleted data versions will not appear in the partition list.
Index Dataset
Playground
POST
Endpoint: /api/data/v3/datasources/{dataset_id}/indexes
Description:Indexes data versions for a dataset to make them queryable. If no
dataIds are provided, all complete and unindexed versions are indexed.
Parameters:
Example Request:
- Sending an empty
dataIdsarray will index all eligible data versions. - Indexing is required for datasets to become accessible for querying.
Create Dataset Copy
Playground
POSTEndpoint:
/api/data/v2/datasources
Description:Creates a new dataset by copying an existing schema and providing user-defined metadata. Parameters:
Example Request:
Get Dataset Schema
Playground
GETEndpoint:
/api/query/v1/datasources/{dataset_id}/schema/indexed?includeHidden=false
Description:Retrieves the schema of a dataset, including details about columns, their types, and metadata. Parameters:
Example Request:
Alter Dataset Schema
Playground
POSTEndpoint:
/api/data/v2/datasources/{dataset_id}/schemas
Description:Modifies the schema of an existing dataset by adding or altering columns. Parameters:
Example Request:
Get Cards for a Dataset ID
Playground
GETEndpoint:
/api/content/v1/datasources/{dataset_id}/cards?drill=true
Description:Retrieves a list of cards associated with a dataset. Includes drill paths for cards if
drill is set to true.
Parameters:
Example Request:
Index Dataset
Playground
POST
Endpoint: /api/query/v1/datasources/{dataset_id}
Description:Indexes a dataset to make it available for querying. This process is required after schema changes or data updates. Parameters:
Example Request:
Index Dataset Progress
Playground
GET
Endpoint: /api/data/v3/datasources/{dataset_id}/indexes/{index_id}/statuses
Description:
Retrieves the status of a dataset indexing operation for the specified index ID.
Parameters:
Example Request:
Change Dataset Properties
Playground
PUT
Endpoint: /api/data/v3/datasources/{dataset_id}/properties
Description:
Updates the properties of a dataset, such as the data provider type.
Parameters:
Example Request:
Dataset Access List
Playground
GET
Endpoint: /api/data/v3/datasources/{dataset_id}/permissions
Description:
Retrieves a list of users and groups with access to the dataset, along with their permissions.
Parameters:
Example Request:
Change Dataset Properties
Playground
PUT
Endpoint: /api/data/v3/datasources/{dataset_id}/properties
Description:
Updates the properties of a dataset, such as the data provider type.
Parameters:
Example Request: