Replace output assertions for a check
Replaces the complete set of output assertions for the check (replace-the-set semantics) — the request body is the new set in its entirety; assertions absent from the body are deleted.
Every assertion is validated before any write, using the exact evaluator that runs on every successful ping (the same validation everywhere): an uncompilable regexp, a matches pattern over 1000 bytes, a missing required field for the given kind, or a json_path containing [, * or $ all fail the request with 400 and nothing is written. The 400 message names the offending assertion by its name.
At most 20 assertions are allowed per check — the same cap applied to tags — because assertions are evaluated on every successful ping and an unbounded set is an unbounded per-ping cost. A request over the cap is rejected with 400 before any per-assertion validation runs.
Returns the resulting set (same shape as GET) on success.
Request
- Base URL: https://app.lastping.dev
- URL: https://app.lastping.dev/api/v1/checks/{id}/assertions
- Auth: API key in header X-Api-Key
Request body
Example request
{
"assertions": [
{
"name": "rows processed",
"value": "0",
"path": "result.rows_processed"
}
]
}Response
Resulting output assertions after applying the replace-the-set operation.
Example response
{
"assertions": [
{
"name": "rows processed",
"value": "0",
"path": "result.rows_processed"
}
]
}Changes
No recorded changes to this operation across all 2 revisions of this API.