Pace report REST API base path http://host:port/eagle/report/v1 and REST API definition resides at http://host:port/eagle/report/v1/api-doc
Details how to get host and port you can find at REST Endpoints
Executing Ad Hoc Report asynchronously with a callback
In order to get report asynchronously you should send POST request to the http://host:port/eagle/report/v1/adhocReport with HTTP header x-eagle-rest-callback: http://your_host/your_endpoint (result will be sent to defined URL) and set query parameters in JSON format as a request body
Example:
curl -X POST -H "x-eagle-rest-callback: http://your_host/your_endpoint" -d @requestBody.json "http://host:port/eagle/report/v1/adhocReport"
requstBody.json content:
{
"reportName": "RF PLA SM LPO",
"entityId": "2005P01",
"beginDate": "20140101",
"endDate": "20140131",
"fields": "",
"outputFormat":"JSON"
}
In response you will get ACK with scheduleId and correlationId
{
"taskIdentifier": {
"correlationId": {
"value": "8RTFPDOM5CQCNOVB1"
}
},
"isNegative": false,
"reason": {
"reasonTypeEnum": "INFO",
"reasonCode": {
"value": "3554701"
}
},
"header": {
"sentBy": {
"value": "http://www.eagleinvsys.com/"
},
"creationTimestamp": "2018-03-22T14:37:46.854-04:00",
"messageId": {
"value": "RGCOCKW1ED"
}
}
}
In the response above "reasonCode" value is a schedule definition id. After successful processing result will be sent on URL defined as a callback.
In case of unavailable pace-report service server will respond TSR with error description
Example:
In case of error on pace-report rest api side server respond negative ACK with error description
Example:
Executing Ad Hoc Report with ticketing
To be able track the status of processing send request with x-eagle-return-ticket: true
Example:
curl -X POST -H "x-eagle-return-ticket: true" -d @requestBody.json "http://host:port/eagle/report/v1/adhocReport"
Response will be the same ACH as in case with callback, but you can use correlationId value as a key to get information about processing or, in case of success, result.
To get status of your request send request to the http://host:port/eagle/report/v1/adhocReport/correlationId?statusonly=1 where correlationId is value from response above.
Example:
curl -X GET "http://host:port/eagle/report/v1/adhocReport/correlationId?statusonly=1"
If report request is processed you will get TSR with status of request
{
"statusItem": [
{
"taskIdentifier": {},
"status": "SUCCESS",
"severityCode": {
"value": "1"
},
"reason": [ {} ]
}
],
"header": {
"sentBy": {
"value": "http://www.eagleinvsys.com/"
},
"creationTimestamp": "2018-03-22T14:43:13.095-04:00"
}
}
Where status could be "SUCCESS" of "FAILED" or if request still in processing you will get ACK similar to the first one. In case of success you can get report sending the request http://host:port/eagle/report/v1/adhocReport/correlationId
If you accidently define wrong correlationId you will get TSR with error description
{
"statusItem": [
{
"taskIdentifier": {
"correlationId": {
"value": "89OVZ7XM47N4WUVYJ"
}
},
"status": "FAILED",
"severityCode": {
"value": "1"
},
"reason": [
{
"description": "Could not find any request with correlation id 8RTFPDOM5CQCNOVB1q"
}
]
}
],
"header": {
"sentBy": {
"value": "http://www.eagleinvsys.com/"
},
"creationTimestamp": "2018-03-22T15:22:39.864-04:00"
}
}