> ## Documentation Index
> Fetch the complete documentation index at: https://documentation.datalab.to/llms.txt
> Use this file to discover all available pages before exploring further.

# Redaction Result Check

> Poll this endpoint to check status of a Redaction request. The redacted PDF is returned when available, together with the verification verdict and failed checks.



## OpenAPI

````yaml https://www.datalab.to/openapi.json get /api/v1/redact/{request_id}
openapi: 3.1.0
info:
  title: Datalab API
  version: 0.0.1
servers:
  - url: https://www.datalab.to
    description: Datalab API
security: []
paths:
  /api/v1/redact/{request_id}:
    get:
      summary: Redaction Result Check
      description: >-
        Poll this endpoint to check status of a Redaction request. The redacted
        PDF is returned when available, together with the verification verdict
        and failed checks.
      operationId: result_response_api_v1_redact__request_id__get
      parameters:
        - name: request_id
          in: path
          required: true
          schema:
            type: string
            title: Request Id
        - name: wos-session
          in: cookie
          required: false
          schema:
            type: string
            title: Wos-Session
        - name: datalab_active_team
          in: cookie
          required: false
          schema:
            type: string
            title: Datalab Active Team
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RedactFinalResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    RedactFinalResponse:
      properties:
        status:
          type: string
          title: Status
          description: >-
            The status of the request. Should be 'complete' when the request is
            done.
        result_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Result Url
          description: >-
            Signed URL for downloading the completed result JSON when direct
            result download is required.
        expires_in:
          anyOf:
            - type: integer
            - type: 'null'
          title: Expires In
          description: Number of seconds until result_url expires.
        success:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Success
          description: >-
            True only when every blocking check passed and the redacted document
            is returned.
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
          description: Why verification failed or no PDF is available.
        verdict:
          anyOf:
            - type: string
            - type: 'null'
          title: Verdict
          description: '''PASS'' when every blocking check passed, otherwise ''FAIL''.'
        withheld:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Withheld
          description: >-
            True when no redacted PDF is available. A failed verification alone
            does not withhold it.
        output_base64:
          anyOf:
            - type: string
            - type: 'null'
          title: Output Base64
          description: >-
            Base64-encoded PDF when available, including outputs that failed
            verification. Inspect verdict before using it.
        targets_removed_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Targets Removed Count
          description: >-
            Number of distinct removed targets. Removed text is never included
            in the report.
        targets_not_found_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Targets Not Found Count
          description: >-
            Number of targets that could not be located. Target text is not
            included.
        failing_checks:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Failing Checks
          description: >-
            Identifiers of failed blocking checks; document-derived details are
            omitted.
        boxes_applied:
          anyOf:
            - type: integer
            - type: 'null'
          title: Boxes Applied
          description: Number of redaction boxes applied.
        pages_rewritten:
          anyOf:
            - items:
                type: integer
              type: array
            - type: 'null'
          title: Pages Rewritten
          description: 0-indexed pages that were rewritten. Other pages are unchanged.
        text_layer_skipped:
          anyOf:
            - items:
                type: integer
              type: array
            - type: 'null'
          title: Text Layer Skipped
          description: >-
            Rewritten pages that got no searchable text layer back, because
            their script cannot be encoded in it.
        runtime:
          anyOf:
            - type: number
            - type: 'null'
          title: Runtime
          description: Processing time in seconds.
        page_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Page Count
          description: Number of pages processed.
        cost_breakdown:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Cost Breakdown
          description: A dictionary of the cost breakdown of this request.
        versions:
          anyOf:
            - additionalProperties: true
              type: object
            - type: string
            - type: 'null'
          title: Versions
          description: A dictionary of the versions of the libraries used in the request.
      type: object
      required:
        - status
      title: RedactFinalResponse
      description: |-
        Result of a redaction request.

        An available PDF is returned even when verification checks fail. Inspect
        ``verdict`` and ``failing_checks`` to determine whether it needs review.
        ``withheld`` indicates that no PDF is available.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.