a4sx Retention API

The Retention API from a4sx — 6 operation(s) for retention.

GitHub OpenAPI

Operations 6

GET /retention/plan Retention Plan #
POST /retention/purge Purge Events #
POST /retention/prune Prune Events #
GET /retention/archives List Archives #
POST /retention/archives/{label}/restore Restore Archive #
POST /retention/archives/{label}/delete Delete Archive #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/session-exchange-com:session-exchange-com-retention-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

session-exchange-com-retention-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Session Exchange Com Retention API
  version: 0.1.0
  description: 'Operations tagged Retention across 2 of this provider''s published API definitions: openapi.json, session-exchange-com-openapi.json. Each path carries the servers of the definition it was published in.'
tags:
- name: Retention
paths:
  /retention/plan:
    get:
      summary: Retention Plan
      description: 'GLOBAL admin, read-only: what the next retention pass WOULD delete under the effective

        windows (counts + bytes by event type and by class: general, a per-type/prefix window, or a

        per-item class — non-legal support / mail, withdrawn AI opt-outs). Writes nothing; reads the

        whole log, so it costs a full scan (minutes on a large log).'
      operationId: retention_plan_retention_plan_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      tags:
      - Retention
  /retention/purge:
    post:
      summary: Purge Events
      operationId: purge_events_retention_purge_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PurgeRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Retention
  /retention/prune:
    post:
      summary: Prune Events
      operationId: prune_events_retention_prune_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PruneRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Retention
  /retention/archives:
    get:
      summary: List Archives
      operationId: list_archives_retention_archives_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      tags:
      - Retention
  /retention/archives/{label}/restore:
    post:
      summary: Restore Archive
      operationId: restore_archive_retention_archives__label__restore_post
      parameters:
      - name: label
        in: path
        required: true
        schema:
          type: string
          title: Label
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Retention
  /retention/archives/{label}/delete:
    post:
      summary: Delete Archive
      description: 'IRREVERSIBLE hard-delete of a cold archive. `confirm` must equal the label

        (the GitHub delete-repo gesture).'
      operationId: delete_archive_retention_archives__label__delete_post
      parameters:
      - name: label
        in: path
        required: true
        schema:
          type: string
          title: Label
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeleteConfirm'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Retention
components:
  schemas:
    DeleteConfirm:
      properties:
        confirm:
          type: string
          title: Confirm
          description: must equal the archive label
      type: object
      required:
      - confirm
      title: DeleteConfirm
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    PruneRequest:
      properties:
        before:
          type: string
          title: Before
        event_types:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Event Types
        dry_run:
          type: boolean
          title: Dry Run
          default: true
      type: object
      required:
      - before
      title: PruneRequest
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    PurgeRequest:
      properties:
        event_types:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Event Types
        stations:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Stations
        before:
          anyOf:
          - type: string
          - type: 'null'
          title: Before
        dry_run:
          type: boolean
          title: Dry Run
          default: true
      type: object
      title: PurgeRequest
x-refined-from:
- openapi.json
- session-exchange-com-openapi.json