Harthelm Docs

Change one of the organization's Git providers

Organization owners (`org.manage`). Absent fields stay; `ca_pem: null` removes the CA. A `url` on another host needs `client_secret` again (422 at `/client_secret`): the stored secret only goes to the host it was entered for; a changed host also disconnects every member (their tokens belong to the old host), and the workspaces' IDE pods pick up the new URL like any other template change (`workspaces.upgradePolicy`). The same URL rules and 409s as the create.

Generated from openapi/harthelm.yaml at v1.6.1
PATCH
/orgs/{org}/git-providers/{id}

Authorization

cookie__Host-harthelm_session<token>

Browser session of the UI (12 h idle, 7 days absolute). State-changing requests also need the header Harthelm-CSRF: 1 and a matching Origin.

Path Parameters

org*string
Formatuuid
id*string

The provider's id in the organization (not its ref).

Match^[a-z][a-z0-9-]{0,21}$

Request Body

application/json
  1. body
Properties1 <= properties
name?string
Length1 <= length <= 64
url?string
Length9 <= length <= 255
client_id?string
Length1 <= length <= 255
client_secret?string
Formatpassword
Length1 <= length <= 4096
ca_pem?|

null removes the CA.

Lengthlength <= 65536

Response Body

The provider.

application/json
  1. response
id*OrgGitProviderID

A provider's id within its organization; its ref is <id>-<ref suffix>.

Match^[a-z][a-z0-9-]{0,21}$
ref*string

The provider id everywhere else (/auth/git/{ref}, GET /git/providers, git access, the proxy path).

Match^[a-z][a-z0-9-]{0,30}$
org_id*string
Formatuuid
kind*"gitea"
Value in"gitea"
name*string
url*string

Web URL of the provider (https).

client_id*string
client_secret_set*boolean

The OAuth client secret is stored (it is never returned).

ca_set*boolean

A CA (PEM) for the provider's HTTPS is stored.

redirect_uri*string

Register this at the provider's OAuth2 application.

created_by?

A user as member lists show them.

created_at*string
Formatdate-time
updated_at*string
Formatdate-time
retired_at?string

Only with include_retired, on a retired provider.

Formatdate-time
curl -X PATCH 'https://console.example.com/api/v1/orgs/497f6eca-6276-4993-bfeb-53cbbbba6f08/git-providers/string' \  -H 'Content-Type: application/json' \  -d '{}'
{  "id": "string",  "ref": "string",  "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",  "kind": "gitea",  "name": "string",  "url": "string",  "client_id": "string",  "client_secret_set": true,  "ca_set": true,  "redirect_uri": "string",  "created_by": {    "id": 1,    "name": "string",    "email": "string",    "picture_url": "string"  },  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z",  "retired_at": "2019-08-24T14:15:22Z"}