On This Page

Home / Cribl as Code/ Cribl API/Cribl API Code Examples

Cribl API Code Examples

These code examples demonstrate how to use the Cribl API directly to complete a task or set of tasks. Each example describes the steps required to complete a specific task, identifies the endpoints to use, and provides example requests and responses.

The API code examples complement our API Reference and explain common usage scenarios for the Cribl API. If you want to automate an action in Cribl for which you can’t find documentation, ask in the Cribl Community #docs channel.

About Code Examples

Code examples use Bearer token authentication. Read the API authentication documentation to learn how to configure authentication. The API Credential (Cribl.Cloud and hybrid) or login credentials (on-prem) that you use to obtain the Bearer token must have the necessary Permissions for the operations in code examples.

Replace the variables in code examples with the corresponding information for your Cribl deployment.

For on-prem deployments, to use https in request URLs, you must configure Transport Layer Security (TLS).

Code examples do not include all available body parameters. For a complete list of body parameters for specific endpoints, refer to the documentation in the API Reference.

The following Cribl API code examples are available: