Retrieve Object Identifier
Most of QuickBuild RESTful API relies on identifier of the object, which can be retrieved with the id service explained here.
Get configuration id by path
Syntax
Configuration id can be retrieved by path name using http GET method through below url:
http://localhost:8810/rest/ids?configuration_path=<configuration path name>
Here <configuration path name> represents full path of a configuration. The response is of mime type application/xml and the content is string representation of configuration id. Status code 204 (No Content) will be returned if configuration is not found.
Security
Any user including anonymous can use this service.
Get resource id by name
This feature is available since 6.1.35
Syntax
Resource id can be retrieved by name using http GET method through below url:
http://localhost:8810/rest/ids?resource_name=<resource name>
Here <resource name> represents name of a resource. The response is of mime type application/xml and the content is string representation of resource id. Status code 204 (No Content) will be returned if resource is not found.
Security
Any user including anonymous can use this service.
Demo
Below curl command demonstrates how to get id of configuration root/test:
curl http://localhost:8810/rest/ids?configuration_path=root/test
Get user id by name
Syntax
User id can be retrieved by user name using http GET method through below url:
http://localhost:8810/rest/ids?user_name=<user name>
Here <user name> represents name of a QuickBuild user. The response is of mime type application/xml and the content is string representation of user id. Status code 204 (No Content) will be returned if user is not found.
Security
Any user including anonymous can use this service.
Demo
Below curl command demonstrates how to get id of user robin:
curl http://localhost:8810/rest/ids?user_name=robin
Get group id by name
Syntax
Group id can be retrieved by group name using http GET method through below url:
http://localhost:8810/rest/ids?group_name=<group name>
Here <group name> represents name of a QuickBuild group. The response is of mime type application/xml and the content is string representation of group id. Status code 204 (No Content) will be returned if group is not found.
Security
Any user including anonymous can use this service.
Demo
Below curl command demonstrates how to get id of group developers:
curl http://localhost:8810/rest/ids?group_name=developers
Get queue id by name
Syntax
Queue id can be retrieved by queue name using http GET method through below url:
http://localhost:8810/rest/ids?queue_name=<queue name>
Here <queue name> represents name of a QuickBuild queue. The response is of mime type application/xml and the content is string representation of queue id. Status code 204 (No Content) will be returned if queue is not found.
Security
Any user including anonymous can use this service.
Demo
Below curl command demonstrates how to get id of queue default:
curl http://localhost:8810/rest/ids?queue_name=default
Get build id by request id
Syntax
Build id can be retrieved by request id using http GET method through below url:
http://localhost:8810/rest/ids?request_id=<request id>
Here <request id> represents id of a build request. The response is of mime type application/xml and the content is string representation of build id. Status code 204 (No Content) will be returned if build is not generated yet.
Security
Any user including anonymous can use this service.
Demo
Below curl command demonstrates how to get build id of request 0136ed89-d47f-4307-8e69-c8535fae0e84:
curl http://localhost:8810/rest/ids?request_id=0136ed89-d47f-4307-8e69-c8535fae0e84
Get build id by build name
Syntax
Build id can be retrieved by build name using http GET method through below url:
http://localhost:8810/rest/ids?build_name=<build name>
Here <build name> represents name of a build. The response is of mime type application/xml and the content is string representation of build id. Status code 204 (No Content) will be returned if build of the name is not found.
Security
Any user including anonymous can use this service.
Demo
Below curl command demonstrates how to get id of latest build in configuration with id 1:
curl http://localhost:8810/rest/ids?build_name=1.latest
Get dashboard id by dashboard fqn (fully qualified name)
Syntax
Dashboard id can be retrieved by dashboard fqn using http GET method through below url:
http://localhost:8810/rest/ids?dashboard_fqn=<dashboard fqn>
<dashboard fqn> is of the form <user id>.<dashboard name> . The response is of mime type application/xml and the content is string representation of dashboard id. Status code 204 (No Content) will be returned if dashboard of the fqn is not found.
Security
Any user including anonymous can use this service.
Demo
Below curl command demonstrates how to get id of dashboard project1 belonging to user with id 1:
curl http://localhost:8810/rest/ids?dashboard_fqn=1.project1