Apps and sources
Preview

Create a source

Only the record of where manifests come from. Credentials are the name of a secret in the secret store, never the secret itself.

POST
/sources
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
kind*SourceKind
Value in"git""oci"
url*string

A git URL (https://host/repo, ssh://host/repo or user@host:repo) or an OCI reference (oci://host/path). It never holds a password.

Length1 <= length <= 2048
path?string
Lengthlength <= 512
Default""
credentialsRef?string

The name of a secret in the secret store, a GitHub App installation (github-app:<installation id>), or a git host connection (githost:<connection id>, from connectGitHost).

Lengthlength <= 256
Default""

Response Body

The created source.

application/json
  1. response
id*string
Formatuuid
name*string
kind*SourceKind
Value in"git""oci"
url*string

The repository URL, or the OCI reference.

path*string

The directory inside the repository that holds the manifests. Empty for the root, and for OCI.

credentialsRef*string

The name of the secret in the secret store that holds the credentials. Empty for none.

createdAt*string
Formatdate-time
updatedAt*string
Formatdate-time
Example Request
curl -X POST 'https://wardn.example.com/api/v1/sources' \  -H 'Content-Type: application/json' \  -d '{  "name": "string",  "kind": "git",  "url": "string"}'
Example Response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "name": "string",  "kind": "git",  "url": "string",  "path": "string",  "credentialsRef": "string",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}