Legacy Dev Forum Posts

 View Only

Sign Up

Where are the User API {body} to PUT User Roles

  • 1.  Where are the User API {body} to PUT User Roles

    Posted 06-05-2025 18:11

    BrookmanCloudSvcs | 2016-10-20 17:50:33 UTC | #1

    /api/v2/users/{userId}/roles however the PUT to set user roles has a body that is empty. So how do we format the body to enable User Roles. The need is to automate an ad hoc user process and PUT of roles is required.{}


    tim.smith | 2016-10-20 17:59:36 UTC | #2

    Per PUT /api/v2/users/{userId}/roles, the body is a list of roles (role IDs). The possible roles on the system can be retrieved from GET /api/v2/authorization/roles.

    The request body for the PUT request should be formatted like this:

    [
      "ea12f474-82ab-4ec3-8310-81b2053d5334",
      "1557139e-6e23-478d-b9a2-d0e34a03f6be",
      "d3ae1f2d-5926-40b4-8a75-f440f252f2dd"
    ]

    BrookmanCloudSvcs | 2016-10-20 18:20:21 UTC | #3

    GET / api/v2/authorization/roles also does not have a body and if I am looking for general roles to assign to a new user, the result is 0 CORE wtih the following error. I agree this would be the API thanks!

    0 HTTP request was blocked by CORS. Inspect the browser network tab for more information.

    Cannot locate any information that would tell me why or what is blocking the information


    BrookmanCloudSvcs | 2016-10-20 18:28:12 UTC | #4

    Thank you. While the core blocked it. It appears as though it wanted a re-authentication and then it presented the roles. Thanks.


    system | 2017-08-28 19:28:04 UTC | #5


    This post was migrated from the old Developer Forum.

    ref: 524