Neoload Documentation https://www.neotys.com/documents/doc/neoload/latest/en/ht...
****************************************************************************************************************
Says that in order to generate a report through REST calls I have to send this parameters.
POST http://localhost:7400/Results/v1/Service.svc/GenerateReport HTTP/1.1
Content-Type: application/json
{ "d": {
“ApiKey”: “xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”
"TestResultName": "testA",
"ComparisonReport": true,
"OtherTestResultName": "testB",
"CustomReportContents": true,
"Format": "PDF"
}}
****************************************************************************************************************
QUESTION: Is there a parameter to specify where to save the report? Is there a field to specify a directory in the END Point?
Dear Shahboz,
The GenerateReport returns a report ID that must be used as the input of DownloadReport that returns the report binary (PDF content for a PDF or a Zip file content for the HTML format).
I am also sending a POST request to http:/localhost:7400/Results/v1/Service.svc/DownloadReport
{
"d":
{
"ReportId": "{{ReportId}}",
"ApiKey": "{{APIkey}}"
}
}
Does this api accept parameter where I can pass in where to save the downloaded file??
The response of the API Call to DownloadReport returns the bytes.
This is the responsibility of the client calling the API to write the bytes to a file on disk.
Is there any example on how to save the file and decode the binary to pdf using powershell? I understand it's our responsibility to save it to file, do you have example scripts that shows the saving and decoding the pdf file in powershell???
You can use CURL
curl -H "Content-Type: application/json" -X POST http://localhost:7400/Results/v1/Service.svc/GenerateReport -d "{\"TestResultName\": \"FirstTest31\",\"Format\": \"PDF\"}"
then get the reportID. make another CURL Post request
curl -H "Content-Type: application/json" -X POST http://localhost:7400/Results/v1/Service.svc/DownloadReport -d "{\"ReportId\": \"fb517607-1dd8-4ce2-b4fc-bc829b62383f\"}" >> TestResults.pdf
venkat answered
Shahboz answered
christophe answered
Shahboz answered
christophe answered
Shahboz posted a new question