Create an API key for a user.
Changed onMints a key for the named user with the scopes given in the body, and returns its value once: only the hash is stored, so the response is the one chance to capture it. The scopes must be a subset of those the calling key holds, so this cannot be used to widen access beyond the credential making the request. Requires an administrator as well as the scope. A key for another user who already has, or has had, a key (including a session key) also requires ADMIN_CROSS_USER_ACCESS_ENABLED, and is recorded as admin_cross_user_access as well; without it an administrator can create only a user's first key, to provision them. Recorded as an api_key_created audit event naming the calling user and API key. Requires the api-keys:write scope.
Request
- Base URL/ (relative, and the document was published on a file host, not at the API’s origin)
- URL/api/users/{username}/api-keys
- AuthHTTP bearer
Path parameters
Headers
Request body
Response
The key was created. The value is returned here and nowhere else.
Changes
- info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status
- info
- breaking
removed the media type
*/*for the response with the status - breaking
removed the media type
*/*for the response with the status - breaking
removed the media type
*/*for the response with the status - breaking
removed the media type
*/*for the response with the status - breaking
removed the media type
*/*for the response with the status - breaking
removed the media type
*/*for the response with the status - info
added the media type
application/jsonfor the response with the status - info
added the media type
application/jsonfor the response with the status - info
added the media type
application/jsonfor the response with the status - info
added the media type
application/jsonfor the response with the status - info
added the media type
application/jsonfor the response with the status - info
added the media type
application/jsonfor the response with the status
- breaking