Access Key Create
Create a new access key for the authenticated account. Access keys are used to authenticate API requests on behalf of the account in a more granular and service-friendly way than a session cookie. Access keys share the same roles and permissions as the owning account and only provide a way to use an `Authorization` header as an way of interacting with the Storyden API. Access keys also allow an expiry date to be set to limit how long a key can be used to authenticate against the API.
Create a new access key for the authenticated account. Access keys are used to authenticate API requests on behalf of the account in a more granular and service-friendly way than a session cookie.
Access keys share the same roles and permissions as the owning account
and only provide a way to use an Authorization header as an way of
interacting with the Storyden API.
Access keys also allow an expiry date to be set to limit how long a key can be used to authenticate against the API.
browserstoryden-session<token>application/json- body
name*stringThe name of the access key.
expires_at?stringWhen the access key expires, if null, it never expires.
date-timeOK
application/json- response
An access key issued to an account, this is the full access key object including the secret. This is only exposed upon creation of the key and the secret value is never stored. The caller that receives this object is responsible for securely storing the secret value for later use.
id*IdentifierA unique identifier for this resource.
xidcreatedAt*stringThe time the resource was created.
date-timeupdatedAt*stringThe time the resource was updated.
date-timedeletedAt?stringThe time the resource was soft-deleted.
date-timemisc?Arbitrary extra data stored with the resource.
name*stringThe name of the access key.
enabled*booleanexpires_at?stringWhen the access key expires, if null, it never expires.
date-timesecret*stringThe secret key used to authenticate with the API.
Keys are prefixed with a kind identifier, "sdpak" refers to a Storyden Personal Access Key and "sdbak" refers to a Storyden Bot Access Key. The two kinds are not interchangeable however they do not have behavioural differences and is merely a visual cue.
curl -X POST 'https://example.com/api/auth/access-keys' \ -H 'Content-Type: application/json' \ -d '{ "name": "string"}'{ "id": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "deletedAt": "2019-08-24T14:15:22Z", "misc": {}, "name": "string", "enabled": true, "expires_at": "2019-08-24T14:15:22Z", "secret": "string"}Role Update Order PATCH
Update the global ordering of custom roles. The request body must include every non-default role identifier exactly once in the desired order of precedence.
Access Key Delete DELETE
Revoke an access key. This will immediately invalidate the key and it will no longer be usable for authentication.