# Manage datasets

Use the REST API to create and manage datasets.

## Get all datasets

> Returns all of the datasets that the user has access to.  Each dataset contains a set of minimal info, for more detailed information on a given dataset use the /api/dataset/{datasetId} endpoint.

```json
{"openapi":"3.0.4","info":{"title":"Textual API","version":"vDev"},"tags":[{"name":"Dataset Management","description":"Manage datasets for PII detection and redaction. Create, search, and edit datasets, upload and download files, and control dataset sharing permissions."}],"security":[{}],"paths":{"/api/Dataset":{"get":{"tags":["Dataset Management"],"summary":"Get all datasets","description":"Returns all of the datasets that the user has access to.  Each dataset contains a set of minimal info, for more detailed information on a given dataset use the /api/dataset/{datasetId} endpoint.","parameters":[{"name":"filterSynthesized","in":"path","description":"When true, excludes synthesized datasets from results","required":true,"schema":{"type":"boolean","default":true}}],"responses":{"200":{"description":"Returns all accessible datasets","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MinimalDatasetResponseModel"}}}}}}}}},"components":{"schemas":{"MinimalDatasetResponseModel":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"fileSource":{"allOf":[{"$ref":"#/components/schemas/FileSource"}],"nullable":true},"operations":{"type":"array","items":{"$ref":"#/components/schemas/DatasetOperation"}},"tags":{"type":"array","items":{"type":"string"}},"lastUpdated":{"allOf":[{"$ref":"#/components/schemas/Instant"}]},"created":{"allOf":[{"$ref":"#/components/schemas/Instant"}]},"creatorUser":{"allOf":[{"$ref":"#/components/schemas/UserEntityModel"}],"description":"A user entity with basic identity information.","nullable":true},"fileCount":{"type":"integer","format":"int32"}},"additionalProperties":false,"description":"Lightweight dataset summary containing only core metadata used in list views and search results."},"FileSource":{"enum":["Local","Sharepoint","Aws","Sdk","Azure","OneLake"],"type":"string","description":"The original upload location of source files (Local, S3, Azure, SharePoint, OneLake, or SDK)."},"DatasetOperation":{"enum":["HasAccess","ViewSettings","EditSettings","Share","Delete","UploadFiles","ScanFiles","DeleteFiles","PreviewRedactedFiles","DownloadRedactedFiles"],"type":"string","description":"<p>Possible values:</p>\n<ul>\n<li><b>HasAccess</b>: Ability to access a dataset. Every Dataset Permission Set has this operation.</li>\n<li><b>ViewSettings</b>: View dataset settings</li>\n<li><b>EditSettings</b>: Edit dataset settings</li>\n<li><b>Share</b>: Share dataset access</li>\n<li><b>Delete</b>: Delete a dataset</li>\n<li><b>UploadFiles</b>: Upload files to a dataset</li>\n<li><b>ScanFiles</b>: Start a scan of dataset files</li>\n<li><b>DeleteFiles</b>: Delete files from a dataset</li>\n<li><b>PreviewRedactedFiles</b>: Preview redacted dataset files</li>\n<li><b>DownloadRedactedFiles</b>: Download redacted dataset files</li>\n</ul>\n"},"Instant":{"type":"object","additionalProperties":false,"description":"A point in time represented as an ISO 8601 timestamp string."},"UserEntityModel":{"required":["id","userName"],"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the user or group."},"userName":{"type":"string","description":"The display name of the user or group.","nullable":true},"firstName":{"type":"string","description":"The user's first name.","nullable":true},"lastName":{"type":"string","description":"The user's last name.","nullable":true}},"additionalProperties":false,"description":"A user entity with basic identity information."}}}}
```

{% openapi src="<https://3072847115-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvOPn7KQptPWmS5iKg5P0%2Fuploads%2FaMx0x4AHeMON0ynLpaKw%2Fswagger%20(23).json?alt=media&token=89ac597c-d103-4ebf-828d-fee2259907cf>" path="/api/Dataset/{datasetId}" method="get" %}
[swagger (23).json](https://3072847115-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvOPn7KQptPWmS5iKg5P0%2Fuploads%2FaMx0x4AHeMON0ynLpaKw%2Fswagger%20\(23\).json?alt=media\&token=89ac597c-d103-4ebf-828d-fee2259907cf)
{% endopenapi %}

{% openapi src="<https://3072847115-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvOPn7KQptPWmS5iKg5P0%2Fuploads%2FaMx0x4AHeMON0ynLpaKw%2Fswagger%20(23).json?alt=media&token=89ac597c-d103-4ebf-828d-fee2259907cf>" path="/api/Dataset" method="post" %}
[swagger (23).json](https://3072847115-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvOPn7KQptPWmS5iKg5P0%2Fuploads%2FaMx0x4AHeMON0ynLpaKw%2Fswagger%20\(23\).json?alt=media\&token=89ac597c-d103-4ebf-828d-fee2259907cf)
{% endopenapi %}

{% openapi src="<https://textual.tonic.ai/swagger/v1/swagger.json>" path="/api/Dataset" method="put" %}
<https://textual.tonic.ai/swagger/v1/swagger.json>
{% endopenapi %}
