On This Page

Home / Cribl as Code/ Cribl SDKs (Preview)/Cribl SDK Code Examples

Cribl SDK Code Examples

Preview Feature

The Cribl SDKs are Preview features that are still being developed. We do not recommend using them in a production environment, because the features might not be fully tested or optimized for performance, and related documentation could be incomplete.

Please continue to submit feedback through normal Cribl support channels, but assistance might be limited while the features remain in Preview.

The SDK code examples in this section demonstrate how to use the Cribl Python SDK for the control plane and management plane for common use cases.

Before using the code examples, follow the instructions to authenticate your SDK requests. If you prefer, you can create and save an .env file to keep sensitive information out of your source code.

About Code Examples

Code examples use Bearer token authentication. Read the SDK 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 the 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 SDK code examples cover the following use cases: