Releasesv0.1.0
Api referenceEndpointsConsent

The user's consent per source and data category

GET
/v1/users/{id}/consents

Every source the user has recorded consent for, with the state of each data category, and the list of categories. A source with no consent recorded stores everything, unless the instance sets OHS_CONSENT_REQUIRED=true, where it stores nothing.

Authorization

tenantKey
headerAuthorizationBearer <token>

Tenant API key, ohs_sk_ + 43 base62 characters.

Path Parameters

id*string
Formatuuid

Header Parameters

Authorization*string

The tenant API key, as a bearer secret.

Response Body

Consent per source.

application/json
  1. response
data*array<>
categories*array<>
curl -X GET 'http://localhost:8080/v1/users/497f6eca-6276-4993-bfeb-53cbbbba6f08/consents' \  -H 'Authorization: Bearer ohs_sk_...'
{  "data": [    {      "provider": "string",      "categories": [        {          "category": "activity",          "granted": true,          "granted_at": "2019-08-24T14:15:22Z",          "revoked_at": "2019-08-24T14:15:22Z"        }      ],      "updated_at": "2019-08-24T14:15:22Z"    }  ],  "categories": [    "activity"  ]}
Edit on GitHub