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

# Archive or delete log files, transaction entries in the database, and, optionally, files in the Send, Sent, and Received folders, for the specified workspaces and connectors.

> Archive or delete log files, transaction entries in the database, and, optionally, files in the Send, Sent, and Received folders, for the specified workspaces and connectors.



## OpenAPI

````yaml 26.3/self-hosted/en/api-reference/openapi.json POST /cleanup
openapi: 3.0.1
info:
  title: RSSBus OpenAPI
  version: 26.3.9712.0
servers:
  - url: '{baseUrl}'
    variables:
      baseUrl:
        default: https://arc.example.com/api.rsc
        description: >-
          Base URL of your Arc instance, including scheme and application path
          (e.g. https://arc.example.com/api.rsc).
security: []
paths:
  /cleanup:
    post:
      tags:
        - cleanup
      summary: >-
        Archive or delete log files, transaction entries in the database, and,
        optionally, files in the Send, Sent, and Received folders, for the
        specified workspaces and connectors.
      description: >-
        Archive or delete log files, transaction entries in the database, and,
        optionally, files in the Send, Sent, and Received folders, for the
        specified workspaces and connectors.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/cleanup_input'
      responses:
        '200':
          description: The action result
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CDataError'
      security:
        - authtoken_header: []
        - basic: []
        - authtoken_query: []
components:
  schemas:
    cleanup_input:
      type: object
      properties:
        Type:
          type: string
          description: >-
            Whether to archive or delete files during cleanup. If not specified,
            the cleanup settings specified on the Settings > Advanced page are
            used.
        Age:
          type: string
          description: >-
            Minimum age, in days, of the files to clean up. Files more recent
            than the specified age are not touched. If not specified, the
            cleanup settings specified on the Settings > Advanced page are used.
        WorkspaceId:
          type: string
          description: >-
            The Id of an individual workspace to clean up. If not provided, all
            workspaces are cleaned up.
        ConnectorId:
          type: string
          description: >-
            The Id of a specific connector to clean up. If not set, all
            connectors in the applicable workspace(s) are cleaned up.
    CDataError:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/CDataInError'
    CDataInError:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
  securitySchemes:
    authtoken_header:
      type: apiKey
      in: header
      name: x-cdata-authtoken
    basic:
      scheme: basic
      type: http
    authtoken_query:
      type: apiKey
      in: query
      name: '@authtoken'

````