Releasesv0.1.0
Api referenceEndpointsAdmin

Replace the signing secret (instance admin, one tenant)

POST
/v1/admin/tenants/{tenant_id}/webhooks/{webhook_id}/rotate-secret

POST /v1/webhooks/{webhook_id}/rotate-secret (rotateWebhookSecret) 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
webhook_id*string
Formatuuid

Header Parameters

Authorization*string

The tenant API key, as a bearer secret.

Response Body

The new secret.

application/json
  1. response
secret*string
curl -X POST 'http://localhost:8080/v1/admin/tenants/497f6eca-6276-4993-bfeb-53cbbbba6f08/webhooks/497f6eca-6276-4993-bfeb-53cbbbba6f08/rotate-secret' \  -H 'Authorization: Bearer ohs_sk_...'
{  "secret": "whsec_MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSw"}
Edit on GitHub