Skip to main content

Add Dataset

Route

/v2/datasets

Description

Create a new dataset with the provided configuration. Datasets define collections of data for classification and protection policies.

Method

POST

Inputs

ParameterTypeRequiredDescription
namestringYesHuman-readable name of the dataset
descriptionstringNoDetailed description of the dataset's purpose
sensitivitystringYesSensitivity level (unrestricted, low, moderate, high, critical)
domainstringNoDomain category (corporate, partner, personal, public)
queryobjectNoQuery conditions that define dataset membership
backfills_enabledbooleanNoWhether historical data processing is enabled
policy_idsarray[string]NoList of policy IDs associated with this dataset

Request Body

{
"name": "Financial Records",
"description": "Sensitive financial data and records",
"sensitivity": "critical",
"domain": "corporate",
"query": {
"rules": [
{
"conditions": [
{
"field_name": "content_tags",
"operator": "has_tag",
"values": [{"value": "financial"}]
}
]
}
]
},
"backfills_enabled": true,
"policy_ids": ["policy-456"]
}

Output

FieldTypeDescription
typestringAlways "datasets"
sizeintegerNumber of datasets returned (always 1)
resourcesarray[Dataset]Array containing the created dataset
errorsarray[Error]Any errors encountered

Rate Limit

  • 60 requests per minute per API key
  • 5 concurrent requests per endpoint

Example Response

{
"type": "datasets",
"size": 1,
"resources": [
{
"id": "dataset-789",
"name": "Financial Records",
"description": "Sensitive financial data and records",
"sensitivity": "critical",
"domain": "corporate",
"created_at": "2024-01-15T10:30:00Z",
"backfills_enabled": true,
"policy_ids": ["policy-456"]
}
],
"errors": []
}