It's all about the answers!

Ask a question

REST API: Query list of Test Environments for a given Test Plan


Rophy Tsai (231017) | asked Mar 25 '15, 11:40 p.m.
 Hi,

Given a Test Plan URL, I'd like to obtain list of associated Test Environments, with URL and Name for each Test Environments.

I know I can do it this way:
  1. GET /testplan/id to obtain list of test env URLs
  2. for each test env URL, get /configuration/id to obtain its name

However, this requires N HTTP requests just to obtain the name, I'd like to minimize amount of HTTP requests. Is there any better ways?

Note: I tried to peek at internal API, and can do the following to obtain list of test env Names of given testplan:
  1. GET ITestConfigurationRestService?configurations?testplanUUID=xxx  
However, the test env URL is not exposed in the API.

Accepted answer


permanent link
Donald Nong (14.5k414) | answered Mar 26 '15, 5:04 a.m.
The URL for the Test Environment artifact is constructed by the client side script, based on the response of the ITestConfigurationRestService request. You will need to "id" (UUID) and "/Assets/AssetInstance/AssetType/name" to construct the URL for the test environment. Note that this is the web URL, not REST API.
I haven't found a way to show the id and the name of the test environment when querying the test plans using REST API either.
Rophy Tsai selected this answer as the correct answer

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.