From 708b7d8332948a9f4bd4e24606d409214ef43ff0 Mon Sep 17 00:00:00 2001 From: Herve Labas Date: Mon, 27 Jul 2026 15:53:28 +0200 Subject: [PATCH] docs(api-checks): clarify binary response handling --- .../api-checks/configuration.mdx | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/detect/synthetic-monitoring/api-checks/configuration.mdx b/detect/synthetic-monitoring/api-checks/configuration.mdx index 2d0a705c..64e5dee4 100644 --- a/detect/synthetic-monitoring/api-checks/configuration.mdx +++ b/detect/synthetic-monitoring/api-checks/configuration.mdx @@ -182,10 +182,9 @@ For more details, see our documentation on [Assertions](/detect/assertions). ## Responses -In almost all cases, you have full access to the HTTP response for assertions. We also store the full response -for later retrieval and triaging issues. - -Response bodies are limited to a size of 25MB. Responses over this size will trigger a check failure. +In almost all cases, you have access to the HTTP response for assertions. Checkly reads up to 25MB of the response +body. For larger responses, only the first 25MB is available to assertions and teardown scripts. The response body +stored with the result can be truncated further to fit result-size limits. Additionally, if your API responds with a binary type body, i.e. a PDF or video file, we scrub the body and replace it with a short text saying that we scrubbed it. We determine the body content type by looking at the `Content-Type` @@ -217,11 +216,14 @@ This list shows all content types that we scrub from the response data. ### Asserting on binary response bodies -Adding a **Text body** assertion to a check opts it out of binary scrubbing entirely: the assertion runs against -the real response bytes, and the stored result displays those same bytes instead of the scrubbed message. This is -useful when a server labels a textual payload with a binary content type, such as `application/octet-stream`. The -assertion's *Actual* value is truncated to 10KB for display, and stored response bodies remain subject to the size -limits above. Checks without a Text body assertion keep the scrubbing behavior described in this section. +Adding a **Text body** assertion disables binary scrubbing for the entire check. The assertion, teardown scripts, +and stored result receive the response body instead of the scrubbed message. Use this when a server labels a textual +payload with a binary content type, such as `application/octet-stream`. This does not decode binary formats such as +PDF, ZIP, audio, or video files. + +The assertion evaluates the response body up to the 25MB limit above. Its *Actual* value is truncated to 10KB for +display, and the stored response body remains subject to result-size limits. Checks without a Text body assertion +keep the scrubbing behavior described in this section. ## Additional Settings