QuickBuild2 Documentation
|
Get all users in the systemSyntaxUsers in the system can be accessed using http GET method through below url: http://localhost:8810/rest/users
The response is of mime type application/xml and the content is XML representation of all users in the system. SecurityYou will need to use http BASIC authentication to login as authorized QuickBuild user if the anonymous does not have adminstrative right. DemoBelow curl command demonstrates how to get all users: curl -u admin:admin http://localhost:8810/rest/users
Access user by idSyntaxUser can be accessed by id using http GET method through below url: http://localhost:8810/rest/users/<user id>
The response is of mime type application/xml and the content is XML representation of the user. SecurityYou will need to use http BASIC authentication to login as authorized QuickBuild user if the anonymous does not have adminstrative right. DemoBelow curl command demonstrates how to get user of id 1: curl -u admin:admin http://localhost:8810/rest/users/1
Get user display name by idSyntaxUser display name can be accessed by id using http GET method through below url: http://localhost:8810/rest/users/<user id>/display_name
The response is of mime type text/plain and the content is string representation of the user. SecurityYou will need to use http BASIC authentication to login as authorized QuickBuild user if the anonymous does not have adminstrative right. DemoBelow curl command demonstrates how to get display name of user with id 1: curl -u admin:admin http://localhost:8810/rest/users/1/display_name
Update userSyntaxUser can be updated by posting XML representation of the user to below url: http://localhost:8810/rest/users
Normally you do not need to create the xml from scratch: you may retrieve XML representation of the user 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 right. DemoWe will use curl to demonstrate how to modify password of user robin to be 12345:
Create userSyntaxUser can be created by posting XML representation of the user to below url: http://localhost:8810/rest/users
Please note that the posted XML should NOT contain the id element; otherwise, QuickBuild will treat the post as an update to the user with that id.
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 create a new user robin by copying the existing user admin, and change the password to 12345.
Delete userSyntaxUser can be deleted using http DELETE method through below url: http://localhost:8810/rest/users/<user id>
Here <user id} stands for id of the user to be deleted. SecurityYou will need to use http BASIC authentication to login as administrator if the anonymous does not have administrative right. DemoBelow curl command demonstrates how to delete the user with id 2: curl -X DELETE -u admin:admin http://localhost:8810/rest/users/2
|