How to specify group for REST API Authorization when a user has multiple groups associated with it.
Issue
We have an account that has multiple groups assigned to it. When accessing the API we want to be able to select the group that the api call is made as. When I hit the /api endpoint here is the output:
"identity":
{
"userid": "p652900@test",
"name": "prasad mukhedkar",
"user_href": "https://cloudforms.example.com/api/users/1000000000035",
"group": "cfme_midr_user",
"group_href": "https://cloudforms.example.com/api/groups/1000000000022",
"role": "operator",
"role_href": "https://cloudforms.example.com/api/roles/1000000000018",
"tenant": "Project1",
"groups":
[
"a_cfme_test_users",
"a_cfme_midr_approver",
"a_cfme_test_approver",
"a_cfme_mgmt_users",
"a_cfme_midr_user"
]
As you can see it has chosen the a_cfme_midr_user group as my current group, this is the one i was last using in the browser. How do I for example change my group to a_cfme_test_users before or during my API call?
Environment
Red Hat Cloudforms 4.1
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
