Releasesv0.1.0
Api referenceEndpointsAdmin

A tenant's own keys for a provider, without their values (instance admin)

GET
/v1/admin/tenants/{tenant_id}/providers/{provider}/keys

Whether the tenant has keys of its own for the provider and how they stand. No value is ever served: client_id shows its first and last four characters only, and each key says whether it is set. 409 for a provider that takes no keys (a device source). Recorded as config.read. See docs/admin-api.md.

Authorization

tenantKey
headerAuthorizationBearer <token>

Tenant API key, ohs_sk_ + 43 base62 characters.

Path Parameters

tenant_id*string

The id of a tenant; any other value is a 404.

Formatuuid
provider*string

Connector slug, see GET /v1/providers.

Header Parameters

Authorization*string

The tenant API key, as a bearer secret.

Response Body

The tenant's keys for the provider.

application/json
  1. response
provider*string
set*boolean

True while the tenant has keys of its own for the provider.

status*string

active: the tenant's new connections use these keys. error: they do not run (they no longer open with the configured encryption keys, or the provider refused them, see error); the tenant cannot connect the provider until they are set again or removed. not_set: the tenant uses the instance's keys.

Value in"active""error""not_set"
error*string|null
client_id*|

The first and last four characters of CLIENT_ID, never all of it.

keys*array<>

Every key the provider takes. No value is ever served.

urls*

The addresses to register in the tenant's application at the provider: the instance's, the same for every tenant.

created_at*|
Formatdate-time
updated_at*|
Formatdate-time
updated_by*|

The id of the admin key that saved the keys.

reauth_required?integer

Only in the answers of PUT and DELETE: how many connections of the tenant the change set needs_reauth.

curl -X GET 'http://localhost:8080/v1/admin/tenants/497f6eca-6276-4993-bfeb-53cbbbba6f08/providers/withings/keys' \  -H 'Authorization: Bearer ohs_sk_...'
{  "provider": "withings",  "set": true,  "status": "active",  "error": "string",  "client_id": "abcd...wxyz",  "keys": [    {      "name": "CLIENT_SECRET",      "required": true,      "secret": true,      "set": true    }  ],  "urls": {    "redirect": "string",    "inbound": "string"  },  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z",  "updated_by": "string",  "reauth_required": 0}
Edit on GitHub