Harthelm Docs
REST APIManaged services

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`.

Generated from openapi/harthelm.yaml at v1.5.0
PUT
/providers/{name}

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

name*string

The provider's name; the definition's name must be the same.

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

Request Body

application/json
  1. body
definition*

A provider definition in the format harthelm/provider-v2 as published (schemas/provider.schema.json, which has the full rules); keys are the file's (camelCase). The console builds the create form from fields.config and fields.secrets (react-jsonschema-form) and the details drawer from fields.details. Publishing also takes the format of 1.0 (harthelm/provider-v1: configSchema, secretsSchema, detailsSchema, teamSingleton, x-update-constraint) and stores it as v2.

teams?array<>

Offer it only to these teams; absent offers it to every team.

Items1 <= items
enabled?boolean
Defaulttrue
backend_secret?string

REST providers: the bearer secret core sends to the backend (Authorization: Bearer <secret>), sealed in the database. Absent keeps the stored one; an empty string removes it.

Lengthlength <= 4096

Response Body

The replaced version.

application/json
  1. response
name*ProviderNameValue
Match^[a-z][a-z0-9-]{0,62}$
version*ProviderVersionValue
Match^[1-9][0-9]{0,5}$
source*ProviderSource

builtin: comes with the binary and the chart's marketplace.builtin values; api: published by a cluster admin.

Value in"builtin""api"
enabled*boolean

Offered for new instances; a disabled provider keeps its instances running.

available*boolean

The cluster has what the backend needs (the CNPG operator for the built-in PostgreSQL).

unavailable_reason?string

Why not, when available is false.

teams?array<>

The teams it is offered to; absent for every team.

backend_secret_set?boolean

A REST provider has a bearer secret (the secret itself is never returned).

definition*

A provider definition in the format harthelm/provider-v2 as published (schemas/provider.schema.json, which has the full rules); keys are the file's (camelCase). The console builds the create form from fields.config and fields.secrets (react-jsonschema-form) and the details drawer from fields.details. Publishing also takes the format of 1.0 (harthelm/provider-v1: configSchema, secretsSchema, detailsSchema, teamSingleton, x-update-constraint) and stores it as v2.

created_at*string
Formatdate-time
updated_at*string
Formatdate-time
curl -X PUT 'https://console.example.com/api/v1/providers/string' \  -H 'Content-Type: application/json' \  -d '{  "definition": {    "schema": "harthelm/provider-v2",    "name": "string",    "version": "string",    "displayName": "string",    "description": "string",    "fields": {      "config": {},      "secrets": {},      "details": {}    },    "backend": {}  }}'
{  "name": "string",  "version": "string",  "source": "builtin",  "enabled": true,  "available": true,  "unavailable_reason": "string",  "teams": [    1  ],  "backend_secret_set": true,  "definition": {    "schema": "harthelm/provider-v2",    "name": "string",    "version": "string",    "displayName": "string",    "description": "string",    "category": "string",    "author": "string",    "icon": "string",    "documentationUrl": "string",    "maturity": "ga",    "onePerTeam": true,    "labels": {      "property1": "string",      "property2": "string"    },    "capabilities": {      "pause": true,      "backup": true,      "rotate": true    },    "fields": {      "config": {},      "secrets": {},      "details": {}    },    "connection": {      "host": "string",      "port": "string",      "dsn": "string",      "secret": "string"    },    "resources": {      "property1": {        "kind": "cpu-millis",        "title": "string",        "description": "string",        "minimum": 0,        "maximum": 0,        "readOnly": true,        "x-hart-change": "grow-only"      },      "property2": {        "kind": "cpu-millis",        "title": "string",        "description": "string",        "minimum": 0,        "maximum": 0,        "readOnly": true,        "x-hart-change": "grow-only"      }    },    "plans": [      {        "id": "string",        "name": "string",        "description": "string",        "default": true,        "resources": {          "property1": 0,          "property2": 0        },        "parameters": {}      }    ],    "backend": {      "builtin": "string",      "rest": {        "url": "string",        "timeoutSeconds": 0      }    }  },  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}