Admin Create Access Token
Changed onAdmin API to create an access token for a specific user.
This endpoint allows administrators to create an access token on behalf of any user in the system.
If roles are specified, all specified roles must be assigned to the target user. If any role is not assigned to the user, the request fails and no token is created. If no roles are specified, the access token inherits all of the target user's current roles from the user_roles table.
Args: user_id: The user ID to create the token for token_name: Name for the access token expires_at: Expiration date in YYYY-MM-DD format description: Optional description for the token roles: Optional list of roles to assign (must all be assigned to user) admin_user: Authenticated admin user making the request
Returns: The generated access token string
Request
- The document declares no server URL.
- Auth: none declared
Path parameters
Query parameters
Headers
Response
Successful Response
Changes
- ○
added the optional property
//to the response with the status - ○
added the optional property
//to the response with the status
- ○
- ○
headerrequest parameterx-osmo-userlist-of-types was widened by adding typesnull - ○
queryrequest parameterroleslist-of-types was widened by adding typesnull - ○
for the
headerrequest parameterx-osmo-user, the type was generalized fromstringto no type - ○
for the
queryrequest parameterroles, the type was generalized fromarrayto no type
- ○