Data Sets¶
Datasets split a data source into segments that digna monitors separately. Authentication, pagination and errors are described in the Overview.
| Method | Path | Description |
|---|---|---|
GET | /v1/data-sets | List data sets |
POST | /v1/data-sets | Create a data set |
GET | /v1/data-sets/{dataset_id} | Get a data set |
PUT | /v1/data-sets/{dataset_id} | Update a data set |
DELETE | /v1/data-sets/{dataset_id} | Delete a data set |
List data sets¶
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
data_source_id | query | integer | Yes | Filter by data source ID |
limit | query | integer | No | Maximum number of rows to return (default: 200, max: 5000) |
Responses
| Status | Description | Body |
|---|---|---|
200 | List data sets | array of DataSet |
400 | Invalid limit | ApiError |
401 | Not authenticated | ApiError |
500 | Internal error | ApiError |
Example
curl -X GET 'https://digna.example.com/v1/data-sets?data_source_id=<data_source_id>' \
-H "Authorization: Bearer $DIGNA_API_KEY"
Create a data set¶
Request body: CreateDataSetRequest
Responses
| Status | Description | Body |
|---|---|---|
201 | Create a data set | DataSet |
401 | Not authenticated | ApiError |
403 | Not authorized | ApiError |
404 | Not found | ApiError |
500 | Internal error | ApiError |
Example
curl -X POST 'https://digna.example.com/v1/data-sets' \
-H "Authorization: Bearer $DIGNA_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"data_source_id": 1,
"filter_expression": "<filter_expression>",
"grouping_expression": "<grouping_expression>",
"kind": "STATIC",
"name": "<name>"
}'
Get a data set¶
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
dataset_id | path | integer | Yes | Data set ID |
Responses
| Status | Description | Body |
|---|---|---|
200 | Get a data set | DataSet |
401 | Not authenticated | ApiError |
404 | Data set not found | ApiError |
500 | Internal error | ApiError |
Example
curl -X GET 'https://digna.example.com/v1/data-sets/<dataset_id>' \
-H "Authorization: Bearer $DIGNA_API_KEY"
Update a data set¶
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
dataset_id | path | integer | Yes | Data set ID |
Request body: UpdateDataSetRequest
Responses
| Status | Description | Body |
|---|---|---|
200 | Update a data set | DataSet |
401 | Not authenticated | ApiError |
403 | Not authorized | ApiError |
404 | Data set not found | ApiError |
500 | Internal error | ApiError |
Example
curl -X PUT 'https://digna.example.com/v1/data-sets/<dataset_id>' \
-H "Authorization: Bearer $DIGNA_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"filter_expression": "<filter_expression>",
"grouping_expression": "<grouping_expression>",
"kind": "STATIC",
"name": "<name>"
}'
Delete a data set¶
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
dataset_id | path | integer | Yes | Data set ID |
Responses
| Status | Description | Body |
|---|---|---|
204 | Delete a data set | — |
401 | Not authenticated | ApiError |
403 | Not authorized | ApiError |
404 | Data set not found | ApiError |
500 | Internal error | ApiError |
Example
curl -X DELETE 'https://digna.example.com/v1/data-sets/<dataset_id>' \
-H "Authorization: Bearer $DIGNA_API_KEY"
Schemas¶
CreateDataSetRequest¶
| Field | Type | Required | Description |
|---|---|---|---|
data_source_id | integer | Yes | |
filter_expression | string | Yes | |
grouping_expression | string | Yes | |
kind | StableDataSetKind | Yes | |
name | string | Yes |
UpdateDataSetRequest¶
| Field | Type | Required | Description |
|---|---|---|---|
filter_expression | string | Yes | |
grouping_expression | string | Yes | |
kind | StableDataSetKind | Yes | |
name | string | Yes |
ApiError¶
| Field | Type | Required | Description |
|---|---|---|---|
code | ApiErrorCode | Yes | |
message | string | Yes |
DataSet¶
| Field | Type | Required | Description |
|---|---|---|---|
data_source | DataSetDataSource | Yes | |
filter_expression | string | Yes | |
grouping_expression | string | Yes | |
id | integer | Yes | |
kind | StableDataSetKind | Yes | |
name | string | Yes | |
project | DataSetProject | Yes |
StableDataSetKind¶
One of: STATIC, DYNAMIC, HYBRID.
ApiErrorCode¶
One of: INTERNAL_ERROR, INVALID_CREDENTIALS, NOT_FOUND, NOT_AUTHENTICATED, NOT_AUTHORIZED, INVALID_LICENSE, BAD_REQUEST.
DataSetDataSource¶
| Field | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | |
name | string | Yes |
DataSetProject¶
| Field | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | |
name | string | Yes |