Apps and sources
Preview

Add custom health checks

Adds every check in the request, or none.

POST
/health-checks
cookiebetter-auth.session_token<token>

Better Auth session cookie. Production uses the __Secure- prefixed name.

Idempotency-Key?string

Makes retries safe. A repeated key with the same request returns the first result and sets Idempotent-Replayed: true. The same key with a different request answers 409 idempotency.key_reused, and while the first request is still running 409 idempotency.in_progress. Results are kept for 24 hours. Server errors and refusals for lack of sign-in or permission are not kept, so a retry runs again.

Match^[A-Za-z0-9_.:-]+$
Length1 <= length <= 255
application/json
  1. body
checks*array<>
Items1 <= items <= 200

Response Body

The checks as saved.

application/json
  1. response
items*array<>
Example Request
curl -X POST 'https://wardn.example.com/api/v1/health-checks' \  -H 'Content-Type: application/json' \  -d '{  "checks": [    {      "name": "string",      "rule": {        "kind": "string",        "language": "cel"      },      "allApps": true    }  ]}'
Example Response
{  "items": [    {      "name": "string",      "rule": {        "group": "string",        "kind": "string",        "language": "cel",        "healthy": "string",        "progressing": "string",        "failed": "string",        "message": "string",        "script": "string"      },      "allApps": true,      "appIds": [        "507005c2-bda5-4651-98c0-390a3efeade9"      ],      "source": "written",      "note": "string",      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "createdBy": "string",      "createdAt": "2019-08-24T14:15:22Z",      "updatedAt": "2019-08-24T14:15:22Z"    }  ]}