Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 21 Next »

On This Page:

Ad Hoc Report POST Endpoint

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

For more information about how to get host and port, see REST Endpoints.

Execute Ad Hoc Report Asynchronously with a Callback

In order to get report asynchronously, send your POST request to the http://host:port/eagle/report/v1/adhocReport with HTTP header x-eagle-rest-callback: http://your_host/your_endpoint. The result is sent to the defined URL. Set your query parameters in JSON format as a request body.

Example:

x-eagle-rest-callback
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 receive ACK with scheduleId and correlationId.

ACK
{
  "taskIdentifier": {
    "correlationId": {
      "value": "QJPUFAJAJ0KRA0PWF"
    }
  },
  "isNegative": false,
  "reason": {
    "reasonTypeEnum": "INFO",
    "reasonCode": {
      "value": "3556152"
    }
  },
  "header": {
    "sentBy": {
      "value": "http://www.eagleinvsys.com/"
    },
    "creationTimestamp": "2018-03-23T13:00:28.349-04:00",
    "messageId": {
      "value": "Q57Y8G6AJC"
    }
  }
}

In the response above, the reasonCode value is a schedule definition id. After successful processing, the result is sent to the URL defined as a callback.

In case of unavailable pace-report service server or any error before actual processing takes place, the server responds as a negative ACK with error description.

Example:

Negative ACK
{
  "taskIdentifier": {
    "correlationId": {
      "value": "8RTFPDOM5CQCNOVB1"
    }
  },
  "isNegative": true,
  "reason": {
    "reasonTypeEnum": "ERROR",
    "description": "Service Temporarily Unavailable"
  },
  "header": {
    "sentBy": {
      "value": "http://www.eagleinvsys.com/"
    },
    "creationTimestamp": "2018-03-23T12:31:57.541-04:00",
    "messageId": {
      "value": "L2364E1UX6"
    }
  }
}

Execute Ad Hoc Report with Ticketing

To be able to track the status of processing, send a request with x-eagle-return-ticket: true.

Example:

x-eagle-return-ticket: true
curl -X POST -H "x-eagle-return-ticket: true" -d @requestBody.json "http://host:port/eagle/report/v1/adhocReport"

The response is the same ACK as in the case with callback, but you can use the correlationId value as a key to get information about processing or, in case of success, the result.

To receive the status of your request, send a request to the http://host:port/eagle/report/v1/adhocReport/correlationId?statusonly=1 where correlationId is value from response above.

Example:

GET Status
curl -X GET "http://host:port/eagle/report/v1/adhocReport/correlationId?statusonly=1"

If the report request is processed, you receive TSR with a status of request.

TSR Request Status
{
  "statusItem": [
    {
      "taskIdentifier": {
        "correlationId": {
          "value": "8S8WFEP8H14HIZJT9"
        }
      },
      "status": "SUCCESS",
      "severityCode": {
        "value": "1"
      },
      "reason": [
        {}
      ]
    }
  ],
  "header": {
    "sentBy": {
      "value": "http://www.eagleinvsys.com/"
    },
    "creationTimestamp": "2018-03-23T13:01:50.312-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"
  }
}

You can also use x-eagle-correlation-id HTTP header to specify your correlation id.

AdhocReport GET endpoint in MC2 (Starting with October 2019 release of MC2)


This endpoint redirects requests to the existing AdhocReport POST endpoint transforming GET parameters into JSON HTTP body and allows using HTTP GET parameters like in the examples below.

Let's take the next uri as an example:


https://host:port/eagle/report/v1/adhocReport?reportName=RM_PerfTotalExtended&entityId=41038M&beginDate=20150101&endDate=20151231&fields=1 Yr Net Return vs BM,10 Yr Annual Net Return vs BM&outputFormat=JSON


HTTP parameters will be taken as is and transformed into JSON HTTP body:


{
"reportName": "RM_PerfTotalExtended",
"entityId": "41038M",
"beginDate": "20150101",
"endDate": "20151231",
"fields": "1 Yr Net Return vs BM,10 Yr Annual Net Return vs BM",
"outputFormat":"JSON"
}


and redirected to the AdhocReport POST endpoint:


http://host:port/eagle/report/v1/adhocReport


If "fields" parameter is empty/not present in uri: http://host:port/eagle/report/v1/adhocReport?reportName=RM_PerfTotalExtended&entityId=41038M&beginDate=20150101&endDate=20151231&outputFormat=JSON

then it will be empty in JSON body:


{
"reportName": "RM_PerfTotalExtended",
"entityId": "41038M",
"beginDate": "20150101",
"endDate": "20151231",
"fields": "",
"outputFormat":"JSON"
}

As in case with AdhocReport POST endpoint above there is possibility to use x-eagle-return-ticket, x-eagle-rest-callback and x-eagle-correlation-id HTTP headers.

  • No labels