How to test oxtrust api - GluuFederation/oxTrust GitHub Wiki
Oxtrust Api
The oxtrust api is design to provide an easy, intuitive way to consume gluu server feature. Hence it is intented to cover all current oxTrust Admin Ui feature.
Prerequisis
- A running gluu server(mainly 3.1.3 at the time of writing)
- A tool to make Api calls(postman or you favorite tool)
Steps require
Preparation
- Clone the oxTrust project here.
#git clone https://github.com/GluuFederation/oxTrust.git - Change into oxTrust directory
- From master create new branch named oxtrust_api
#git checkout -b oxtrust_api - Build the war
mvn clean package -Dmaven.test.skip=true - Copy the generated war inside gluu container
- Replace the existing identity.war file with the generated one
- Restart identity service
Testing
We are going to test the Api Groups features in this demo
The end points are:
- GET https://hostname/identity/restv1/api/groups : List of groups
- GET https://hostname/identity/restv1/api/groups/{groupInum}/members: List groups members
- DELETE https://hostname/identity/restv1/api/groups/{groupInum}: Delete a group
- POST https://hostname/identity/restv1/api/groups/{groupInum}/members/{userInum}: Add an existing user to group
- DELETE https://hostname/identity/restv1/api/groups/{groupInum}/members/{userInum}: Remove an existing user from group
- GET https://hostname/identity/restv1/api/groups/search?pattern={*}&size={1} : Search groups
- GET https://hostname/identity/restv1/api/groups/{groupInum}: Get a group detail
You can made more request on you want. The documentation for all available endpoint is not ready. Will be soon.