Manage datasets
Use the Tonic Textual REST API to create and manage 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.
When true, excludes synthesized datasets from results
trueReturns all accessible datasets
Lightweight dataset summary containing only core metadata used in list views and search results.
The original upload location of source files (Local, S3, Azure, SharePoint, OneLake, or SDK).
A point in time represented as an ISO 8601 timestamp string.
A point in time represented as an ISO 8601 timestamp string.
Lifecycle of a dataset's applied form mapping relative to its org-level source, computed at read time by joining Dataset.FormMappingSourceId to the live FormMapping. The clone is self-contained, so a Stale or SourceDeleted mapping keeps working — these states are informational badges only.
Possible values:
- Current: The source mapping still exists and has not changed since the clone was taken.
- Stale: The source mapping was edited after the clone was taken (source.Version > SourceVersion).
- SourceDeleted: The source mapping was deleted; the dataset continues to run off its clone.
GET /api/Dataset HTTP/1.1
Accept: */*
Returns all accessible datasets
[
{
"id": "text",
"name": "text",
"fileSource": "Local",
"operations": [
"HasAccess"
],
"tags": [
"text"
],
"lastUpdated": {},
"created": {},
"creatorUser": {
"id": "text",
"userName": "text",
"firstName": "text",
"lastName": "text"
},
"fileCount": 1,
"formMappingName": "text",
"formMappingStatus": "Current",
"formMappingNoticeDismissed": true
}
]Returns the dataset specified by the datasetId
OK
Possible values:
- Redact: Run images through OCR and redact sensitive text
- Ignore: Leave images alone
- Remove: Cover image with opaque black box
Possible values:
- Redact: Cover signature with opaque black box
- Ignore: Do not attempt to detect signature
Possible values:
- Remove: Remove all comments for file
- Ignore: Leave comments alone
Possible values:
- Redact: Treat table content normally, feed into redaction process.
- Remove: Replace all characters and symbols in table with a placeholder.
The dataset cannot be found
GET /api/Dataset/{datasetId} HTTP/1.1
Accept: */*
{
"id": "text",
"name": "text",
"datasetGeneratorMetadata": "asdfqwer",
"generatorSetup": "{\"NAME_GIVEN\":\"Redaction\", \"NAME_FAMILY\":\"Redaction\"}",
"labelBlockLists": "{\"NAME_FAMILY\": {\"strings\":[],\"regexes\":[\".*\\\\s(disease|syndrom|disorder)\"]}}",
"labelAllowLists": "{ \"HEALTHCARE_ID\": {\"strings\":[],\"regexes\":[\"[a-z]{2}\\\\d{9}\"]} }",
"enabledModels": [
"text"
],
"files": [
{
"fileId": "text",
"fileName": "text",
"fileType": "text",
"datasetId": "text",
"numRows": 1,
"numColumns": 1,
"piiTypes": [
"text"
],
"wordCount": 1,
"redactedWordCount": 1,
"uploadedTimestamp": {},
"fileSource": "Local",
"processingStatus": "text",
"processingError": "text",
"mostRecentCompletedJobId": "text"
}
],
"lastUpdated": {},
"docXImagePolicy": "Redact",
"pdfSignaturePolicy": "Redact",
"docXCommentPolicy": "Remove",
"docXTablePolicy": "Redact",
"fileSource": "Local",
"customPiiEntityIds": [
"text"
],
"rescanJobs": [
{
"id": "text",
"status": "text",
"errorMessages": "text",
"startTime": {},
"endTime": {},
"publishedTime": {},
"datasetFileId": "text",
"jobType": "DeidentifyFile"
}
]
}Creates a new dataset with the specified configuration. You must specify a unique, non-empty dataset name
OK
Possible values:
- Redact: Run images through OCR and redact sensitive text
- Ignore: Leave images alone
- Remove: Cover image with opaque black box
Possible values:
- Redact: Cover signature with opaque black box
- Ignore: Do not attempt to detect signature
Possible values:
- Remove: Remove all comments for file
- Ignore: Leave comments alone
Possible values:
- Redact: Treat table content normally, feed into redaction process.
- Remove: Replace all characters and symbols in table with a placeholder.
The dataset name must be specified
Dataset name is already in use
POST /api/Dataset HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 15
{
"name": "text"
}{
"id": "text",
"name": "text",
"datasetGeneratorMetadata": "asdfqwer",
"generatorSetup": "{\"NAME_GIVEN\":\"Redaction\", \"NAME_FAMILY\":\"Redaction\"}",
"labelBlockLists": "{\"NAME_FAMILY\": {\"strings\":[],\"regexes\":[\".*\\\\s(disease|syndrom|disorder)\"]}}",
"labelAllowLists": "{ \"HEALTHCARE_ID\": {\"strings\":[],\"regexes\":[\"[a-z]{2}\\\\d{9}\"]} }",
"enabledModels": [
"text"
],
"files": [
{
"fileId": "text",
"fileName": "text",
"fileType": "text",
"datasetId": "text",
"numRows": 1,
"numColumns": 1,
"piiTypes": [
"text"
],
"wordCount": 1,
"redactedWordCount": 1,
"uploadedTimestamp": {},
"fileSource": "Local",
"processingStatus": "text",
"processingError": "text",
"mostRecentCompletedJobId": "text"
}
],
"lastUpdated": {},
"docXImagePolicy": "Redact",
"pdfSignaturePolicy": "Redact",
"docXCommentPolicy": "Remove",
"docXTablePolicy": "Redact",
"fileSource": "Local",
"customPiiEntityIds": [
"text"
],
"rescanJobs": [
{
"id": "text",
"status": "text",
"errorMessages": "text",
"startTime": {},
"endTime": {},
"publishedTime": {},
"datasetFileId": "text",
"jobType": "DeidentifyFile"
}
]
}Updates a dataset to use the specified configuration.
When true, triggers a rescan of dataset files after the update
Request to update an existing dataset's configuration, redaction policies, and entity settings.
The dataset to edit
The new name of the dataset
A dictionary mapping entity type names to their transformation type (e.g. Redaction, Synthesis, Off).
{"NAME_GIVEN":"Redaction","NAME_FAMILY":"Redaction"}Per-label overrides of a multiclass model-based entity to remove, so each label falls back to its model's handling. Each is a ':' generator setup key; any other key is ignored.
["CUSTOM_TREATMENT:MEDICATION"]A dictionary mapping entity type names to their transformation metadata configuration.
The new excluded entity value list. Legacy strings inputs are accepted for backward compatibility and normalized into regexes.
{"NAME_FAMILY":{"regexes":[".*\\s(disease|syndrome|disorder)"]}}The new added entity value list. Legacy strings inputs are accepted for backward compatibility and normalized into regexes.
{"HEALTHCARE_ID":{"regexes":["[a-z]{2}\\d{9}"]}}The new DOCX image policy, options are Redact, Ignore, and Remove
The new RTF image policy, options are Ignore and Remove. Only applicable to JSON datasets. Omit to leave the existing dataset value unchanged.
The new PDF signature policy. Options are Redact and Ignore.
The new signature policy for pictures in Word documents, options are Redact and Ignore. Omit to leave the existing value unchanged.
The new signature policy for pictures in Excel workbooks, options are Redact and Ignore. Omit to leave the existing value unchanged.
The new logo policy for PDF, PNG, JPG and TIFF files, options are Ignore and Redact. Omit to leave the existing value unchanged.
The new face policy for PDF, PNG, JPG and TIFF files, options are Ignore and Redact. Omit to leave the existing value unchanged.
The new PDF and image synthesis mode policy, options are V1 and V5. V2 is accepted for backwards compatibility with existing settings.
Move native PDF text safely along a source line when synthesis would overlap it. Omit to keep the existing setting.
Continue the picture's background under replaced text in image files instead of filling a one-color box. Omit to keep the existing setting.
Rebuild the background under replaced text in image files with the LaMa inpainting model. Omit to keep the existing setting.
The new DOCX comment policy, options are Remove and Ignore
The new DOCX table policy, options are Redact and Remove
The new PPTX image policy, options are Redact, Ignore, and Remove. Omit to leave the existing value unchanged.
The new PPTX comment policy, options are Remove and Ignore. Omit to leave the existing value unchanged.
The new PPTX table policy, options are Redact and Remove. Omit to leave the existing value unchanged.
The new PPTX logo policy, options are Ignore and Remove. Remove paints detected logos in slide, notes, layout and master pictures black, regardless of the PPTX image policy. Omit to leave the existing value unchanged.
The new PPTX signature policy, options are Ignore (default) and Remove. Remove paints detected signatures in slide, notes, layout and master pictures black, regardless of the PPTX image policy; for PowerPoint pictures it replaces the PDF signature policy. Omit to leave the existing value unchanged.
Possible values:
- Ignore: Leave detected faces in pictures alone. The default.
- Remove: Paint detected faces in slide, notes, layout and master pictures black, regardless of the image policy.
The LLM classification policy. Enabled reviews detected entities and classifies structured data. PdfIdentificationAndSynthesis uses the LLM for PDF PII identification and synthesis.
A no longer supported variable, kept only to maintain support for older datasets.
The Location to store dataset files. Not applicable to local datasets
OCR engine override (overrides the default OCR engine)
Returns the updated dataset
Full dataset details including files, configuration, and permission information.
A dictionary mapping entity type names to their transformation metadata configuration.
The output format for redacted files: Original preserves the source format, Markdown produces a markdown version.
A dictionary mapping entity type names to their transformation type (e.g. Redaction, Synthesis, Off).
{"NAME_GIVEN":"Redaction", "NAME_FAMILY":"Redaction"}{"NAME_FAMILY":{"regexes":[".*\\s(disease|syndrom|disorder)"]}}{"HEALTHCARE_ID":{"regexes":["[a-z]{2}\\d{9}"]}}A point in time represented as an ISO 8601 timestamp string.
A point in time represented as an ISO 8601 timestamp string.
Possible values:
- Redact: Run images through OCR and redact sensitive text
- Ignore: Leave images alone
- Remove: Cover image with opaque black box
Possible values:
- Ignore: Leave images alone
- Remove: Replace each image with an opaque black box of the same size
Possible values:
- Redact: Cover signature with opaque black box
- Ignore: Do not attempt to detect signature
Possible values:
- Redact: Cover detected signatures in pictures embedded in Word documents with an opaque black box
- Ignore: Leave detected signatures in Word document pictures alone
Possible values:
- Redact: Cover detected signatures in pictures embedded in Excel workbooks with an opaque black box
- Ignore: Leave detected signatures in Excel workbook pictures alone
Possible values:
- Ignore: Leave detected logos in PDF and image files alone
- Redact: Cover detected logos in PDF and image files with an opaque black box
Possible values:
- Ignore: Leave detected faces in PDF and image files alone
- Redact: Cover detected faces in PDF and image files with an opaque black box
Possible values:
- V1: Legacy mode: replacement text does not match the source font, size or colors
- V2: Legacy style-aware mode. Persisted V2 values now use the V5 font detector.
- V5: Default style-aware mode backed by the V5 OpenVINO font model
Possible values:
- Remove: Remove all comments for file
- Ignore: Leave comments alone
Possible values:
- Redact: Treat table content normally, feed into redaction process.
- Remove: Replace all characters and symbols in table with a placeholder.
Possible values:
- Redact: Run pictures embedded in slides and speaker notes through OCR and redact sensitive text
- Ignore: Leave pictures alone
- Remove: Replace each picture with an opaque black box of the same size
Possible values:
- Remove: Remove all comments (and comment authors) from the presentation
- Ignore: Leave comments alone
Possible values:
- Redact: Treat table content normally, feed into redaction process.
- Remove: Replace all characters and symbols in table cells with a placeholder.
Possible values:
- Ignore: Leave detected logos in pictures alone
- Remove: Paint detected logos in slide, notes, layout and master pictures black, regardless of the image policy.
Possible values:
- Ignore: Leave detected signatures in pictures alone. The default: a deck's pictures are mostly icons, charts and photos, which the detector confuses with signatures, and a slide rarely carries a real one.
- Remove: Paint detected signatures in slide, notes, layout and master pictures black, regardless of the image policy. For pictures hosted by a presentation this replaces
Possible values:
- Ignore: Leave detected faces in pictures alone. The default.
- Remove: Paint detected faces in slide, notes, layout and master pictures black, regardless of the image policy.
Possible values:
- Disabled: Do not use LLM for structured data classification
- Enabled: Use LLM to classify structured data for PII detection
- PdfIdentificationAndSynthesis: Use an LLM instead of the NER model and C# generators for PDF PII identification and synthesis. Other file types continue to use their existing detection and synthesis paths.
Possible values:
- Disabled: Do not use LLM for structured data classification
- Enabled: Use LLM to classify structured data for PII detection
- PdfIdentificationAndSynthesis: Use an LLM instead of the NER model and C# generators for PDF PII identification and synthesis. Other file types continue to use their existing detection and synthesis paths.
The original upload location of source files (Local, S3, Azure, SharePoint, OneLake, or SDK).
The OCR engine used for text extraction from images, scanned documents, and PDFs
The dataset cannot be found
Dataset name is already in use
PUT /api/Dataset HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 1142
{
"id": "text",
"name": "text",
"generatorSetup": {
"NAME_GIVEN": "Redaction",
"NAME_FAMILY": "Redaction"
},
"removedGeneratorSetupKeys": [
"CUSTOM_TREATMENT:MEDICATION"
],
"generatorMetadata": null,
"labelBlockLists": {
"NAME_FAMILY": {
"regexes": [
".*\\s(disease|syndrome|disorder)"
]
}
},
"labelAllowLists": {
"HEALTHCARE_ID": {
"regexes": [
"[a-z]{2}\\d{9}"
]
}
},
"docXImagePolicy": "Redact",
"rtfImagePolicy": "Ignore",
"pdfSignaturePolicy": "Redact",
"docxSignaturePolicy": "Redact",
"xlsxSignaturePolicy": "Redact",
"pdfLogoPolicy": "Ignore",
"pdfFacePolicy": "Ignore",
"pdfSynthModePolicy": "V1",
"pdfLineReflowEnabled": null,
"imageBackgroundFastEnabled": null,
"imageBackgroundLamaEnabled": null,
"docXCommentPolicy": "Remove",
"docXTablePolicy": "Redact",
"pptxImagePolicy": "Redact",
"pptxCommentPolicy": "Remove",
"pptxTablePolicy": "Redact",
"pptxLogoPolicy": "Ignore",
"pptxSignaturePolicy": "Ignore",
"pptxFacePolicy": "Ignore",
"llmClassificationPolicy": "Disabled",
"llmTableClassificationPolicy": "Disabled",
"fileSourceExternalCredential": {
"fileSource": "Local",
"awsCredentialsSource": "UserProvided",
"credential": {}
},
"outputPath": null,
"ocrServiceProvider": "Azure",
"formMapping": {
"formMappingId": null
}
}{
"id": "text",
"name": "text",
"generatorMetadata": null,
"outputFormat": "Original",
"generatorSetup": "{\"NAME_GIVEN\":\"Redaction\", \"NAME_FAMILY\":\"Redaction\"}",
"labelBlockLists": "{\"NAME_FAMILY\":{\"regexes\":[\".*\\\\s(disease|syndrom|disorder)\"]}}",
"labelAllowLists": "{\"HEALTHCARE_ID\":{\"regexes\":[\"[a-z]{2}\\\\d{9}\"]}}",
"tags": [
"text"
],
"files": [
{
"fileId": "text",
"fileName": "text",
"fileType": "text",
"datasetId": "text",
"numRows": null,
"numColumns": 1,
"piiTypes": [
"text"
],
"wordCount": 1,
"redactedWordCount": 1,
"uploadedTimestamp": {},
"fileSource": "Local",
"processingStatus": "text",
"processingError": null,
"mostRecentCompletedJobId": null,
"fileParseResultId": null,
"filePath": null,
"generatedFileStatus": null
}
],
"lastUpdated": {},
"created": {},
"creatorUser": {
"id": "text",
"userName": null,
"firstName": null,
"lastName": null
},
"docXImagePolicy": "Redact",
"rtfImagePolicy": "Ignore",
"pdfSignaturePolicy": "Redact",
"docxSignaturePolicy": "Redact",
"xlsxSignaturePolicy": "Redact",
"pdfLogoPolicy": "Ignore",
"pdfFacePolicy": "Ignore",
"pdfSynthModePolicy": "V1",
"pdfLineReflowEnabled": null,
"imageBackgroundFastEnabled": null,
"imageBackgroundLamaEnabled": null,
"docXCommentPolicy": "Remove",
"docXTablePolicy": "Redact",
"pptxImagePolicy": "Redact",
"pptxCommentPolicy": "Remove",
"pptxTablePolicy": "Redact",
"pptxLogoPolicy": "Ignore",
"pptxSignaturePolicy": "Ignore",
"pptxFacePolicy": "Ignore",
"llmClassificationPolicy": "Disabled",
"llmTableClassificationPolicy": "Disabled",
"fileSource": "Local",
"customPiiEntityIds": [
"text"
],
"operations": [
"HasAccess"
],
"rescanJobs": [
{
"id": "text",
"status": "text",
"errorMessages": null,
"startTime": {},
"endTime": {},
"publishedTime": {},
"datasetFileId": null,
"datasetId": null,
"jobType": "DeidentifyFile",
"ocrServiceProvider": "Azure",
"modelsInfo": {
"dateSynthesis": {
"cpuVariant": null,
"modelName": null,
"runsOnGpu": true
},
"fasttext": {
"libVersion": "text",
"model": "text",
"runsOnGpu": true
},
"image": {
"version": "text"
},
"spacy": {
"libVersion": "text",
"auxModel": {
"name": "text",
"language": "text",
"runsOnGpu": true,
"version": "text"
},
"multilingualModels": [
{
"name": "text",
"language": "text",
"runsOnGpu": true,
"version": "text"
}
]
},
"torch": {
"gpuAvailable": true,
"libVersion": "text"
},
"tonicNer": {
"enModel": "text",
"xlmModel": "text",
"textualMultiLingual": true,
"textualMultiLingualXlmOnly": true
},
"tesseract": {
"model": {
"id": "text",
"version": "text"
}
}
},
"pdfSynthModePolicy": "V1"
}
],
"mostRecentExternalFileGenerationJob": {
"id": "text",
"status": "text",
"errorMessages": null,
"startTime": {},
"endTime": {},
"publishedTime": {},
"datasetFileId": null,
"datasetId": null,
"jobType": "DeidentifyFile",
"ocrServiceProvider": "Azure",
"modelsInfo": {
"dateSynthesis": {
"cpuVariant": null,
"modelName": null,
"runsOnGpu": true
},
"fasttext": {
"libVersion": "text",
"model": "text",
"runsOnGpu": true
},
"image": {
"version": "text"
},
"spacy": {
"libVersion": "text",
"auxModel": {
"name": "text",
"language": "text",
"runsOnGpu": true,
"version": "text"
},
"multilingualModels": [
{
"name": "text",
"language": "text",
"runsOnGpu": true,
"version": "text"
}
]
},
"torch": {
"gpuAvailable": true,
"libVersion": "text"
},
"tonicNer": {
"enModel": "text",
"xlmModel": "text",
"textualMultiLingual": true,
"textualMultiLingualXlmOnly": true
},
"tesseract": {
"model": {
"id": "text",
"version": "text"
}
}
},
"pdfSynthModePolicy": "V1"
},
"fileSourceExternalCredential": {
"fileSource": "Local",
"awsCredentialsSource": "UserProvided",
"credential": {}
},
"awsCredentialSource": null,
"outputPath": null,
"externalFilesInfo": {
"selectedFiles": [
"text"
],
"pathPrefixes": [
"text"
],
"selectedFileExtensions": [
"text"
]
},
"ocrServiceProvider": "Azure",
"fileCount": 1,
"formMapping": {
"sourceFormMappingId": "text",
"sourceName": "text",
"sourceVersion": 1,
"liveSourceVersion": null,
"mappedFieldCount": 1,
"status": "Current",
"noticeDismissed": true
}
}Last updated
Was this helpful?