QuickBuild2 Documentation
|
Access membership by idSyntaxMembership can be accessed by id using http GET method through below url: http://localhost:8810/rest/membership?id=<membership id>
The response is of mime type application/xml and the content is xml representation of the membership. SecurityYou will need to use http BASIC authentication to login as authorized QuickBuild user if the anonymous does not have adminstrative rights. DemoBelow curl command demonstrates how to get membership of id 1: curl -u admin:admin http://localhost:8810/rest/membership?id=1
Access all memberships in the systemSyntaxMemberships in the system can be accessed using http GET method through below url: http://localhost:8810/rest/memberships
The response is of mime type application/xml and the content is xml representation of list of memberships in the system. SecurityYou will need to use http BASIC authentication to login as authorized QuickBuild user if the anonymous does not have adminstrative rights. DemoBelow curl command demonstrates how to get all memberships: curl -u admin:admin http://localhost:8810/rest/memberships
Access memberships of a particular userSyntaxMemberships of particular user can be accessed using http GET method through below url: http://localhost:8810/rest/memberships?user_id=<user id>
The response is of mime type application/xml and the content is xml representation of list of memberships of specified user. SecurityYou will need to use http BASIC authentication to login as authorized QuickBuild user if the anonymous does not have adminstrative rights. DemoBelow curl command demonstrates how to get memberships of user with id 2: curl -u admin:admin http://localhost:8810/rest/memberships?user_id=2
Access memberships of a particular groupSyntaxMemberships of particular group can be accessed using http GET method through below url: http://localhost:8810/rest/memberships?group_id=<user id>
The response is of mime type application/xml and the content is xml representation of list of memberships of specified group. SecurityYou will need to use http BASIC authentication to login as authorized QuickBuild user if the anonymous does not have adminstrative rights. DemoBelow curl command demonstrates how to get memberships of group with id 1: curl -u admin:admin http://localhost:8810/rest/memberships?group_id=1
Update membershipSyntaxMembership can be updated by posting xml representation of the membership to below url: http://localhost:8810/rest/membership
Normally you do not need to create the xml from scratch: you may retrieve xml representation of the membership using http GET method, modify certain parts of the xml and post back to above url. SecurityYou will need to use http BASIC authentication to login as administrator if the anonymous does not have administrative rights. DemoWe will use curl to demonstrate how to move user robin from developer group to tester group:
Create membershipSyntaxMembership can be created by posting xml representation of the membership to below url: http://localhost:8810/rest/membership
A sample membership xml representation is like below: <com.pmease.quickbuild.model.Membership> <!-- id of associated user of this membership. --> <user>2</user> <!-- id of associated group of this membership. --> <group>1</group> </com.pmease.quickbuild.model.Membership> The response is of mime type text/plain and the content is string representation of id of the newly created membership. SecurityYou will need to use http BASIC authentication to login as administrator if the anonymous does not have administrative rights. DemoWe will use curl to demonstrate how to add user robin (assume id is 2) to group tester (assume the id is 3).
Delete membershipSyntaxMembership can be deleted using http DELETE method through below url: http://localhost:8810/rest/membership?id=<membership id>
Here <membership id} stands for id of the membership to be deleted. SecurityYou will need to use http BASIC authentication to login as administrator if the anonymous does not have administrative rights. DemoBelow curl command demonstrates how to remove user robin (assume id is 2) from group tester (assume the id is 3).
|