Create an API token for a user
post
Authorizations
defguard_sessionstringRequired
Path parameters
usernamestringRequired
Name of the user.
Body
namestringRequired
Responses
201
API token created. Its value is returned only here.
application/json
objectOptional
400
Invalid token name.
application/json
401
Session is missing or invalid.
application/json
403
Requires admin privileges and an active enterprise license.
application/json
404
User not found.
application/json
500
Unable to create API token.
application/json
post/api/v1/user/{username}/api_token
Last updated
Was this helpful?