Screenpipe Data Retention API

Auto-delete old data locally

OpenAPI Specification

screenpipe-data-retention-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Screenpipe Activity Data Retention API
  version: 1.0.0
  description: 'Screenpipe captures everything you see, say, and hear on your computer. Use this API to search through captured content, manage recordings, and build AI-powered automations on top of your screen data.


    The server runs locally at `http://localhost:3030` by default.'
tags:
- name: Data Retention
  description: Auto-delete old data locally
paths:
  /retention/configure:
    post:
      description: POST /retention/configure — enable/disable local retention, set days.
      operationId: retention_retention_configure
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RetentionConfigureRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
      tags:
      - Data Retention
      summary: Configure retention policy
  /retention/status:
    get:
      description: GET /retention/status — return current retention state.
      operationId: retention_retention_status
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RetentionStatusResponse'
      tags:
      - Data Retention
      summary: Get retention status
  /retention/run:
    post:
      description: POST /retention/run — trigger an immediate cleanup run.
      operationId: retention_retention_run
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
      tags:
      - Data Retention
      summary: Run retention cleanup now
components:
  schemas:
    RetentionStatusResponse:
      type: object
      properties:
        enabled:
          type: boolean
        retention_days:
          type: integer
        last_cleanup:
          nullable: true
          type: string
        last_error:
          nullable: true
          type: string
        total_deleted:
          type: integer
      required:
      - enabled
      - retention_days
      - last_cleanup
      - last_error
      - total_deleted
    RetentionConfigureRequest:
      type: object
      properties:
        enabled:
          nullable: true
          type: boolean
        retention_days:
          nullable: true
          type: integer
      required:
      - enabled
      - retention_days