---
title: "Restore a dataset to a specific version."
method: POST
path: "/api/Dataset/{datasetId}/history/restore/{versionNumber}"
tags: ["Dataset Management"]
---

# Restore a dataset to a specific version.

`POST /api/Dataset/{datasetId}/history/restore/{versionNumber}`

Restores a dataset's settings to a specific version. Creates a new version with the restored state.

## Path parameters

- `datasetId` string, required
- `versionNumber` integer, required

## Response `200`

OK

- DatasetResponseModel — Full dataset details including files, configuration, and permission information.
  - `id` string
  - `name` string
  - `generatorMetadata` object, nullable — A dictionary mapping entity type names to their transformation metadata configuration.
  - `outputFormat` 'Original' | 'Markdown' — The output format for redacted files: Original preserves the source format, Markdown produces a markdown version.
  - `generatorSetup` object, nullable — A dictionary mapping entity type names to their transformation type (e.g. Redaction, Synthesis, Off).
  - `labelBlockLists` object, nullable
  - `labelAllowLists` object, nullable
  - `tags` string[]
  - `files` FileResponseModel[], nullable
    - `fileId` string — The file ID
    - `fileName` string — The file name
    - `fileType` string — The file type, such as csv, txt, pdf, docx
    - `datasetId` string — The identifier of the dataset that owns the file
    - `numRows` integer, nullable — The number of rows in a csv file.
    - `numColumns` integer — The number of columns in a csv file
    - `piiTypes` string[] — List of all of the entity types that were detected in the file
    - `wordCount` integer — Total number of words in file
    - `redactedWordCount` integer — Total number of redacted words in the file
    - `uploadedTimestamp` Instant — A point in time represented as an ISO 8601 timestamp string.
    - `fileSource` 'Local' | 'Sharepoint' | 'Aws' | 'Sdk' | 'Azure' | 'OneLake' — The original upload location of source files (Local, S3, Azure, SharePoint, OneLake, or SDK).
    - `processingStatus` string — Current status of the file: Queued, Running, Completed, or Failed
    - `processingError` string, nullable — For a file that failed to process, the processing error
    - `mostRecentCompletedJobId` string, nullable — The identifier of the most recent job that processed the file
    - `fileParseResultId` string, nullable — The identifier of the file parse result
    - `filePath` string, nullable — If applicable, the file path of the source file
    - `generatedFileStatus` string, nullable — Status of the external-file generation job for this file, if applicable
  - `lastUpdated` Instant — A point in time represented as an ISO 8601 timestamp string.
  - `created` Instant — A point in time represented as an ISO 8601 timestamp string.
  - `creatorUser` UserEntityModel — A user entity with basic identity information.
    - `id` string, required — The unique identifier of the user or group.
    - `userName` string, nullable, required — The display name of the user or group.
    - `firstName` string, nullable — The user's first name.
    - `lastName` string, nullable — The user's last name.
  - `docXImagePolicy` 'Redact' | 'Ignore' | 'Remove' — <p>Possible values:</p> <ul> <li><b>Redact</b>: Run images through OCR and redact sensitive text</li> <li><b>Ignore</b>: Leave images alone</li> <li><b>Remove</b>: Cover image with opaque black box</li> </ul>
  - `rtfImagePolicy` 'Ignore' | 'Remove' — <p>Possible values:</p> <ul> <li><b>Ignore</b>: Leave images alone</li> <li><b>Remove</b>: Replace each image with an opaque black box of the same size</li> </ul>
  - `pdfSignaturePolicy` 'Redact' | 'Ignore' — <p>Possible values:</p> <ul> <li><b>Redact</b>: Cover signature with opaque black box</li> <li><b>Ignore</b>: Do not attempt to detect signature</li> </ul>
  - `pdfSynthModePolicy` 'V1' | 'V2' | 'V5' — <p>Possible values:</p> <ul> <li><b>V1</b>: Original mode with incorrect font, size and style</li> <li><b>V2</b>: Legacy style-aware mode. Persisted V2 values now use the V5 font detector.</li> <li><b>V5</b>: Style-aware mode backed by the V5 OpenVINO font model</li> </ul>
  - `docXCommentPolicy` 'Remove' | 'Ignore' — <p>Possible values:</p> <ul> <li><b>Remove</b>: Remove all comments for file</li> <li><b>Ignore</b>: Leave comments alone</li> </ul>
  - `docXTablePolicy` 'Redact' | 'Remove' — <p>Possible values:</p> <ul> <li><b>Redact</b>: Treat table content normally, feed into redaction process.</li> <li><b>Remove</b>: Replace all characters and symbols in table with a placeholder.</li> </ul>
  - `llmClassificationPolicy` 'Disabled' | 'Enabled' | 'PdfIdentificationAndSynthesis' — <p>Possible values:</p> <ul> <li><b>Disabled</b>: Do not use LLM for structured data classification</li> <li><b>Enabled</b>: Use LLM to classify structured data for PII detection</li> <li><b>PdfIdentificationAndSynthesis</b>: 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.</li> </ul>
  - `llmTableClassificationPolicy` 'Disabled' | 'Enabled' | 'PdfIdentificationAndSynthesis' — <p>Possible values:</p> <ul> <li><b>Disabled</b>: Do not use LLM for structured data classification</li> <li><b>Enabled</b>: Use LLM to classify structured data for PII detection</li> <li><b>PdfIdentificationAndSynthesis</b>: 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.</li> </ul>
  - `fileSource` 'Local' | 'Sharepoint' | 'Aws' | 'Sdk' | 'Azure' | 'OneLake' — The original upload location of source files (Local, S3, Azure, SharePoint, OneLake, or SDK).
  - `customPiiEntityIds` string[], nullable
  - `operations` DatasetOperation[], nullable
  - `rescanJobs` JobModel[], nullable
    - `id` string
    - `status` string
    - `errorMessages` string, nullable
    - `startTime` Instant — A point in time represented as an ISO 8601 timestamp string.
    - `endTime` Instant — A point in time represented as an ISO 8601 timestamp string.
    - `publishedTime` Instant — A point in time represented as an ISO 8601 timestamp string.
    - `datasetFileId` string, nullable
    - `datasetId` string, nullable
    - `jobType` 'DeidentifyFile' | 'ModelTemplateGeneration' | 'ModelTraining' | 'DeidentifyUnattachedFile' | 'ParseFiles' | 'PipelineDeidentifyFile' | 'ParseFileFromSdk' | 'AudioTranscription' | 'ProcessExternalFiles' | 'GenerateExternalFiles' | 'ManualRedactionProcessFile' | 'FileAnnotation' | 'GenerateNewGuidelines' | 'TrainingFileAnalysis' | 'TrainingFileAnnotation' | 'AuditRedactRequest' | 'HarvestFormMappingFile' | 'ApplyFormMapping' — The type of background processing job (e.g., file deidentification, transcription, or model training).
    - `ocrServiceProvider` 'Azure' | 'PyTesseract' | 'Textract' | 'None' — The OCR engine used for text extraction from images, scanned documents, and PDFs
    - `modelsInfo` ModelsInfo — Information about the ML models and libraries used during processing.
      - `dateSynthesis` DateSynthesis — Date synthesis model configuration.
        - `cpuVariant` string, nullable
        - `modelName` string, nullable
        - `runsOnGpu` boolean
      - `fasttext` Fasttext — FastText language detection model configuration.
        - `libVersion` string
        - `model` string
        - `runsOnGpu` boolean
      - `image` Image — Image processing model version information.
        - `version` string
      - `spacy` Spacy — spaCy NLP library configuration with auxiliary and multilingual models.
        - `libVersion` string
        - `auxModel` SpacyModel — A single spaCy model instance with name, language, and version.
          - `name` string
          - `language` string
          - `runsOnGpu` boolean
          - `version` string
        - `multilingualModels` SpacyModel[]
          - `name` string
          - `language` string
          - `runsOnGpu` boolean
          - `version` string
      - `torch` Torch — PyTorch runtime configuration including GPU availability.
        - `gpuAvailable` boolean
        - `libVersion` string
      - `tonicNer` TonicNer — Tonic NER (Named Entity Recognition) model configuration.
        - `enModel` string
        - `xlmModel` string
        - `textualMultiLingual` boolean — Whether the service is configured to run in multilingual NER mode (mirrors the Python `TEXTUAL_MULTI_LINGUAL` environment variable).
        - `textualMultiLingualXlmOnly` boolean — Whether the service is configured to use the XLM model exclusively (mirrors the Python `TEXTUAL_MULTI_LINGUAL_XLM_ONLY` environment variable). Reflects raw configuration; no effect unless Solar.Core.Models.TonicNer.TextualMultiLingual is also true.
      - `tesseract` Tesseract — Tesseract OCR engine configuration.
        - `model` TesseractModel — Tesseract model identity with ID and version.
          - `id` string
          - `version` string
    - `pdfSynthModePolicy` 'V1' | 'V2' | 'V5' — <p>Possible values:</p> <ul> <li><b>V1</b>: Original mode with incorrect font, size and style</li> <li><b>V2</b>: Legacy style-aware mode. Persisted V2 values now use the V5 font detector.</li> <li><b>V5</b>: Style-aware mode backed by the V5 OpenVINO font model</li> </ul>
  - `mostRecentExternalFileGenerationJob` JobModel — Represents a background processing job with status, timing, and resource association details.
    - `id` string
    - `status` string
    - `errorMessages` string, nullable
    - `startTime` Instant — A point in time represented as an ISO 8601 timestamp string.
    - `endTime` Instant — A point in time represented as an ISO 8601 timestamp string.
    - `publishedTime` Instant — A point in time represented as an ISO 8601 timestamp string.
    - `datasetFileId` string, nullable
    - `datasetId` string, nullable
    - `jobType` 'DeidentifyFile' | 'ModelTemplateGeneration' | 'ModelTraining' | 'DeidentifyUnattachedFile' | 'ParseFiles' | 'PipelineDeidentifyFile' | 'ParseFileFromSdk' | 'AudioTranscription' | 'ProcessExternalFiles' | 'GenerateExternalFiles' | 'ManualRedactionProcessFile' | 'FileAnnotation' | 'GenerateNewGuidelines' | 'TrainingFileAnalysis' | 'TrainingFileAnnotation' | 'AuditRedactRequest' | 'HarvestFormMappingFile' | 'ApplyFormMapping' — The type of background processing job (e.g., file deidentification, transcription, or model training).
    - `ocrServiceProvider` 'Azure' | 'PyTesseract' | 'Textract' | 'None' — The OCR engine used for text extraction from images, scanned documents, and PDFs
    - `modelsInfo` ModelsInfo — Information about the ML models and libraries used during processing.
      - `dateSynthesis` DateSynthesis — Date synthesis model configuration.
        - `cpuVariant` string, nullable
        - `modelName` string, nullable
        - `runsOnGpu` boolean
      - `fasttext` Fasttext — FastText language detection model configuration.
        - `libVersion` string
        - `model` string
        - `runsOnGpu` boolean
      - `image` Image — Image processing model version information.
        - `version` string
      - `spacy` Spacy — spaCy NLP library configuration with auxiliary and multilingual models.
        - `libVersion` string
        - `auxModel` SpacyModel — A single spaCy model instance with name, language, and version.
          - `name` string
          - `language` string
          - `runsOnGpu` boolean
          - `version` string
        - `multilingualModels` SpacyModel[]
          - `name` string
          - `language` string
          - `runsOnGpu` boolean
          - `version` string
      - `torch` Torch — PyTorch runtime configuration including GPU availability.
        - `gpuAvailable` boolean
        - `libVersion` string
      - `tonicNer` TonicNer — Tonic NER (Named Entity Recognition) model configuration.
        - `enModel` string
        - `xlmModel` string
        - `textualMultiLingual` boolean — Whether the service is configured to run in multilingual NER mode (mirrors the Python `TEXTUAL_MULTI_LINGUAL` environment variable).
        - `textualMultiLingualXlmOnly` boolean — Whether the service is configured to use the XLM model exclusively (mirrors the Python `TEXTUAL_MULTI_LINGUAL_XLM_ONLY` environment variable). Reflects raw configuration; no effect unless Solar.Core.Models.TonicNer.TextualMultiLingual is also true.
      - `tesseract` Tesseract — Tesseract OCR engine configuration.
        - `model` TesseractModel — Tesseract model identity with ID and version.
          - `id` string
          - `version` string
    - `pdfSynthModePolicy` 'V1' | 'V2' | 'V5' — <p>Possible values:</p> <ul> <li><b>V1</b>: Original mode with incorrect font, size and style</li> <li><b>V2</b>: Legacy style-aware mode. Persisted V2 values now use the V5 font detector.</li> <li><b>V5</b>: Style-aware mode backed by the V5 OpenVINO font model</li> </ul>
  - `fileSourceExternalCredential` FileSourceExternalCredentialApiModel — Credentials for connecting to an external file source such as S3, Azure Blob Storage, or SharePoint.
    - `fileSource` 'Local' | 'Sharepoint' | 'Aws' | 'Sdk' | 'Azure' | 'OneLake' — The original upload location of source files (Local, S3, Azure, SharePoint, OneLake, or SDK).
    - `awsCredentialsSource` 'UserProvided' | 'FromEnvironment' | 'AssumeRole' — How AWS credentials are provided: directly by the user or from the server environment.
    - `credential` IExternalCredential — External credential interface for use in serializing credentials to `ExternalDatasetCredentials` table.
  - `awsCredentialSource` string, nullable
  - `outputPath` string, nullable
  - `externalFilesInfo` ExternalFilesResponseModel — The external (cloud) file configuration for a dataset or resource.
    - `selectedFiles` string[] — The list of individual cloud file paths selected for processing.
    - `pathPrefixes` string[] — The list of cloud path prefixes used to filter files for processing.
    - `selectedFileExtensions` string[] — The list of file extensions to include when processing cloud files.
  - `ocrServiceProvider` 'Azure' | 'PyTesseract' | 'Textract' | 'None' — The OCR engine used for text extraction from images, scanned documents, and PDFs
  - `fileCount` integer
  - `formMapping` DatasetFormMappingApiModel — A dataset's applied form mapping ("form label mapping"): summary of the point-in-time clone stored in the dataset's settings, plus the read-time status against the org-level source.
    - `sourceFormMappingId` string, required
    - `sourceName` string, required
    - `sourceVersion` integer, required
    - `liveSourceVersion` integer, nullable, required
    - `mappedFieldCount` integer, required
    - `status` 'Current' | 'Stale' | 'SourceDeleted', required — 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.<p>Possible values:</p> <ul> <li><b>Current</b>: The source mapping still exists and has not changed since the clone was taken.</li> <li><b>Stale</b>: The source mapping was edited after the clone was taken (source.Version > SourceVersion).</li> <li><b>SourceDeleted</b>: The source mapping was deleted; the dataset continues to run off its clone.</li> </ul>
    - `noticeDismissed` boolean, required

## Other responses

- `404` — The dataset or version cannot be found

---

[API](https://skmtc.net/tonic/apis/textual-api.md) · [All operations](https://skmtc.net/tonic/apis/textual-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tonic/textual-api/revisions/41da8739a690/schema)
