Skip to content

How to test oxtrust api

gasmyr edited this page May 8, 2018 · 5 revisions

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

  1. A running gluu server(mainly 3.1.3 at the time of writing)
  2. A tool to make Api calls(postman or you favorite tool)

Steps require

Preparation

  1. Clone the oxTrust project here. #git clone https://github.com/GluuFederation/oxTrust.git
  2. Change into oxTrust directory
  3. From master create new branch named oxtrust_api #git checkout -b oxtrust_api
  4. Build the war mvn clean package -Dmaven.test.skip=true
  5. Copy the generated war inside gluu container
  6. Replace the existing identity.war file with the generated one
  7. Restart identity service

Testing

We are going to test the Api Groups features in this demo

The end points are:

  1. GET https://hostname/identity/restv1/api/groups : List of groups
  2. GET https://hostname/identity/restv1/api/groups/{groupInum}/members: List groups members
  3. DELETE https://hostname/identity/restv1/api/groups/{groupInum}: Delete a group
  4. POST https://hostname/identity/restv1/api/groups/{groupInum}/members/{userInum}: Add an existing user to group
  5. DELETE https://hostname/identity/restv1/api/groups/{groupInum}/members/{userInum}: Remove an existing user from group
  6. GET https://hostname/identity/restv1/api/groups/search?pattern={*}&size={1} : Search groups
  7. 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.