Update Roles

Assign and unassign a User's roles.

Request

This endpoint behaves as a patch. Only roles explicitly specified in the request are assigned or unassigned. Existing role assignments that aren't mentioned remain unchanged. For example, to give a user more roles without removing any of their current assignments, simply pass an array with the new role IDs to assigned_role_ids and leave out the unassigned_role_ids field.

curl https://api.warpstream.com/api/v1/users/update_roles \
-H 'warpstream-api-key: aks_[account_key_secret]' \
-H 'Content-Type: application/json' \
-d '{
       "user_id": "ui_68fcab7a_761b_4ccc_98a2_48d1e8e989eb",
       "assigned_role_ids": ["pri_dfe63d95_c10c_4924_bdfe_ce518fc33095"],
       "unassigned_role_ids": ["pri_9d58f850_a3be_482f_8a1f_b0eb39d4d46c"]
    }'

Response

{}

Last updated

Was this helpful?