For the complete documentation index, see llms.txt. This page is also available as Markdown.

Manage datasets

Use the Tonic Textual REST API to create and manage datasets.

Get all datasets

get

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.

Path parameters
filterSynthesizedbooleanRequired

When true, excludes synthesized datasets from results

Default: true
Responses
200

Returns all accessible datasets

application/json

Lightweight dataset summary containing only core metadata used in list views and search results.

idstringOptional
namestringOptional
fileSourcestring · enumOptional

The original upload location of source files (Local, S3, Azure, SharePoint, OneLake, or SDK).

Possible values:
tagsstring[]Optional
lastUpdatedobject · InstantOptional

A point in time represented as an ISO 8601 timestamp string.

createdobject · InstantOptional

A point in time represented as an ISO 8601 timestamp string.

fileCountinteger · int32Optional
get/api/Dataset
200

Returns all accessible datasets

Gets the dataset by its Id

get

Returns the dataset specified by the datasetId

Path parameters
datasetIdstringRequired
Responses
200

OK

application/json
idstringOptional
namestringOptional
enabledModelsstring[]Optional
lastUpdatedobject · InstantOptional
docXImagePolicystring · enumOptional

Possible values:

  • Redact: Run images through OCR and redact sensitive text
  • Ignore: Leave images alone
  • Remove: Cover image with opaque black box
Possible values:
pdfSignaturePolicystring · enumOptional

Possible values:

  • Redact: Cover signature with opaque black box
  • Ignore: Do not attempt to detect signature
Possible values:
docXCommentPolicystring · enumOptional

Possible values:

  • Remove: Remove all comments for file
  • Ignore: Leave comments alone
Possible values:
docXTablePolicystring · enumOptional

Possible values:

  • Redact: Treat table content normally, feed into redaction process.
  • Remove: Replace all characters and symbols in table with a placeholder.
Possible values:
fileSourcestring · enumOptionalPossible values:
customPiiEntityIdsstring[]Optional
get/api/Dataset/{datasetId}

Creates a new dataset

post

Creates a new dataset with the specified configuration. You must specify a unique, non-empty dataset name

Body
namestringOptional
Responses
200

OK

application/json
idstringOptional
namestringOptional
enabledModelsstring[]Optional
lastUpdatedobject · InstantOptional
docXImagePolicystring · enumOptional

Possible values:

  • Redact: Run images through OCR and redact sensitive text
  • Ignore: Leave images alone
  • Remove: Cover image with opaque black box
Possible values:
pdfSignaturePolicystring · enumOptional

Possible values:

  • Redact: Cover signature with opaque black box
  • Ignore: Do not attempt to detect signature
Possible values:
docXCommentPolicystring · enumOptional

Possible values:

  • Remove: Remove all comments for file
  • Ignore: Leave comments alone
Possible values:
docXTablePolicystring · enumOptional

Possible values:

  • Redact: Treat table content normally, feed into redaction process.
  • Remove: Replace all characters and symbols in table with a placeholder.
Possible values:
fileSourcestring · enumOptionalPossible values:
customPiiEntityIdsstring[]Optional
post/api/Dataset

Edit a dataset

put

Updates a dataset to use the specified configuration.

Query parameters
shouldRescanbooleanOptional

When true, triggers a rescan of dataset files after the update

Body

Request to update an existing dataset's configuration, redaction policies, and entity settings.

idstringOptional

The dataset to edit

namestringOptional

The new name of the dataset

generatorSetupobjectOptional

A dictionary mapping entity type names to their transformation type (e.g. Redaction, Synthesis, Off).

Example: {"NAME_GIVEN":"Redaction","NAME_FAMILY":"Redaction"}
generatorMetadataobjectOptional

A dictionary mapping entity type names to their transformation metadata configuration.

labelBlockListsobjectOptional

The new excluded entity value list. Legacy strings inputs are accepted for backward compatibility and normalized into regexes.

Example: {"NAME_FAMILY":{"regexes":[".*\\s(disease|syndrome|disorder)"]}}
labelAllowListsobjectOptional

The new added entity value list. Legacy strings inputs are accepted for backward compatibility and normalized into regexes.

Example: {"HEALTHCARE_ID":{"regexes":["[a-z]{2}\\d{9}"]}}
docXImagePolicystring · enumOptional

Possible values:

  • Redact: Run images through OCR and redact sensitive text
  • Ignore: Leave images alone
  • Remove: Cover image with opaque black box
Possible values:
rtfImagePolicystring · enumOptional

Possible values:

  • Ignore: Leave images alone
  • Remove: Replace each image with an opaque black box of the same size
