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 35 Next »

REST API Interfaces describes the endpoints on GET and POST methods of various OLAP endpoints exposed via RESTful web service. In this document you will find information on the following topics:

  • GET method of REST Endpoints
  • POST method of REST Endpoints

Base Path: https:// <hostname>//eagle/report/v1/<supported feature>

REST Endpoint output defaults to JSON Format.  In addition, the Endpoints are in camel casing and case sensitive.

GET Method of REST Endpoints

GET method of OLAP RESTful web service is used to read/request the data from the Eagle data warehouse.  Below are the list of GET Endpoints supported by OLAP REST API.




 Details on individual GET Endpoints

Following are details on individual GET endpoints.

 reportProfiles: A GET request to return a list of report profiles.

This gives the profile names of all types of Performance Calculations, OLAP Reports and Advance reports.

Resource path: /eagle/report/v1/reportProfiles

Examples:

Web Browser

https://o171-q001-ww01.eagleinvsys.com/eagle/report/v1/reportProfiles

Curl

curl -u user:password “https://o171-q001-ww01.eagleinvsys.com/eagle/report/v1/reportProfiles

Sample response:

[
    {
        "instance": 257,
        "profileName": "13F Report",
        "reportType": "Advanced Reporting ",
        "updateUser": "BASELINE ADMIN",
        "updateDate": 1398830400000
    }
]

fields: A GET request to return a list of fields.

This includes all types of Regular fields, Advance fields, Special fields, and Performance fields.

Resource path: /eagle/report/v1/fields

Examples:

Web Browser

https://o171-q001-ww01.eagleinvsys.com/eagle/report/v1/fields

Curl

curl -u user:password “https://o171-q001-ww01.eagleinvsys.com/eagle/report/v1/fields

Sample response:

[
    {
        "id": 139,
        "description": "i Settlement Date",
        "indicator": "T",
        "type": "Date",
        "updateSource": "REGFA",
        "updateDate": 1268884800000
    }
]

fieldsByIndicator: A GET request to return the list of report fields by field indicator.

Fields of all types are assigned with an indicator respective to the database it belongs to and those are fetched with a filter mentioned in this endpoint.

Resource path: /eagle/report/v1/fieldsByIndicator/{fieldIndicator}

Examples:

Web Browser

https://o171-q001-ww01.eagleinvsys.com/eagle/report/v1/fieldsByIndicator/H

Curl

curl -u user:password “https://o171-q001-ww01.eagleinvsys.com/eagle/report/v1/fieldsByIndicator/H

Sample response:

[
    {
        "id": 143,
        "description": "i Book Value (lot)",
        "indicator": "H",
        "type": "Numeric",
        "updateSource": "REGFA",
        "updateDate": 1268884800000
    }
]

entities: A GET request to return a list of report entities.

This includes all types of entities like Portfolios, Performance composites, Reporting Composites, and Entity List etc.

Resource path: /eagle/report/v1/entities

Examples:

Web Browser

https://o171-q001-ww01.eagleinvsys.com/eagle/report/v1/entities

Curl

curl -u user:password “https://o171-q001-ww01.eagleinvsys.com/eagle/report/v1/entities

Sample response:

[
   {
"id":"23980",
"name":"JKAUMC9",
"type":"COMP"     },
   {
"id":"10120",
"name":"ALLGIPS ",
"type":"LIST"     }
]

entityById: A GET request to return an entity based on its ID.        

This is to filter a specific entity using an 8-digit Entity ID.

Resource path: /eagle/report/v1/entity/{entity id}

Examples:

Web Browser

https://o171-q001-ww01.eagleinvsys.com/eagle/report/v1/entity/LTTEST02

Curl

curl -u user:passwordhttps://o171-q001-ww01.eagleinvsys.com/eagle/report/v1/entity/LTTEST02

Sample response:

[
   {
       "id": "LTTEST02",
       "name": "LTTEST02",
       "type": "PORT"
   }
]
For another Entity
[
  {   
"id": "JKAUMC1",
      "name": "JKAUMC1 Entity Name",
      "type": "ACOM"
  }
]

entitiesByEntityNameLike: A GET request to return a list of entities that contain the specified value in the Entity name. This applies filters on the Entity name to query the list of Entities matching with the entity name filter.

Resource path: /eagle/report/v1/entitiesByEntityNameLike/{entity name}

Examples:

Web Browser

https://o171-q001-ww01.eagleinvsys.com/eagle/report/v1/entitiesByEntityNameLike/JKA

Curl

curl -u user:password “https://o171-q001-ww01.eagleinvsys.com/eagle/report/v1/entitiesByEntityNameLike/JKA

Sample response:

[
  {
        "id": "JKOPTST2",
        "name": "COPYJKACOM23 ",
        "type": "ACOM"
    }, {
        "id": "JKACOM36",
        "name": "Copy of JKACOM3 ",
        "type": "ACOM"
    }
]

entitiesByType: A GET request to return a list of entities by entity type.

This includes all types of entities like Portfolios, Performance composites, Reporting composites, Entity list, and Custom index. This endpoint is used to filter the entities by entity type.

Resource path: /eagle/report/v1/entitiesByType/{entity type}

Examples:

Web Browser

https://o171-q001-ww01.eagleinvsys.com/eagle/report/v1/entitiesByType/COMP

Curl

curl -u user:password “https://o171-q001-ww01.eagleinvsys.com/eagle/report/v1/entitiesByType/COMP

Sample response:

[
 {
        "id": "JKTXC34",
        "name": "JK DQM VOL CMP34",
        "type": "COMP"
    },
    {
        "id": "JKTXC35",
        "name": "JK DQM VOL CMP35",
        "type": "COMP"
    }
]

