Cribl Retention API

Configure data retention policies that control how long data is stored in Lake datasets before automatic cleanup.

Documentation

Specifications

Other Resources

OpenAPI Specification

cribl-retention-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Cribl As Code API Credentials Retention API
  description: The Cribl As Code API enables developers to manage Cribl configurations programmatically using infrastructure-as-code principles. The management plane API provides endpoints for administrative tasks in Cribl Cloud including managing organizations, workspaces, and API credentials. Developers can use this API alongside SDKs for Python, Go, and TypeScript, or through Terraform providers, to onboard sources, build and maintain pipelines, and standardize workflows at scale. The management plane supports creating and configuring Cribl Cloud workspaces, managing API credentials, and controlling access to organizational resources.
  version: '1.0'
  contact:
    name: Cribl Support
    url: https://cribl.io/support/
  termsOfService: https://cribl.io/terms-of-service/
servers:
- url: https://gateway.cribl.cloud
  description: Cribl Cloud Management Plane
security:
- bearerAuth: []
tags:
- name: Retention
  description: Configure data retention policies that control how long data is stored in Lake datasets before automatic cleanup.
paths:
  /lake/datasets/{id}/retention:
    get:
      operationId: getLakeDatasetRetention
      summary: Get dataset retention policy
      description: Retrieves the retention policy for a specific Lake dataset including the retention period and cleanup schedule.
      tags:
      - Retention
      parameters:
      - $ref: '#/components/parameters/resourceId'
      responses:
        '200':
          description: Successfully retrieved retention policy
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RetentionPolicy'
        '401':
          description: Unauthorized
        '404':
          description: Dataset not found
    patch:
      operationId: updateLakeDatasetRetention
      summary: Update dataset retention policy
      description: Updates the retention policy for a Lake dataset controlling how long data is stored before automatic cleanup.
      tags:
      - Retention
      parameters:
      - $ref: '#/components/parameters/resourceId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RetentionPolicy'
      responses:
        '200':
          description: Retention policy updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RetentionPolicy'
        '400':
          description: Invalid retention policy
        '401':
          description: Unauthorized
        '404':
          description: Dataset not found
components:
  schemas:
    RetentionPolicy:
      type: object
      properties:
        retentionDays:
          type: integer
          description: Number of days to retain data before cleanup
          minimum: 1
        enabled:
          type: boolean
          description: Whether automatic retention cleanup is enabled
        cleanupSchedule:
          type: string
          description: Cron schedule for running retention cleanup
  parameters:
    resourceId:
      name: id
      in: path
      required: true
      description: The unique identifier of the resource
      schema:
        type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Bearer token obtained via OAuth 2.0 client credentials grant from https://login.cribl.cloud/oauth/token. Tokens expire after 24 hours (86400 seconds).
    oauth2:
      type: oauth2
      description: OAuth 2.0 client credentials flow for Cribl Cloud management plane authentication.
      flows:
        clientCredentials:
          tokenUrl: https://login.cribl.cloud/oauth/token
          scopes: {}
externalDocs:
  description: Cribl As Code Documentation
  url: https://docs.cribl.io/cribl-as-code/api/