openapi: 3.1.0 info: title: Cribl As Code API Credentials Routes 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: Routes description: Manage routes that filter and direct incoming data across pipelines and destinations using filter expressions. paths: /routes: get: operationId: listRoutes summary: List all routes description: Retrieves a list of all configured routes that filter and direct incoming data to the appropriate pipelines and destinations. tags: - Routes responses: '200': description: Successfully retrieved routes content: application/json: schema: type: object properties: items: type: array items: $ref: '#/components/schemas/Route' count: type: integer description: Total number of routes '401': description: Unauthorized post: operationId: createRoute summary: Create a new route description: Creates a new route with filter expressions to direct matching events to specified pipelines and destinations. tags: - Routes requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Route' responses: '200': description: Route created successfully content: application/json: schema: $ref: '#/components/schemas/Route' '400': description: Invalid route configuration '401': description: Unauthorized /routes/{id}: get: operationId: getRoute summary: Get a route by ID description: Retrieves the configuration of a specific route including its filter expression, pipeline, and destination assignments. tags: - Routes parameters: - $ref: '#/components/parameters/resourceId' responses: '200': description: Successfully retrieved route content: application/json: schema: $ref: '#/components/schemas/Route' '401': description: Unauthorized '404': description: Route not found patch: operationId: updateRoute summary: Update a route description: Updates the configuration of an existing route including its filter expression and pipeline assignments. tags: - Routes parameters: - $ref: '#/components/parameters/resourceId' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Route' responses: '200': description: Route updated successfully content: application/json: schema: $ref: '#/components/schemas/Route' '400': description: Invalid route configuration '401': description: Unauthorized '404': description: Route not found delete: operationId: deleteRoute summary: Delete a route description: Deletes a route by its unique ID. tags: - Routes parameters: - $ref: '#/components/parameters/resourceId' responses: '200': description: Route deleted successfully '401': description: Unauthorized '404': description: Route not found /m/{groupId}/routes: get: operationId: listStreamRoutes summary: List Stream routes in a worker group description: Retrieves all routes configured within a worker group context that filter and direct incoming data to pipelines and destinations. tags: - Routes parameters: - $ref: '#/components/parameters/groupId' responses: '200': description: Successfully retrieved routes content: application/json: schema: type: object properties: items: type: array items: $ref: '#/components/schemas/Route_2' count: type: integer description: Total number of routes '401': description: Unauthorized '404': description: Worker group not found post: operationId: createStreamRoute summary: Create a Stream route in a worker group description: Creates a new route within a worker group to filter and direct incoming events to specified pipelines and destinations. tags: - Routes parameters: - $ref: '#/components/parameters/groupId' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Route_2' responses: '200': description: Route created successfully content: application/json: schema: $ref: '#/components/schemas/Route_2' '400': description: Invalid route configuration '401': description: Unauthorized components: parameters: groupId: name: groupId in: path required: true description: The worker group or fleet identifier schema: type: string resourceId: name: id in: path required: true description: The unique identifier of the resource schema: type: string schemas: Route: type: object properties: id: type: string description: Unique identifier for the route name: type: string description: Display name for the route filter: type: string description: JavaScript filter expression that determines which events match this route pipeline: type: string description: The pipeline ID to process matching events output: type: string description: The destination ID for processed events final: type: boolean description: Whether matching events stop being evaluated by subsequent routes disabled: type: boolean description: Whether this route is disabled description: type: string description: A human-readable description of the route groups: type: object description: Group-specific route configuration Route_2: type: object properties: id: type: string description: Unique identifier for the route name: type: string description: Display name for the route filter: type: string description: JavaScript filter expression for matching events pipeline: type: string description: The pipeline ID for processing matched events output: type: string description: The destination ID for processed events final: type: boolean description: Whether matched events stop further evaluation disabled: type: boolean description: Whether this route is disabled description: type: string description: A human-readable description 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/