Auth API

Admin Create Access Token

Changed on

Admin 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

post/api/auth/user/{user_id}/access_token/{token_name}

Request

  • The document declares no server URL.
  • Auth: none declared

Path parameters

user_idstring required
token_namestring required

Query parameters

expires_atstring required
descriptionstring
rolesstring[] nullable

Headers

x-osmo-userstring nullable

Response

Successful Response

string required

Changes

    • ○

      added the optional property // to the response with the status

    • ○

      added the optional property // to the response with the status

    • ○

      header request parameter x-osmo-user list-of-types was widened by adding types null

    • ○

      query request parameter roles list-of-types was widened by adding types null

    • ○

      for the header request parameter x-osmo-user, the type was generalized from string to no type

    • ○

      for the query request parameter roles, the type was generalized from array to no type