Possible values:
pdfSignaturePolicystring · enumOptional

Possible values:

  • Redact: Cover signature with opaque black box
  • Ignore: Do not attempt to detect signature
Possible values:
pdfSynthModePolicystring · enumOptional

Possible values:

  • V1: Original mode with incorrect font, size and style
  • V2: Legacy style-aware mode. Persisted V2 values now use the V5 font detector.
  • V5: Style-aware mode backed by the V5 OpenVINO font model
Possible values:
docXCommentPolicystring · enumOptional

Possible values:

  • Remove: Remove all comments for file
  • Ignore: Leave comments alone
Possible values:
docXTablePolicystring · enumOptional

Possible values:

  • Redact: Treat table content normally, feed into redaction process.
  • Remove: Replace all characters and symbols in table with a placeholder.
Possible values:
llmClassificationPolicystring · enumOptional

Possible values:

  • Disabled: Do not use LLM for structured data classification
  • Enabled: Use LLM to classify structured data for PII detection
Possible values:
llmTableClassificationPolicystring · enumOptional

Possible values:

  • Disabled: Do not use LLM for structured data classification
  • Enabled: Use LLM to classify structured data for PII detection
Possible values:
outputPathstringOptional

The Location to store dataset files. Not applicable to local datasets

ocrServiceProviderstring · enumOptional

The OCR engine used for text extraction from images, scanned documents, and PDFs

Possible values:
Responses
200

Returns the updated dataset

Full dataset details including files, configuration, and permission information.

idstringOptional
namestringOptional
generatorMetadataobjectOptional

A dictionary mapping entity type names to their transformation metadata configuration.

outputFormatstring · enumOptional

The output format for redacted files: Original preserves the source format, Markdown produces a markdown version.

Possible values:
generatorSetupobjectOptional

A dictionary mapping entity type names to their transformation type (e.g. Redaction, Synthesis, Off).

Example: {"NAME_GIVEN":"Redaction", "NAME_FAMILY":"Redaction"}
labelBlockListsobjectOptionalExample: {"NAME_FAMILY":{"regexes":[".*\\s(disease|syndrom|disorder)"]}}
labelAllowListsobjectOptionalExample: {"HEALTHCARE_ID":{"regexes":["[a-z]{2}\\d{9}"]}}
tagsstring[]Optional
lastUpdatedobject · InstantOptional

A point in time represented as an ISO 8601 timestamp string.

createdobject · InstantOptional

A point in time represented as an ISO 8601 timestamp string.

docXImagePolicystring · enumOptional

Possible values:

  • Redact: Run images through OCR and redact sensitive text
  • Ignore: Leave images alone
  • Remove: Cover image with opaque black box
Possible values:
rtfImagePolicystring · enumOptional

Possible values:

  • Ignore: Leave images alone
  • Remove: Replace each image with an opaque black box of the same size
Possible values:
pdfSignaturePolicystring · enumOptional

Possible values:

  • Redact: Cover signature with opaque black box
  • Ignore: Do not attempt to detect signature
Possible values:
pdfSynthModePolicystring · enumOptional

Possible values:

  • V1: Original mode with incorrect font, size and style
  • V2: Legacy style-aware mode. Persisted V2 values now use the V5 font detector.
  • V5: Style-aware mode backed by the V5 OpenVINO font model
Possible values:
docXCommentPolicystring · enumOptional

Possible values:

  • Remove: Remove all comments for file
  • Ignore: Leave comments alone
Possible values:
docXTablePolicystring · enumOptional

Possible values:

  • Redact: Treat table content normally, feed into redaction process.
  • Remove: Replace all characters and symbols in table with a placeholder.
Possible values:
llmClassificationPolicystring · enumOptional

Possible values:

  • Disabled: Do not use LLM for structured data classification
  • Enabled: Use LLM to classify structured data for PII detection
Possible values:
llmTableClassificationPolicystring · enumOptional

Possible values:

  • Disabled: Do not use LLM for structured data classification
  • Enabled: Use LLM to classify structured data for PII detection
Possible values:
fileSourcestring · enumOptional

The original upload location of source files (Local, S3, Azure, SharePoint, OneLake, or SDK).

Possible values:
customPiiEntityIdsstring[]Optional
awsCredentialSourcestringOptional
outputPathstringOptional
ocrServiceProviderstring · enumOptional

The OCR engine used for text extraction from images, scanned documents, and PDFs

Possible values:
fileCountinteger · int32Optional
put/api/Dataset

Last updated

Was this helpful?