Rotate secrets
Needs `team.managed_services`, for a bound instance also `landscape.manage` on its workspace (the values are revisions of its vault); the provider needs the `rotate` capability. Replaces the named secrets: `values` with the given values, `generate` with values the server generates (32 characters of letters and digits); a secret is in at most one of them. The values are never returned. For an instance bound to a landscape the new value is a new revision of the vault key its `harthelm.yml` references, so the next Sync keeps it; services that use `${{ services.<name>.dsn }}` or `.secret` roll with the new password without a Sync (one that names the vault key itself keeps its pinned revision until its next Sync). The status goes `updating` while the backend changes the password. 422 `update-constraint` at `/values/<k>` or `/generate/<i>` for a fixed secret, 422 for an unknown one or a value the schema refuses; 409 while the instance is paused or deleted.
openapi/harthelm.yaml at v1.5.0__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.
ms*stringA managed service's id.
uuidapplication/json- body
1 <= propertiesvalues?New values by secret name.
generate?array<string>Secrets whose new value the server generates.
The managed service, updating.
application/json- response
id*stringuuidteam_id*IDNumeric resource id.
int641 <= valueworkspace_id?IDNumeric resource id.
int641 <= valuename*ServiceNameValue^[a-z]([-a-z0-9]{0,30}[a-z0-9])?$provider*ProviderNameValue^[a-z][a-z0-9-]{0,62}$provider_version*ProviderVersionValue^[1-9][0-9]{0,5}$plan*stringThe provider plan's id; empty for a provider without plans.
resources*The plan's resource values with the instance's overrides (the provider's resources say what each one is).
config*The settings, defaults applied.
secrets*array<>details*What the backend reports (fields.details), e.g. host, port, database, user, a DSN with **** for the password, ready.
status*ManagedServiceStatuscreating,updating,pausing,unpausing,deleting: the backend works on a change;synchronized: it runs as asked;paused: data kept, no server (a torn-down landscape's database);deleted: a tombstone, listed withinclude_deleteduntil it is purged;unknown: the backend does not answer or does not report it; the details are the last known ones;invalid-provider: its provider version is gone or no longer accepts its settings.
"creating""updating""synchronized""pausing""paused""unpausing""deleting""deleted""unknown""invalid-provider"status_detail?stringThe backend's message when something failed, else empty.
paused*booleanAsked to be paused (status says where it is).
backups*booleanThe nightly backup dumps it.
public*booleanAsked for a public browser host (S3 only; 1.4): no sign-in, the store's public buckets readable by anyone. browser.public says whether the host is public now (the administrator may forbid public hosts).
browser?The instance's own host for browsers (1.4): RabbitMQ's management UI and HTTP API, or an S3 store's API (path-style, presigned URLs, public buckets). Absent for providers without one and while the installation has marketplace.browserHosts.enabled off. The console opens a gated host through /auth/managed/{ms}.
last_dump_at?stringWhen the newest successful dump finished; absent before the first.
date-timecreated_at*stringdate-timecreated_by?IDNumeric resource id.
int641 <= valueupdated_at*stringdate-timedeleted_at?stringdate-timepurge_after?stringTombstones, when the row goes for good.
date-timecurl -X POST 'https://console.example.com/api/v1/managed-services/497f6eca-6276-4993-bfeb-53cbbbba6f08/rotate' \ -H 'Content-Type: application/json' \ -d '{}'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "team_id": 1, "workspace_id": 1, "name": "string", "provider": "string", "provider_version": "string", "plan": "string", "resources": { "property1": 0, "property2": 0 }, "config": {}, "secrets": [ { "name": "string", "vault_key": "string", "revision": 1, "rotated_at": "2019-08-24T14:15:22Z" } ], "details": {}, "status": "creating", "status_detail": "string", "paused": true, "backups": true, "public": true, "browser": { "url": "http://example.com", "kind": "management", "public": true, "public_allowed": true, "sso": true }, "last_dump_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z", "created_by": 1, "updated_at": "2019-08-24T14:15:22Z", "deleted_at": "2019-08-24T14:15:22Z", "purge_after": "2019-08-24T14:15:22Z"}Publish a provider version
Cluster admins only (`platform.admin`). Creates or replaces the version the definition names (format `harthelm/provider-v2`, `schemas/provider.schema.json`; the format of 1.0 is still taken): 201 for a new version, 200 for a replaced one. The definition is checked against the schema and the rules it cannot express (unique plan ids, at most one default plan, every plan sets exactly the resource parameters within their bounds, defaults and enums valid, required names exist, secrets are strings, `connection` names existing properties, only `rest` backends and no `capabilities.backup`): 422 with pointers into `/definition`. Harthelm dumps only the databases of its built-in providers; a REST backend backs up its own instances. A version with instances keeps them; a change that no longer accepts an instance's settings shows as its status `invalid-provider`. 409 `provider-builtin` for the name of a built-in provider (the chart's `marketplace.builtin` values configure those). Audited as `provider.publish`.
Change a managed service
Needs `team.managed_services`, for a bound instance also `landscape.manage` on its workspace. Absent fields stay. `plan`, `resources` and `config` are checked like a create and against the change rules (`x-hart-change`: 422 `update-constraint` at the field); a change that asks for more storage than the instance's volume holds while its storage class has no `allowVolumeExpansion` is 422 `volume-cannot-grow` at `/plan` (or `/resources/<k>` when the request sets the storage), whose message names the class and the most the volume holds (1.3); `paused` needs the provider's `pause` capability (422 at `/paused`). The status goes `updating` (`pausing`, `unpausing`) and back to `synchronized`; some changes restart the server. `public` (1.4) switches an S3 store's browser host between gated and public at once, without a new generation or a restart: 422 at `/public` for a provider whose host cannot be public, 409 `public-hosts-disabled` while the installation forbids public hosts (`marketplace.browserHosts.allowPublic`); turning it off always works. An instance bound to a landscape takes only `backups` and `public` here (409 `managed-service-bound`: change `harthelm.yml` and Sync); a deleting or deleted one nothing (409 `managed-service-deleted`). Secrets change only through Rotate.