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

# Delete the whole catalog

> **Permanently** deletes every record of this type in your workspace. This cannot be undone. Requires `confirm=true`. To remove records reversibly, use a reconcile write or deactivate them instead.



## OpenAPI

````yaml post /admin/datasets/v1/delete-all/
openapi: 3.1.0
info:
  title: Eka Care Datasets API
  description: >-
    Manage your workspace's formulary catalogs (medications, lab tests, symptoms
    and diagnoses): upload them as JSON or CSV, keep them in sync, read them
    back, and switch on partner search in the Eka Medical Database. Every
    request acts only on the workspace your access token belongs to.
  version: 1.0.0
  contact:
    name: Eka Care Support
    url: https://eka.care/
    email: support@eka.care
servers:
  - url: https://api.eka.care
    description: Production
  - url: https://api.dev.eka.care
    description: Stage/Sandbox
security:
  - BearerAuth: []
tags:
  - name: datasets
paths:
  /admin/datasets/v1/delete-all/:
    post:
      tags:
        - datasets
      summary: Delete the whole catalog
      description: >-
        **Permanently** deletes every record of this type in your workspace.
        This cannot be undone. Requires `confirm=true`. To remove records
        reversibly, use a reconcile write or deactivate them instead.
      operationId: deleteAllDatasetRecords
      parameters:
        - $ref: '#/components/parameters/Type'
        - name: confirm
          in: query
          required: true
          description: Must be `true`.
          schema:
            type: boolean
      responses:
        '200':
          description: Catalog deleted.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/SuccessEnvelope'
                  - type: object
                    properties:
                      data:
                        type: object
                        properties:
                          deleted:
                            type: integer
              example:
                success: true
                message: 1000 medication deleted
                data:
                  deleted: 1000
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  parameters:
    Type:
      name: type
      in: query
      required: true
      description: Which catalog to act on.
      schema:
        type: string
        enum:
          - medication
          - lab_test
          - symptom
          - diagnosis
  schemas:
    SuccessEnvelope:
      type: object
      required:
        - success
        - message
      properties:
        success:
          type: boolean
          const: true
        message:
          type: string
    ErrorResponse:
      type: object
      required:
        - success
        - message
      properties:
        success:
          type: boolean
          const: false
        message:
          type: string
        errors:
          type: array
          description: >-
            Present when validation failed or the shrink guard stopped a
            reconcile.
          items:
            oneOf:
              - $ref: '#/components/schemas/FieldError'
              - $ref: '#/components/schemas/ShrinkGuardError'
    FieldError:
      type: object
      properties:
        index:
          type:
            - integer
            - 'null'
          description: >-
            For a JSON body, the 0-based position of the failing record in the
            list. For a CSV, the 1-based data row (the header row is not
            counted). `null` for a file-level error.
        field:
          type:
            - string
            - 'null'
        msg:
          type: string
        value:
          description: The rejected value.
    ShrinkGuardError:
      type: object
      properties:
        code:
          type: string
          const: shrink_guard
        active_before:
          type: integer
        would_deactivate:
          type: integer
  responses:
    BadRequest:
      description: Invalid request, for example a missing or unknown `type`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            message: >-
              type must be one of 'medication', 'lab_test', 'symptom',
              'diagnosis'
    Unauthorized:
      description: The access token is missing, invalid or expired.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Access token for your workspace.

````