Releasesv0.1.0
Connections

Disconnect a provider

DELETE
/v1/users/{id}/connections/{provider}

Revokes the provider grant (best effort) and stops pulling. By default the data already collected is kept (204).

With delete_data=true the user's data from this provider is erased too: the disconnect happens at once, then a background job deletes every record, raw file and sync record of this user and provider (the user and their other providers stay). The answer is 202 with the job_id to poll at GET /v1/deletions/{job_id}; asking again while it runs returns the same job. Until it is done the provider cannot be connected again and its uploads are refused. The data.erased webhook announces the end.

Authorization

tenantKey
headerAuthorizationBearer <token>

Tenant API key, ohs_sk_ + 43 base62 characters.

Path Parameters

id*string
Formatuuid
provider*string

Connector slug, see GET /v1/providers.

Query Parameters

delete_data?boolean

true also erases the data the user holds from this provider.

Defaultfalse

Header Parameters

Authorization*string

The tenant API key, as a bearer secret.

Response Body

Disconnected, and the erasure of the provider's data accepted.

application/json
  1. response
job_id*string
Formatuuid
curl -X DELETE 'http://localhost:8080/v1/users/497f6eca-6276-4993-bfeb-53cbbbba6f08/connections/withings' \  -H 'Authorization: Bearer ohs_sk_...'
{  "job_id": "453bd7d7-5355-4d6d-a38e-d9e7eb218c3f"}
Edit on GitHub