Releasesv0.1.0
Api referenceEndpointsAdmin

Remove a tenant's own keys for a provider (instance admin)

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

The tenant's new connections go back to the instance's keys (or the provider is no longer available to the tenant when the instance has none). Its connections made with the removed keys are set needs_reauth, with a connection.needs_reauth webhook event each, and the consents started with them are dropped; connecting the user again uses the keys in force then. 404 when the tenant has no keys for the provider. Recorded as tenant.provider_keys, like a change.

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 after the change (set false).

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 DELETE '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