Share this page

# Add run to Trend Report and get data by ID

## Description

Adds a run to an existing trend report, and returns the report metadata (per the specified trend report ID).

## URL

Copy code

    /LoadTest/rest/domains/{domainName}/projects/{projectName}/TrendReports/{ID}

## Remarks

Only runs in the Finished state can be added.

To get the report data, request TrendReports/{ID}/data.

## HTTP Method

POST: Adds a run to a trend report.

GET: Returns the report metadata in the body of the response.

## Request

Headers:

Content-Length: {length}

Host: {PCServer}

Cookies:

- Version 2020 (or later): LWSSO_COOKIE_KEY={LwssoCookie};

- Versions earlier than 2020: LWSSO_COOKIE_KEY={LwssoCookie};QCSession={QCSessionCookie};

Request Body:

GET: No request body.

POST: An XML describing the run.

Element | Description
--- | ---
TrendReport | The root element.
Project | The project to which the run belongs. The project can be different than the project of the report.
TestSetId | The ID of the test set that contains the executed test.
TestId | The Test ID.
RunId | The Run ID.
TrendedRanged | (Optional) The range of the run to add to the report. Default: If the performance test is defined with a trend range and an action to be taken when the maximum number of runs has been reached, this will be taken into consideration; otherwise it will be the entire run.

Request Example
Copy code

    POST /LoadTest/rest/domains/{domainName}/projects/{projectName}/TrendReports/{ID} HTTP/1.1
    Content-Type: application/xml
    Cookie: LWSSO_COOKIE_KEY={LwssoCookie};
    Host: <LRE_Server>
    Content-Length: 203
    Expect: 100-continue

    <TrendReport  xmlns="http://www.hp.com/PC/REST/API">
      <Project>PC</Project>
      <RunId>2</RunId>
      <TestSetId>5</TestSetId>
    </TrendReport>
    <TrendReport  xmlns="http://www.hp.com/PC/REST/API">
      <Project>PC</Project>
      <TestSetId>1</TestSetId>
      <TestId>2</TestId>
      <RunId>4</RunId>
      <TrendedRange>
        <StartTime>
          <Hours>1</Hours>
          <Minutes>0</Minutes>
          <Seconds>0</Seconds>
        </StartTime>
        <EndTime>
          <Hours>2</Hours>
          <Minutes>0</Minutes>
          <Seconds>0</Seconds>
        </EndTime>
      </TrendedRange>
    </TrendReport>

## Response

Headers:

None

Cookies:

None

HTML Return Code:

One of the HTTP Return Codes

Upon success, returns HTTP status 200 (OK).

HTML Body:

The XML containing the trend report metadata. See TrendReports/{ID} XML.

Upon success, the response will contain the following information:

    HTTP/1.1 200 OK
    Cache-Control: no-cache
    Pragma: no-cache
    Expires: -1
    Date: Sun, 29 Nov 2015 13:40:44 GMT
    Content-Length: 0

## See Also

Add a Trend Report
Get Trend Reports by ID
TrendReports/{ID} XML
Get all Trend Reports
Set Trend Reports Baseline
Get or download Trend Report in XML format/file

Tips to improve your search results... LoadRunner Enterprise REST API Reference LRE REST API All View Local Help Center View Online Help Center back Go back in browser history forward Go forward in browser history Remove search highlights next topic Go to next topic previous topic Go to previous topic Print the current topic(Undefined variable: _rscC_Basic_Variables.VersionLabel)