Save a provider's keys, or turn it on or off (instance admin)
keys sets each named key (null removes it); keys left out are kept. The new keys are
checked with the provider's own rules before anything is stored (422 with the reason when
they are refused), then sealed with OHS_ENCRYPTION_KEY and applied by every process
within 30 seconds. While any of the provider's OHS_ environment variables is set, its keys
come from there and keys is refused (409); enabled still applies. Recorded in the audit
log as config.write.
tenantKeyAuthorizationBearer <token>Tenant API key, ohs_sk_ + 43 base62 characters.
provider*stringConnector slug, see GET /v1/providers.
application/json- body
keys?Key name to its new value; null removes the key.
enabled?booleanThe provider after the change.
application/json- response
slug*stringname*stringkinds*array<>status*stringactive runs; off was turned off; not_configured lacks a required key; error has
keys the provider's rules refuse (see error); built_in needs no key and is always on.
"active""off""not_configured""error""built_in"enabled*booleansource*|Where the keys come from. Environment variables win over the console as a whole.
"env""console"nullkeys*array<>error*string|nullurls*The addresses to register in the provider's developer portal.
updated_at*|date-timeupdated_by*|The id of the API key that saved the last change.
curl -X PATCH 'http://localhost:8080/v1/admin/providers/withings' \ -H 'Authorization: Bearer ohs_sk_...' \ -H 'Content-Type: application/json' \ -d '{}'{ "slug": "string", "name": "string", "kinds": [ "oauth" ], "status": "active", "enabled": true, "source": "env", "keys": [ { "name": "CLIENT_ID", "env": "OHS_OURA_CLIENT_ID", "required": true, "secret": true, "set": true, "value": "string" } ], "error": "string", "urls": { "redirect": "string", "inbound": "string" }, "updated_at": "2019-08-24T14:15:22Z", "updated_by": "string"}