Skip to content

Assert message count matches constraints​

GET
/api/v1/assert/count

Returns 200 OK when the number of messages matching the given filters satisfies the min/max bounds. Returns 417 Expectation Failed otherwise. Designed for use in CI pipelines with curl -f. min defaults to 1 and max to no upper bound, so a bare call asserts that at least one message matches; pass min=0 to only read the count. The filters combine with AND.

Parameters​

Query Parameters

min

Minimum number of matching messages (inclusive)

Type
integer
Default
1
max

Maximum number of matching messages (inclusive). Unbounded when omitted.

Type
integer
Format
"int64"
subject

Filter by subject substring, case-insensitive. % and _ match themselves, not as wildcards.

Type
string
sender

Filter by sender address substring, case-insensitive. % and _ match themselves, not as wildcards.

Type
string
recipient

Filter by recipient address substring, case-insensitive. % and _ match themselves, not as wildcards.

Type
string

Responses​

Assertion passed

application/json
JSON
{
  
"ok": true,
  
"count": 2,
  
"expected_min": 1,
  
"expected_max": 9223372036854776000
}

Samples​

Powered by VitePress OpenAPI

Released under the MIT / Apache 2.0 License.