Open topic with navigation

# Runs (Get Run by Query)

## Description

Returns a list of runs by query (filter).

## URL

    /LoadTest/rest/domains/{domainName}/projects/{projectName}/Runs/?query={<QUERY_NAME>["<YOUR_QUERY_VALUE>"]}

## Runs Query Values

QUERY_NAME options:

-     ID

-     Duration

## Remarks

The runs data can be passed as XML containing the equivalent data.

## HTTP Method

GET: Returns a list of runs by query.

## Request

Headers:

Content-Type: application/xml

Accept: application/xml

Cookies:

Version 2020 (or later) | LWSSO_COOKIE_KEY={LwssoCookie};
Versions earlier than 2020 | LWSSO_COOKIE_KEY={LwssoCookie};QCSession={QCSessionCookie};

Request Body:

None

Example request for all runs that belong to a test with ID = 1

    GET http://<LRE_Server>/LoadTest/rest/domains/{domainName}/projects/{projectName}/Runs/?query={TestID[1]}
    Content-Type: application/xml
    Accept: application/xml
    Cookie: LWSSO_COOKIE_KEY={LwssoCookie};

## Response

Headers:

Content-Type: application/xml

Cookies:

None

HTML Return Code:

One of the HTTP Return Codes.

HTML Body:

GET: Returns the data on the entity in the response. See Run Status XML.

Example

The following is an example of a response.

    <TestID>61</TestID>
    <TestInstanceID>30</TestInstanceID>
    <PostRunAction>Collate Results</PostRunAction>
    <TimeslotID>1259</TimeslotID>
    <VudsMode>false</VudsMode>
    <ID>43</ID>
    <Duration>2</Duration>
    <RunState>Before Creating Analysis Data</RunState>
    <RunSLAStatus>Not Completed</RunSLAStatus>

## See Also

Get Run Status
Start a Test Run