On This Page

Home / Cribl as Code/ Cribl API/ API Code Examples/View Large Diffs

View Large Diffs

For large diffs that have more than 1000 lines, the Commit Changes modal in the Cribl UI displays the message Diff too big to be displayed. Likewise, if you use the GET /version/diff or GET /version/show endpoints to retrieve a large diff, the response includes the Diff too big to be displayed message as well as "isTooBig": true.

In these cases, you can add the diffLineLimit query parameter to your GET /version/diff or GET /version/show requests to retrieve large diffs.

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.

Retrieve a Complete Large Diff

Set the diffLineLimit query parameter to 0 for a GET /version/diff or GET /version/show request to disable the line limit and retrieve the complete diff. For example:

Cribl.Cloud and HybridOn-Prem (Single Instance)On-Prem (Distributed Deployment)

Specify the Number of Lines to Retrieve in a Large Diff

To retrieve no more than a specific number of lines in a large diff, add the diffLineLimit query parameter to a GET /version/diff or GET /version/show request and specify the maximum number of lines to display. This example retrieves up to 5,000 lines of a large diff:

Cribl.Cloud and HybridOn-Prem (Single Instance)On-Prem (Distributed Deployment)