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. If neither min nor max is provided, the assertion always passes and the response contains the raw count.

Parameters

Query Parameters

min

Minimum number of matching messages (inclusive)

Type
integer
Minimum
0
max

Maximum number of matching messages (inclusive)

Type
integer
Minimum
0
subject

Filter by subject substring (case-insensitive)

Type
string
sender

Filter by sender address substring (case-insensitive)

Type
string
recipient

Filter by recipient address substring (case-insensitive)

Type
string

Responses

Assertion passed

application/json
JSON
{
  
"ok": true,
  
"count": 2
}

Playground

Variables
Key
Value

Samples

Powered by VitePress OpenAPI

Released under the MIT / Apache 2.0 License.