POST Method of REST Endpoint

adhocReport is a feature supported to extract OLAP report output using both POST and GET method. This runs a PACE report service based on the request payload input parameters in JSON format.

Request Formats:

POST

URL :   https://o171-q001-ww01.eagleinvsys.com/eagle/report/v1/adhocReport

Payload:


"reportName": "string", 
"entityId": "string", 
"beginDate": "YYYYMMDD",
"endDate": "YYYYMMDD", 
"fields": "string",
"outputFormat": "JSON/ JSON2/ CSV/ TSV/ XLS/ ERX"
"benchmarkToPortfolio": true/false,
"constituentsAndBenchmarkToComposite": true/false,
"firstAlternateCurrency": "string",
"secondAlternateCurrrency": "string",
"fetchPriorFXRates": "number",
"benchmarkOverride": {
"Comparison Index 4":"string",
"Comparison Index 5": "string",
"IsEntities": true/false
},
}

GET

URL: https://o171-q001-ww01.eagleinvsys.com/eagle/report/v1/adhocReport?  reportName=******&entityId=****,****&beginDate= YYYYMMDD &endDate= YYYYMMDD &fields= 7377,7373,11429,11779,11780&outputFormat=JSON JSON/ JSON2/ CSV/ TSV/ XLS/ ERX

Below are details of the input parameter and its values in the POST request payload and GET Request URL String of the adhocReport endpoint to extract and OLAP report data.

Input Parameter

Description

reportName

Name of the Report.  As the name indicates, report name should be provided in string format.

entityId

Single entity ID or multiple entity IDs with comma (,) or tilde (~) as separator should be provided in string format.

beginDate

Beginning date of the report should be provided in this particular format (YYYYMMDD).

endDate

End Date of the report should be provided in this particular format (YYYYMMDD).

fields

  • Single field ID or multiple field IDs with comma (,) or tilde (~) as separator should be provided in string format.
  • Fields related to entity or security characteristic should be given along with calculation or other performance fields.

outputFormat

  • Provide any one output format from the list JSON, JSON2, CSV, TSV, XLS, ERX to receive response in that particular format.
  • Any format apart from these given options will get you response in JSON2 format (default).
constituentsAndBenchmarkToCompositeProvide boolean value either true or false. This flag is applicable only for Composite Analysis report.
benchmartToPortfolioProvide boolean value either true or false. This flag is applicable for OLAP reports such as Performance Analysis, Positions and Entity And Client.
firstAlternateCurrencyProvide 3 letter predefined Currency code. For example, USD / CAD
secondAlternateCurrrencyProvide 3 letter predefined Currency code. For example, USD/CAD 
fetchPriorFXRatesProvide numeric value starting from 1 till 1000.

"benchmarkOverride":

      {
             "Comparison Index 4":"<Entity ID>",

              "Comparison Index 5": "<Entity ID>",

              "IsEntities": true

    }

  • For another entity to override as benchmark to replace already configured benchmark.  Provide another entity Id as benchmark.
  • Provide a boolean value true in 'IsEntities' flag for another entity override.
  • Either another entity or another benchmark assignment is allowed.

  "benchmarkOverride":

    {
              "Comparison Index 5": "Primary Comparison Index",

              "IsEntities": false

     }

  • For another benchmark assignment to override. 
  • Provide another assignment name. Benchmark assignment name can be retrieved using 'benchmarkDefinitions' endpoint.
  • Provide a boolean value false in 'IsEntities' flag for another benchmark assignment.
  • Either another entity or another benchmark assignment is allowed.



Note

Mandatory/Required parameters: reportName, beginDate, endDate, outputFormat

Optional parameters: fields, entities. If not given or given as empty string will submit and generate report with all fields and entities mapped with that respective report profile

.

 Sample POST Request with Payload:

Request URL:   https://o171-q001-ww01.eagleinvsys.com/eagle/report/v1/adhocReport

Payload:

{
"reportName": "SK CurrencyConversion Override CBReport",
"entityId": "SUBFICSH",
"beginDate": "20140531",
"endDate": "20140601",
"fields": "",
"outputFormat": "JSON2",
"benchmarkToPortfolio": true,
"firstAlternateCurrency": "CAD",
"secondAlternateCurrrency": "INR",
"fetchPriorFXRates": "7",
"benchmarkOverride": {
"Comparison Index 4":"MTHREN10",
"Comparison Index 5": "MTHREN9",
"IsEntities": true
},
}

GET METHOD:

Sample Request URL:

https://o171-q001-ww01.eagleinvsys.com/eagle/report/v1/adhocReport?reportName=JSON_Structural_change&entityId= MTHREN10, MTHREN9&beginDate=19800302&endDate=19800302&fields= 7377, 7373, 11429, 11779, 11780&outputFormat=JSON

Postman Reference:

Both GET and POST method API request for ADHOC submit with overrides will return the same response, provided with same data as query string or JSON.

As mentioned earlier, to get responses in a particular format, you can choose from the given options (JSON, JSON2, CSV, TSV, XLS, ERX) and get the required responses in that particular format, by default it will give you response in JSON2 format.

Appendix: Examples of API Uses

This Appendix provides example of uses of the Eagle data warehouse MC2 REST API with various programming languages.

Topics Covered in This Appendix:

  • Submitting Python Commands to invoke RESTful web service
  • Submitting Java Commands to invoke RESTful web service

Submitting Python Commands to invoke RESTful web service

Sample code snippets for POST and GET method calls using the programming language Python.

 

 

Submitting JAVA Commands to invoke RESTful web service

Sample code snippets for POST and GET method calls using the programming language JAVA.

   

   

 

 


  • No labels