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

# Prune tasks

> Deletes tasks older than the required maxAge or beyond the required maxCount most recent tasks, optionally restricted by the filter query parameter. Returns the number of tasks removed for being expired and for exceeding the count.



## OpenAPI

````yaml /schema.json post /tasks/prune
openapi: 3.1.0
info:
  version: 01KV4EC0SHV95TK2YR66AMKFZC
  title: Alumio API
  description: Access Alumio through OpenAPI v3.1.
servers:
  - url: /api/v1
security: []
paths:
  /tasks/prune:
    post:
      tags:
        - Tasks
      summary: Prune tasks
      description: >-
        Deletes tasks older than the required maxAge or beyond the required
        maxCount most recent tasks, optionally restricted by the filter query
        parameter. Returns the number of tasks removed for being expired and for
        exceeding the count.
      operationId: pruneTasks
      parameters:
        - name: maxAge
          in: query
          description: Max age of the tasks.
          required: true
          schema:
            type: string
        - name: maxCount
          in: query
          description: Max number of remaining tasks.
          required: true
          schema:
            type: integer
        - name: filter
          in: query
          description: Apply search criteria.
          required: false
          schema:
            type: string
        - name: space
          in: query
          description: Space Identifier
          required: false
          schema:
            type: string
      responses:
        '201':
          description: Numbers of tasks pruned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PruneTasksResult'
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    PruneTasksResult:
      type: object
      properties:
        expired:
          type: integer
        excess:
          type: integer
    Error:
      type: object
      properties:
        status:
          type: string
        context:
          type: object
        type:
          type: string
        title:
          type: string
        detail:
          type: string
        violations:
          type: array
          items:
            type: object
            properties:
              title:
                type: string
              propertyPath:
                type: string
              type:
                type: string

````