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

# Cleans up log files for the specified workspaces and connectors.

> Cleans up log files for the specified workspaces and connectors.



## OpenAPI

````yaml 26.2/self-hosted/zh/api-reference/openapi.json POST /cleanup
openapi: 3.0.1
info:
  title: RSSBus OpenAPI
  version: 26.1.9515.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: Cleans up log files for the specified workspaces and connectors.
      description: Cleans up log files 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 when performing the cleanup. If
            not specified, the cleanup settings specified in the application
            will be used.
        Age:
          type: string
          description: >-
            Minimum age of the files to be cleaned up, in days. Files more
            recent than the specified age will not be cleaned up. If not
            specified, the cleanup settings specified in the application will be
            used.
        WorkspaceId:
          type: string
          description: >-
            The Id of the workspace. If not set, all workspaces will be cleaned
            up.
        ConnectorId:
          type: string
          description: >-
            The Id of the connector to be archived. If not set, all connectors
            in the applicable workspace(s) will be 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'

````