cloudfoundry / cloudfoundry/cf-java-client
V3 API: How To Construct Query To List Roles Including User, Space Or Organization
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 334
- Forks
- 319
- PR merge metrics
- No merged PRs in 30d
Description
Given:
- I try to use v3 api to receive all space roles assignments.
- In v2 it was retrieved using this endpoint: https://apidocs.cloudfoundry.org/16.22.0/spaces/retrieving_the_roles_of_all_users_in_the_space.html
The response contains all the required info for the processing on our side:
-
list of roles (resources.entity.space_roles)
-
username (resources.entity.username)
-
In v3 I found that roles endpoint should be used: https://v3-apidocs.cloudfoundry.org/version/3.151.0/index.html#list-roles
-
It has Include parameter to get user, space, organization
-
org.cloudfoundry library version is 5.10.0.RELEASE
When:
- I try to construct request in Java library
Then:
- I don't see any option to specify include parameter
My query:
PaginationUtils.requestClientV3Resources(page -> getClient(hostName)
.rolesV3()
.list(ListRolesRequest.builder().spaceId(spaceId)
.types(RoleType.SPACE_AUDITOR, RoleType.SPACE_MANAGER, RoleType.SPACE_DEVELOPER)
.build()));
ListRolesRequest.builder() doen not provide any option to specify include parameter.
What did I do wrong ?
Could you please assist here ?
Thank you!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with rolesV3() and ListRolesRequest.builder(), then compare the Java client request model with the v3 API's list-roles include parameter. Confirm whether the request can represent user, space, and organization inclusion; done when the supported query can retrieve the required role and username information.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100