These docs are for Cribl Api 4.5 and are no longer actively maintained.
See the latest version (4.13).
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 the Example Requests
Replace the variables in the example requests with the corresponding information for your Cribl deployment. In the cURL command options, replace
${token}
with a valid API Bearer token. You can also set the$token
environment variable to match the value of a Bearer token.For customer-managed deployments, to use
https
in the URL for your requests as shown in these examples, you must configure Transport Layer Security (TLS).
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://${hostname}:${port}/api/v1/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://${hostname}:${port}/api/v1/version/diff?filename=local%2Fcribl%2Fauth%2Fusers.json&diffLineLimit=5000' \
--header 'Authorization: Bearer ${token}' \
--header 'Content-Type: application/json'