Versions Compared

Key

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

...

One option to run EBS extracts is to use the Generic Extractor REST API. The You can retrieve the Swagger for the Generic Extractor REST API can be retrieved fromat:

Code Block
languagejs
https://eagle-web-server/eagle/v2/generic/extract/api-doc
The Generic Extract REST API allows for the execution of multiple extracts, both standard EagleML extracts and Data Services extracts with one HTTP POST request and to returns the extracted data in a ZIP file.

...

To execute a test REST request you can use the MC2 Swagger UI.

  1. Open the browser (Chrome) to point to the mc2/swagger-ui.html endpoint:
Code Block
https://eagle-web-server/mc2/swagger-ui.html

2. Select Generic Extractor from the dropdown list in the right top corner:
Image Modified

3. Click on eaglegenericextractrestapi, then click on POST and Try It Out:
Image Modified

4. In the Example Value Model add:

Code Block
languagejs
themeDJango
titleSample Generic Extractor POST Body
linenumberstrue
{
  "extractParameters": [
    {
      "name": "ebs:default:outputformat",
      "value": "EagleJSON"
    },

    {
      "name": "ebs:default:invalidatecache",
      "value": "Y"
    }
  ],
  "extracts": [
    {
      "name": "ebs:genericentity",
      "extractParameters": [
        {
          "name": "maxrows",
          "value": "5"
        }
      ]
    },
    {
      "name": "ebs:interfaces",
      "extractParameters": [
        {
          "name": "maxrows",
          "value": "10"
        }
      ]
    }
  ]

}

...

5. Click Execute.
Image Modified
The result will be a ZIP file with two extracts as show below:
Image Modified
When you download the zip, you see two files:
Image Modified

Run Data Services Extracts Using EQL REST API

...

Code Block
http://eagle-web-server/mc2/swagger-ui.html
  1. Select EQL from the dropdown list:
    Image Modified
  2. Click eql-rest, then click POST and Try it Out>.
    Image Modified
  3. In the Example Value Model enter the following:
Code Block
languagejs
themeDJango
titleSample EQL REST Api POST Body
linenumberstrue
{
            "FeedType" : "genericentity" ,
            "emlObjectType": "Entity",
            "outputformat": "EagleJSON",
            "filters": {
                "maxrows" : "5"
            },
            "SaveSQLQuery": "Y",
            "invalidatecache": "Y"
}

...

4. Click Execute.
Image Modified
The result is shown in the Response Body box below:
Image Modified