Apps and sources
Preview

Turn one of an app's health checks on or off

Applies in every deployment of the app. The key is a built-in check's name, `lib:<id>` for a custom check of the organization, or `app:<id>` for the app's own.

PUT
/apps/{appId}/health/switches
cookiebetter-auth.session_token<token>

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

appId*string
Formatuuid
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
key*string
on*boolean

Response Body

The app's health checks after the change.

application/json
  1. response
appId*string
Formatuuid
appName*string
deploymentId?string

The deployment the results are read in, when one was asked for.

Formatuuid
deploymentCount*integer

How many deployments run the app.

checks*array<>
watch?

How long a deployment's health is watched after a release or a sync, and what a failure does.

others*array<>

The other deployments of the app, each with how it watches after a release.

Example Request
curl -X PUT 'https://wardn.example.com/api/v1/apps/497f6eca-6276-4993-bfeb-53cbbbba6f08/health/switches' \  -H 'Content-Type: application/json' \  -d '{  "key": "string",  "on": true}'
Example Response
{  "appId": "28c365d5-df94-4a54-8217-3ce51d068868",  "appName": "string",  "deploymentId": "a73c85a1-d857-491e-a6b2-51dce05de7a2",  "deploymentCount": 0,  "checks": [    {      "key": "string",      "name": "string",      "healthyWhen": "string",      "from": "builtin",      "fromLabel": "string",      "libraryId": "6780430a-772c-4fd6-a7b1-5dc852e6898f",      "appCheckId": "e66fc7a5-fedc-4531-843a-44e8eb5cd203",      "enabled": true,      "outcome": "healthy",      "message": "string",      "objects": 0    }  ],  "watch": {    "seconds": 0,    "secondsFrom": "stage",    "onFail": "pause",    "onFailFrom": "stage",    "stage": "string"  },  "others": [    {      "deploymentId": "a73c85a1-d857-491e-a6b2-51dce05de7a2",      "name": "string",      "environment": "string",      "health": "healthy",      "watch": {        "seconds": 0,        "secondsFrom": "stage",        "onFail": "pause",        "onFailFrom": "stage",        "stage": "string"      }    }  ]}