QuickBuild2 Documentation
|
Get all authorizations in the systemSyntaxAuthorizations in the system can be accessed using http GET method through below url: http://localhost:8810/rest/authorizations
The response is of mime type application/xml and the content is XML representation of all authorizations 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 authorizations: curl -u admin:admin http://localhost:8810/rest/authorizations
Access authorization by idSyntaxAuthorization can be accessed by id using http GET method through below url: http://localhost:8810/rest/authorizations/<authorization id>
The response is of mime type application/xml and the content is XML representation of the authorization. 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 authorization of id 1: curl -u admin:admin http://localhost:8810/rest/authorizations/1
Access authorizations of a particular groupSyntaxAuthorizations of particular group can be accessed using http GET method through below url: http://localhost:8810/rest/authorizations?group_id=<group id>
The response is of mime type application/xml and the content is XML representation of all authorizations of specified group. 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 authorizations of group with id 2: curl -u admin:admin http://localhost:8810/rest/authorizations?group_id=2
Access authorizations of a particular configurationSyntaxAuthorizations of particular configuration can be accessed using http GET method through below url: http://localhost:8810/rest/authorizations?configuration_id=<configuration id>
The response is of mime type application/xml and the content is XML representation of all authorizations of specified configuration. 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 authorizations of configuration with id 1: curl -u admin:admin http://localhost:8810/rest/authorizations?configuration_id=1
Update authorizationSyntaxAuthorization can be updated by posting xml representation of the authorization to below url: http://localhost:8810/rest/authorizations
Normally you do not need to create the XML from scratch: you may retrieve XML representation of the authorization 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 change authorization of group developer from configuration root/project1 to root/project2:
Create authorizationSyntaxAuthorization can be created by posting XML representation of the authorization to below url: http://localhost:8810/rest/authorizations
Please note that the posted XML should NOT contain the id element; otherwise, QuickBuild will treat the post as an updating to the authorization with that id. 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 authorize group tester (assume the id is 3) with RUN_BUILD and STOP_BUILD permission in configuration root/test (assume the id is 2).
Delete authorizationSyntaxAuthorization can be deleted using http DELETE method through below url: http://localhost:8810/rest/authorizations/<authorization id>
Here <authorization id} stands for id of the authorization 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 unauthorize configuration root/test (assume id is 2) for group tester (assume the id is 3).
|