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

Application Server REST Endpoints

MC2 exposes a set of REST Endpoints. The REST endpoints are exposed directly on the Application Server on base port + 207. Please check Calculating MC2 Endpoints Port Numbers on how to calculate the REST endpoint port number. The

The basePort will be 20000 + 220 = 20220 and the REST API port will be 20427.

The page with the list of available Swagger definitions can be accessed at

	http://appserverhostname:20427/eagle/v2/api-doc

The above link will return a JSON document with the list of all available APIs grouped by resources.

To retrieve the full extract SWAGGER definition you can use:

	http://appserverhostname:20427/eagle/v2/extract/api-doc

Also, for example to retrieve the SWAGGER for Warehouse group only you can use:

	http://appserverhostname:20427/eagle/v2/warehouse/api-doc


Web Server REST Endpoints


In 2017R2 and later we exposed the REST API thru the regular Eagle Web Server using the Eagle supported authentication.

After 2017R2 you can execute the above requests directly on the web server using either a Web Browser or a command line tool, like curl:

	https://webserver/eagle/v2/api-doc


When accessing the REST endpoints thru Eagle Web Server proper Eagle supported authentication credentials should be provided.


Swagger UI REST Endpoint

Swagger UI can be used to navigate the exposed REST endpoints and execute sample requests.

The Swagger UI REST Endpoint is exposed on 2017R2 and later environemtn at:


        https://webserver/mc2/swagger-ui.html


Executing Extract Service REST Requests

To execute an extract you can use the SWAGGER definition to see all resource endpoints and parameters supported to build the URL. You can use either a Web Browser or a command line tool, like curl, to execute REST requests.

For example to retrieve an extract with one entity in JSON you can use HTTP GET or POST request either.

In case of GET request filter parameters should be passed as a query parameters:

	http://appserverhostname:20427/eagle/v2/entities?maxrows=1

The same with a POST request, filter parameters are passed within a JSON body (multiple parameters should be divided by a comma):

	http://appserverhostname:20427/eagle/v2/entities
	{
"maxrows": "1"
}


or in 2017R2

        http://webserver/eagle/v2/entities?maxrows=1



To retrieve the result in EagleML the output format can be specified as:

	http://appserverhostname:20427/eagle/v2/entities?maxrows=1&outputformat=eagleml

To retrieve the extract compressed the output format can have +gzip appended:

	http://appserverhostname:20427/eagle/v2/entities?maxrows=1&outputformat=eagleml+gzip

or

	http://appserverhostname:20427/eagle/v2/entities?maxrows=1&outputformat=json+gzip

Please refer to REST API Extracts for a list of supported endpoints for EagleML extracts and their parameters/swagger files.


  • No labels