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

# Remove all entries of a source

> Starts a background task that removes every entry of the source. The source, its source properties and folders stay. The source's `status` is `Purging` until the task finishes; a second purge in that time returns 409.



## OpenAPI

````yaml /api-reference/openapi/configuration.json post /v1/sources/{sourceId}/purge
openapi: 3.2.0
info:
  title: Configuration API
  description: >-
    Manages applications, sources, source properties, source folders, managed
    tags and their values, card definitions, their segments and relation
    definitions; manages destinations, their versions and endpoints, and
    publishes versions; and authors, previews and activates card lifecycles.
    Card property changes are saved as pending changes and take effect when the
    card definition is activated. Source property changes and source deletion
    can finish asynchronously. The tenant comes from the access token.
    Successful responses return the resource itself; lists return a page with
    `items`, the `after` cursor for the next page and, when asked for,
    `totalCount` (`limit` default 50, max 200; lifecycle lists default 25, max
    100). Application updates replace the settings and need the latest `etag`;
    secrets are returned only when created. Errors are problem details
    (`application/problem+json`). Values are PascalCase in REST and UPPER_CASE
    in GraphQL.
  version: 1.0.0
servers:
  - url: https://api.occtoo.com
security: []
tags:
  - name: Applications
  - name: Card definitions
  - name: Card exports
  - name: Destination endpoints
  - name: Destination versions
  - name: Destinations
  - name: Languages
  - name: Lifecycles
  - name: Managed tag values
  - name: Managed tags
  - name: Relation definitions
  - name: Segments
  - name: Sources
paths:
  /v1/sources/{sourceId}/purge:
    post:
      tags:
        - Sources
      summary: Remove all entries of a source
      description: >-
        Starts a background task that removes every entry of the source. The
        source, its source properties and folders stay. The source's `status` is
        `Purging` until the task finishes; a second purge in that time returns
        409.
      operationId: PurgeSource
      parameters:
        - name: sourceId
          in: path
          description: Raw id of the source (e.g. `products`).
          required: true
          schema:
            type: string
      responses:
        '202':
          description: Accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SourceResponse'
        '400':
          description: Bad Request
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/HttpValidationProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '403':
          description: Forbidden
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '404':
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '409':
          description: Conflict
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '429':
          description: Too Many Requests
          headers:
            Retry-After:
              description: Number of seconds to wait before retrying.
              schema:
                minimum: 1
                type: integer
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '500':
          description: Internal Server Error
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - kindeOAuth: []
        - bearerAuth: []
        - apiKey: []
components:
  schemas:
    SourceResponse:
      required:
        - id
        - name
        - description
        - status
        - type
        - createdAt
        - updatedAt
      type: object
      properties:
        id:
          type: string
          description: >-
            Raw id of the source (e.g. `products`). Use with
            `/v1/sources/{sourceId}`.
        name:
          type: string
          description: Name of the source, shown in Studio.
        description:
          type:
            - 'null'
            - string
          description: Free-text note about the source.
        status:
          $ref: '#/components/schemas/DataSourceStatus'
          description: Lifecycle state of the source. See `DataSourceStatus`.
        type:
          $ref: '#/components/schemas/DataSourceType'
          description: >-
            Kind of source: `Generic` holds data entries, `Media` holds uploaded
            files. Set when the source is created.
        createdAt:
          type: string
          description: When the source was created (UTC).
          format: date-time
        updatedAt:
          type: string
          description: When the source last changed (UTC).
          format: date-time
      description: >-
        Holds entries of one kind, such as products or uploaded files, and the
        source properties found in them. Card definitions are built on sources.
    HttpValidationProblemDetails:
      type: object
      properties:
        type:
          type:
            - 'null'
            - string
        title:
          type:
            - 'null'
            - string
        status:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - 'null'
            - integer
            - string
          format: int32
        detail:
          type:
            - 'null'
            - string
        instance:
          type:
            - 'null'
            - string
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
    ProblemDetails:
      type: object
      properties:
        type:
          type:
            - 'null'
            - string
        title:
          type:
            - 'null'
            - string
        status:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - 'null'
            - integer
            - string
          format: int32
        detail:
          type:
            - 'null'
            - string
        instance:
          type:
            - 'null'
            - string
    DataSourceStatus:
      enum:
        - Active
        - Purging
      description: Tracks whether a source is in normal use or being purged.
      x-enum-descriptions:
        Active: 'Live: the source is in normal use.'
        Purging: >-
          In progress: every entry of the source is being deleted. The source is
          active again when that finishes.
    DataSourceType:
      enum:
        - Generic
        - Media
      description: Sets whether a source holds data entries or uploaded files.
      x-enum-descriptions:
        Generic: Holds data entries sent by imports and integrations.
        Media: >-
          Holds uploaded files. The platform creates and fills the file's source
          properties (ids starting with `occtoosys`).
  securitySchemes:
    kindeOAuth:
      type: oauth2
      description: >-
        Sign in with the existing Occtoo Studio identity and selected
        organization.
      flows:
        authorizationCode:
          authorizationUrl: >-
            https://auth.occtoo.com/oauth2/auth?audience=https%3A%2F%2Fapi-weu.occtoo.com
          tokenUrl: https://auth.occtoo.com/oauth2/token
          scopes:
            openid: Authenticate the user with OpenID Connect.
            profile: Read the user's basic profile.
            email: Read the user's email address.
            offline: Refresh the access token without another interactive sign-in.
          x-usePkce: SHA-256
          x-scalar-redirect-uri: https://api.occtoo.com/docs/
    bearerAuth:
      type: http
      description: >-
        Tenant-scoped Occtoo access token, including Kinde machine-to-machine
        application tokens.
      scheme: bearer
      bearerFormat: JWT
    apiKey:
      type: apiKey
      description: Occtoo organization API key.
      name: x-api-key
      in: header

````

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