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
httpsin 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:
curl --request GET \
--url "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/m/my-worker-group/version/diff?filename=local%2Fcribl%2Fauth%2Fusers.json&diffLineLimit=0" \
--header "Authorization: Bearer ${token}" \
--header "Content-Type: application/json"curl --request GET \
--url "https://${hostname}:${port}/api/v1/version/diff?filename=local%2Fcribl%2Fauth%2Fusers.json&diffLineLimit=0" \
--header "Authorization: Bearer ${token}" \
--header "Content-Type: application/json"curl --request GET \
--url "https://${hostname}:${port}/api/v1/m/my-worker-group/version/diff?filename=local%2Fcribl%2Fauth%2Fusers.json&diffLineLimit=0" \
--header "Authorization: Bearer ${token}" \
--header "Content-Type: application/json"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:
curl --request GET \
--url "https://${workspaceName}-${organizationId}.cribl.cloud/api/v1/version/diff?filename=local%2Fcribl%2Fauth%2Fusers.json&diffLineLimit=5000" \
--header "Authorization: Bearer ${token}" \
--header "Content-Type: application/json"curl --request GET \
--url "https://${hostname}:${port}/api/v1/version/diff?filename=local%2Fcribl%2Fauth%2Fusers.json&diffLineLimit=5000" \
--header "Authorization: Bearer ${token}" \
--header "Content-Type: application/json"curl --request GET \
--url "https://${hostname}:${port}/api/v1/m/my-worker-group/version/diff?filename=local%2Fcribl%2Fauth%2Fusers.json&diffLineLimit=5000" \
--header "Authorization: Bearer ${token}" \
--header "Content-Type: application/json"