Releasesv0.1.0
Api referenceEndpointsAdmin

Create a link to the hosted connection page (instance admin, one tenant)

POST
/v1/admin/tenants/{tenant_id}/users/{id}/connect-sessions

POST /v1/users/{id}/connect-sessions (createConnectSession) for the tenant of tenant_id, run with an instance admin key: the same body, parameters and answer as the tenant's own key gets; a Location points at the admin route. Recorded in the caller's audit log and, actor admin, in the tenant's. 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
id*string
Formatuuid

Header Parameters

Authorization*string

The tenant API key, as a bearer secret.

Request Body

application/json
  1. body
redirect_uri?string

Where the user lands after each consent. Absolute https URL (http only for localhost).

Formaturi
Lengthlength <= 2048
providers?array<string>

Provider slugs the page offers, in this order. Each must be an OAuth provider enabled on this instance. Default, every one.

Itemsitems <= 64
app_name?string

Shown as the page title.

Lengthlength <= 80
logo_url?string

An https image shown above the title.

Formaturi
Lengthlength <= 2048
ttl_seconds?integer
Range60 <= value <= 3600
Default1800

Response Body

The page link.

application/json
  1. response
url*string

<OHS_PUBLIC_URL>/connect?session=<token>

Formaturi
expires_at*string
Formatdate-time
curl -X POST 'http://localhost:8080/v1/admin/tenants/497f6eca-6276-4993-bfeb-53cbbbba6f08/users/497f6eca-6276-4993-bfeb-53cbbbba6f08/connect-sessions' \  -H 'Authorization: Bearer ohs_sk_...' \  -H 'Content-Type: application/json' \  -d '{}'
{  "url": "http://example.com",  "expires_at": "2019-08-24T14:15:22Z"}
Edit on GitHub