Harthelm Docs

Create an organization

Cluster admins only (`platform.admin`). The caller becomes the organization's owner, or the existing user named as `owner` does; more owners and members join by invitation or `POST /orgs/{org}/members`. 409 `name-taken` when an organization of that name exists (names compare case-insensitively).

Generated from openapi/harthelm.yaml at v1.5.0
POST
/orgs

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.

Header Parameters

Idempotency-Key?string

Client-chosen key (at most 255 characters); a repeated key returns the first result for 24 h.

Length1 <= length <= 255

Request Body

application/json
  1. body
name*TenantName

1 to 64 characters without leading or trailing spaces; unique case-insensitively.

Match^\S(.*\S)?$
Length1 <= length <= 64
owner?ID

The user who becomes the organization's first owner; absent: the caller. 422 at /owner when there is no such user or the account is disabled.

Formatint64
Range1 <= value

Response Body

The organization.

application/json
  1. response
id*string
Formatuuid
name*string
role?OrgRole

The caller's role; absent when a cluster admin sees an organization they are not a member of.

Value in"owner""member"
created_at*string
Formatdate-time
deleting?boolean

The organization is being deleted; it takes no writes. Absent for an older core.

delete_operation_id?string

The org.delete operation of a deleting organization.

Formatuuid
permissions?array<>

The caller's permissions on the resource; the UI shows only what they allow. Absent for an older core.

curl -X POST 'https://console.example.com/api/v1/orgs' \  -H 'Content-Type: application/json' \  -d '{  "name": "string"}'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "name": "string",  "role": "owner",  "created_at": "2019-08-24T14:15:22Z",  "deleting": true,  "delete_operation_id": "2a58cc5e-4ba9-418a-8f8b-9007f099696a",  "permissions": [    "string"  ]}

Get a long-running operation

The state of an action that outlives its request (a `202` answer names it in `Location`). It ends in `succeeded` or `failed` and stays readable for 7 days. Its creator and everyone with `team.view` on its team can read it; for anyone else it does not exist (404).

Delete an organization

Organization owners and cluster admins (`org.manage`). Asynchronous and resumable, like a team's deletion: the organization turns `deleting` at once (it takes no writes: 409 `org-deleting`; its teams answer 409 `team-deleting`), and the operation `org.delete` (target `/orgs/<id>`) deletes each of its teams with the team cascade (workspaces purged at once, managed services, registries, domains, git access defaults, shared vaults, namespace), then the organization with its memberships and invitations. Audit rows stay. Every member loses access when the deletion starts. Deleting a deleting organization returns its operation. The console asks to type the organization's name first. The installation's default organization (`tenancy.defaultOrg`) can be deleted too; core creates it again, empty, at its next start. When a team's deletion gives up, the operation fails with the problem `org-delete-failed`, whose `failed_team` names the team and why; the organization stays `deleting` and nothing polls any more. Deleting it again is the *Retry*: it answers a new `org.delete` operation (`Org.delete_operation_id` changes), restarts the failed team deletions (each with a new `team.delete` operation) and resumes the organization's.