I'm writing Python script that assigns multiple roles to a user, but having difficulty understanding what the 'roles' data structure needs to look like. According to the REST documentation for authentication/users/{name}: To assign multiple roles, pass in each role using a separate roles parameter value. For example, -d roles="role1", -d roles="role2". In Postman, I can successfully construct a request with multiple 'roles' parameters to produce the result I want, which is to assign multiple roles to the user. In Python, my code looks like this: (response, content) = h.request(HOST + URL + OUTPUT_MODE, 'POST', headers=HEADERS, body=urllib.parse.urlencode({'roles':'admin','roles':'user'})) But the end result is that the user is only assigned the 'user' role, presumably because the 'body' data structure ends up being a dictionary with a single key: {'roles':'user'} Anybody know what is the right Python data structure to pass to urlencode so that I can add multiple roles to the user in a single POST?
... View more