Set what a git host connection covers and posts
Replaces which repositories the connection covers (none means all), what Wardn writes back to the host (the `wardn/sync` and `wardn/release` commit statuses, the pull or merge request comment and the preview link in it), for which environments, and whether the connection is paused. A paused connecti
better-auth.session_token<token>Better Auth session cookie. Production uses the __Secure- prefixed name.
connectionId*stringuuidIdempotency-Key?stringMakes 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.
^[A-Za-z0-9_.:-]+$1 <= length <= 255application/json- body
paused*booleanprojects*array<>items <= 500posts*What Wardn writes back to the host, each on or off.
The connection with its new settings.
application/json- response
id*stringuuidkind*GitHostKindThe git host. gitlab is gitlab.com or a self-managed GitLab; bitbucket is Bitbucket Cloud (Data Center is not supported); azure-devops is Azure DevOps Services, or Azure DevOps Server at its own address; github-enterprise is GitHub Enterprise Server at its own address (github.com is connected as a GitHub App); gitea is Gitea or Forgejo at its own address.
"gitlab""bitbucket""azure-devops""github-enterprise""gitea"name*stringbaseUrl*stringauth*GitHostAuthtoken is an access token: a GitLab personal, project or group access token (scopes api, or read_api plus read_repository when no status or comment is wanted); a Bitbucket repository, project or workspace access token; an Azure DevOps personal access token (Code read and status, Pull request threads read and write). basic is a Bitbucket app password or API token with the account's user name.
"token""basic"username?stringcredentialsRef*stringWhat a source's credentialsRef is set to, to read through this connection.
webhookPath*stringThe path, under this server's public address, the host's webhook is set up to call.
webhookHint?stringThe last four characters of the webhook's signing secret, for showing it masked.
hasPrivateCa?booleanWhether the connection trusts a private certificate authority of its own.
paused?booleanprojects?array<string>The repositories the connection covers, as paths on the host; empty means all.
posts?What Wardn writes back to the host, each on or off.
webhookSecret?stringThe secret the host's webhook is set up with: GitLab's secret token, Bitbucket's webhook secret, or the password of an Azure DevOps service hook's basic authentication (any user name). Present only in the answer that made the connection; keep it, it is not shown again.
lastDeliveryAt?|date-timecreatedAt*stringdate-timeupdatedAt*stringdate-timecurl -X PUT 'https://wardn.example.com/api/v1/git-hosts/497f6eca-6276-4993-bfeb-53cbbbba6f08/settings' \ -H 'Content-Type: application/json' \ -d '{ "paused": true, "projects": [ "string" ], "posts": { "syncStatus": true, "releaseStatus": true, "comment": true, "previewLink": true, "environments": [ "string" ] }}'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "kind": "gitlab", "name": "string", "baseUrl": "string", "auth": "token", "username": "string", "credentialsRef": "githost:0193a3f1-7e5c-7b6a-9f00-000000000001", "webhookPath": "string", "webhookHint": "string", "hasPrivateCa": true, "paused": true, "projects": [ "string" ], "posts": { "syncStatus": true, "releaseStatus": true, "comment": true, "previewLink": true, "environments": [ "string" ] }, "webhookSecret": "string", "lastDeliveryAt": "2019-08-24T14:15:22Z", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z"}Disconnect a git host DELETE
Removes the connection, its webhook address and its secrets. Sources that read through it fail to read until they name another credential. Disconnecting what is not connected changes nothing.
Make a new webhook signing secret POST
Makes a new secret and returns it once. The host's webhook is not believed until the new secret is pasted into it. This answer is never replayed for an `Idempotency-Key`, since it carries a new secret.