Apps and sources
Preview

Set whether an app can get a deployment for a pull request

Recorded in Activity as `app.previews_updated`.

PUT
/apps/{appId}/previews
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
enabled*boolean
port?integer
Range0 <= value <= 65535
Default0
path?string
Lengthlength <= 200
Default"/"

Response Body

The app's settings now.

application/json
  1. response
enabled*boolean

Whether the app can get a deployment for a pull request, and so an address on its cluster.

port*integer

The port of the app's Service the Ingress sends to. 0 picks the port named http, else the first.

path*string

The path the app takes traffic on.

Example Request
curl -X PUT 'https://wardn.example.com/api/v1/apps/497f6eca-6276-4993-bfeb-53cbbbba6f08/previews' \  -H 'Content-Type: application/json' \  -d '{  "enabled": true}'
Example Response
{  "enabled": true,  "port": 0,  "path": "string"}