Editing SaaS Datasets
SaaS integration datasets are automatically generated when you configure a SaaS integration. However, you may need to customize these datasets — for example, to add data categories, update field descriptions, or remove fields that are not relevant to your use case.
This guide explains how to edit a SaaS dataset using the Fides API, what changes are allowed, and what happens to your customizations when the integration is updated.
Prerequisites
- A running Fides instance with a configured SaaS integration
- The
connection_keyfor the connection whose dataset you want to edit - API access to your Fides instance
Editing a SaaS dataset via the API
To update a SaaS dataset, use the PATCH endpoint for connection datasets:
PATCH /api/v1/connection/{connection_key}/datasetPass the updated dataset as the request body. For example, to add a data category to a field:
[
{
"fides_key": "my_saas_instance",
"collections": [
{
"name": "user",
"fields": [
{
"name": "email",
"data_categories": ["user.contact.email"]
}
]
}
]
}
]GET /api/v1/connection/{connection_key}/dataset.Editing rules
Only the collections section of a SaaS dataset is mutable. The following table summarizes what you can and cannot change:
| Action | Allowed? | Notes |
|---|---|---|
Add or update data_categories on a field | Yes | |
Add or update the description of a field | Yes | |
Modify fides_meta.data_type on a field | Yes | |
| Remove a non-protected field | Yes | |
| Remove a protected field | No | Restored from template automatically |
| Add new collections | No | Ignored during execution, discarded on update |
Add references or identities | No | Must be defined in the SaaS config |
Change top-level metadata (fides_key, name, description, data_categories, organization_fides_key, meta) | No | Restored to original value with a warning |
param_values or postprocessors). You can modify their metadata (data categories, descriptions, etc.) but you cannot delete them. To check which fields are protected, use GET /api/v1/connection/{connection_key}/dataset/{dataset_key}/protected-fields.Behavior on integration update
When a SaaS integration template is updated, Fides performs a three-way merge to reconcile your customizations with the new template. How the update is triggered depends on the template type:
- Built-in templates are updated automatically when Fides is upgraded to a version that includes a new template.
- Custom templates are only updated when you re-upload the template. A Fides version upgrade will not modify datasets for custom integrations. See Custom Integration Templates for details.
In both cases, the merge is performed between your current dataset (with your customizations), the previously stored template (the baseline), and the new template (the update).
| Scenario | Behavior |
|---|---|
| You modified a field | Your version is preserved, even if the template also changed it |
| You did not modify a field | Updated to the new template version |
| You deleted a non-protected field | Stays deleted |
| You deleted a protected field | Restored from the new template |
| Template adds a new field | Added to your dataset |
| Template removes a field | Removed from your dataset |
Example
Suppose the original template has a user collection with fields email, name, and product_id.
Your edits:
- Add
data_categories: ["user.contact.email"]toemail - Change the
data_typeonproduct_id - Delete the
namefield
New template changes:
- Changes the
data_typeonproduct_id - Adds a new
created_atfield
Result after merge:
| Field | Outcome |
|---|---|
email | Keeps your data category annotation |
product_id | Keeps your data_type (your change takes priority) |
name | Remains deleted (not a protected field) |
created_at | Added from the new template |
Next steps
- Review the datasets overview for general dataset concepts
- Learn how to create dataset YAML for manual dataset definitions
- Explore the Fides REST API documentation for the full list of dataset endpoints
- See the SaaS integrations overview for details on configuring SaaS connections