Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

On This Page:

...

You can execute ad hoc reporting asynchronously with a callback or with ticketing.

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 Manage 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.

You can execute ad hoc reporting asynchronously with a callback or with ticketing.

On this page

Table of Contents
minLevel1
maxLevel3
outlinefalse
styledefault
typelist
printabletrue

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 Manage 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:

POST Request with Callback
Code Block
languagejs

...

...

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 an ACK with the schedule ID  and the correlation ID.

ACK
Code Block
languagejs

...

...

{
  "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 reason Code value is a schedule definition ID. After successful processing, the result is sent to the URL defined as a callback. In the case of an unavailable PACE report service server, or any error before actual processing takes place, the server responds as a negative ACK with an error description.

Example:

...

Negative ACK
Code Block
{
  "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
Code Block
languagejs
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 correlation Id is value from response above.

Example:

GET Status
Code Block
languagejs

...

...

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
Code Block
languagejs

...

...

{
  "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"
  }
}

When the status is either SUCCESS or FAILED, or if the request is processing, you receive an ACK similar to the first one. In case of success, you can receive a report by sending the request to http://host:port/eagle/report/v1/adhocReport/correlationId.

If you accidentally define the wrong correlationId, you receive a TSR with an error description.

TSR with Error
Code Block
languagejs

...

{
  "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.

Adhoc Report

...

Get Endpoint in MC2

This endpoint redirects requests to the existing AdhocReport POST endpoint transforming the GET parameters into the JSON HTTP body and allows the use of HTTP GET parameters as shown in the examples below.

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

The HTTP parameters are taken as is and transformed into the JSON HTTP

...

body and redirected to the AdhocReport POST endpoint: http://host:port/eagle/report/v1/adhocReport.

Code Block
languagejs
{
"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"
}

If the fields parameter is empty/not present in the url then it is empty in the JSON body.

...

For example: http://host:port/eagle/report/v1/adhocReport?reportName=RM_PerfTotalExtended&entityId=41038M&beginDate=20150101&endDate=20151231&outputFormat=JSON.

Empty Fields Parameter
Code Block
languagejs

...

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

As in the case with Ad Hoc Report POST Endpoint above, you can use x-eagle-return-ticket,

...

 x-eagle-rest-callback and x-eagle-correlation-

...

id HTTP headers.