Apps and sources
Preview

Create an app

The caller becomes the app's owner.

POST
/apps
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
name*string
Length1 <= length <= 63
description?string
Lengthlength <= 500
Default""
sourceId*string
Formatuuid
renderType*RenderType
Value in"helm""kustomize""plain"
defaultValues?

Settings for the render, as plain data.

services?array<>
Itemsitems <= 50
teamId?string

The team that owns the app. Its members read the app and its deployments. Setting it takes reading the team. On create, absent means no team; on update, absent or null keeps the app's team and an empty string takes the app out of it.

Response Body

The created app.

application/json
  1. response
id*string
Formatuuid
name*string
description*string
sourceId*string
Formatuuid
sourceName*string
sourceKind*SourceKind
Value in"git""oci"
renderType*RenderType
Value in"helm""kustomize""plain"
defaultValues*

Settings for the render, as plain data.

services*array<>
owners*array<string>

User ids of the app's owners, oldest first.

teamId?string

The team that owns the app, or null for none. Members of the team read the app and its deployments (ADR 0003); an app with no team is reached only through grants and ownership.

deploymentCount*integer

Deployments that hold the app. A caller who reads the app reads each of them.

createdAt*string
Formatdate-time
updatedAt*string
Formatdate-time
Example Request
curl -X POST 'https://wardn.example.com/api/v1/apps' \  -H 'Content-Type: application/json' \  -d '{  "name": "string",  "sourceId": "797f5a94-3689-4ac8-82fd-d749511ea2b2",  "renderType": "helm"}'
Example Response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "name": "string",  "description": "string",  "sourceId": "797f5a94-3689-4ac8-82fd-d749511ea2b2",  "sourceName": "string",  "sourceKind": "git",  "renderType": "helm",  "defaultValues": {},  "services": [    {      "name": "string",      "port": 1,      "protocol": "http"    }  ],  "owners": [    "string"  ],  "teamId": "string",  "deploymentCount": 0,  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}