GET reports/runResult?CustomerID={CustomerID}&ReportRunGuid={ReportRunGuid}&NoDownload={NoDownload}

Run report result. Roles: ApiRole

To fetch a report from JetAdvice, you are required to send 3 requests to our server:

1. GET /reports/RunRequest Registers a report request to be processed on server, which is returned with "ReportRequestGuid".
2. GET /reports/RunResult Fetches the status of "ReportRunGuid"(=ReportRequestGuid) from server. If completed, it returns with list of File identifiers.
3. GET /reports/RunResultFile Fetches the actual report from server for specified file identifier.

Why use query param NoDownload=true?

By default, this endpoint can return following responses:

  1. ReportRunResult object with Status=Pending, if report request is still not processed on server.
  2. ReportRunResult object with Status=Finished and list of Files empty, if report generated have no data.
  3. Report object, actual report generated for request.

It can be pain to handle 2 types of response for same request. But we have to live with it to have backward compatibility.
To override the default functionality of getting actual report, you can make use of NoDownload=true query param which will return ReportRunResult object with Status=Finished and list of Files with File identifier, in all cases described above.
Please be informed that "NoDownload" query param will be obsoleted in future and this endpoint will not allow direct download anymore.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
ReportRunGuid

Report run request identifier to generate report

globally unique identifier

None.

NoDownload

[Deprecated] Use this param to override default functionality to return ReportRunResult object instead of actual report generated.

boolean

None.

Body Parameters

None.

Response Information

Resource Description

ReportRunResult
NameDescriptionTypeAdditional information
ReportRunGuid

Report request identifier to fetch report result

globally unique identifier

None.

StateID

Report request current state

ReportRunResultState_Values

None.

Files

Files as result of ReportRunRequest

Collection of File

None.

Response Formats

application/json, text/json

Sample:
{
  "ReportRunGuid": "96ad17fd-dcff-403b-b56a-c3a0951b83d8",
  "StateID": "_NotDefined",
  "Files": [
    {
      "ID": "aa531a3a-640a-4150-ac4b-ae44052fe916"
    },
    {
      "ID": "aa531a3a-640a-4150-ac4b-ae44052fe916"
    }
  ]
}

application/xml, text/xml

Sample:
<ReportRunResult xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <ReportRunGuid>96ad17fd-dcff-403b-b56a-c3a0951b83d8</ReportRunGuid>
  <StateID>_NotDefined</StateID>
  <Files>
    <File>
      <ID>aa531a3a-640a-4150-ac4b-ae44052fe916</ID>
    </File>
    <File>
      <ID>aa531a3a-640a-4150-ac4b-ae44052fe916</ID>
    </File>
  </Files>
</ReportRunResult>