
MR555629 asked a question.
How to list users by Org# and contains the 'principal_uid' field
Step 1. I use API ( POST https://us-4.rightscale.com/api/users ) to create a user.
Step 2. I use API ( POST https://governance.rightscale.com/grs/orgs/ 28039/users ) to add a user into an org.
Step 3. I use API ( GET https://governance.rightscale.com /grs/orgs/28039/users ) to list all users in an org.
In Step 3, but I did not find the 'principal_uid' field in the JSON response.
If I use GET https://us-4.rightscale.com/api/users to list users, the result only includes my enterprise org's users.
Note: My enterprise Org is 27845,My customer-org is 28039.
So, how to list users by Customer-Org and contains the 'principal_uid' field?
Thanks.
- create sso user@idpHref = /api/identity_providers/123 @synnex_local_user_id = 12345 @name createUserPOST https://us-4.rightscale.com/api/usersContent-Type: application/jsonX-Api-Version: 1.5Authorization: Bearer {{access_token}}{ "user":{ "email":"mason-test@company.com", "company":"Company name", "first_name":"Mason", "last_name":"Rao", "phone":"123456789","identity_provider_href": "{{idpHref}}","principal_uid": "{{synnex_local_user_id}}" }}// 添加成功后,在Response.Headers["Location"] 获得当前添加的user_id
- add user to a org@user_id = 126549POST https://governance.rightscale.com/grs/orgs/{{org_id}}/usersContent-Type: application/jsonX-Api-Version: 2.0Authorization: Bearer {{access_token}}{ "id": "{{user_id}}", "kind": "user"}
- list all users in an orgGET https://governance.rightscale.com/grs/orgs/{{org_id}}/usersX-Api-Version: 2.0Authorization: Bearer {{access_token}}
Hello, currently the response for Users.show does not include the principal_uid field, so there is no way to show that value today in the API. https://reference.rightscale.com/api1.5/resources/ResourceUsers.htmlshow
If that is important to you, please describe your use case in detail (a private message can be used if needed) and we can document it as a feature request.
Thanks.