API Authentication

The service uses the unique identifiers (API keys) to verify the identity of the user and other service making the API request. When a request to the RESTful service is made, the API key is specified in the URL query parameters. You can find an example below.

http://calculationmanager.wehrspohn.info/api/v0/Simulation/123?apiKey=AF2D3D828177416BBE1599B0000BAD98

The service then checks the validity of the key and grants access to the resource if the key is valid. If the key is invalid, the service will return immediately with HTTP 403 (Forbidden).

Use the example API key above for testing purposes.

HTTPS Encryption

The RESTful service can be accessed over HTTPs, which provides a secure and encrypted connection between the client and server. To access our service, simply use the HTTPS protocol and the appropriate endpoint URLs.

https://calculationmanager.wehrspohn.info/api/v0/Simulation/123?apiKey=AF2D3D828177416BBE1599B0000BAD98

Globalization

The service supports different culture settings to provide localized responses. You can specify the desired localization by including the 'lang' query parameter in the URL. For example, to request a response in German, add '?lang=de' to the URL. Our service currently supports the following languages: English (default) and German. If no 'lang' parameter is provided, the default language will be used.

http://calculationmanager.wehrspohn.info/api/v0/Simulation/123?lang=de&apiKey=AF2D3D828177416BBE1599B0000BAD98

The localizations are only available for HTML content and error messages.

Note that this test server only supports the English locale.

Simulation

The API allows to upload the portfolios to the server and to retrieve the simulation results back.

MethodRouteDescription
POST api/v0/Simulation?apiKey={apiKey}&lang={lang}

Uploads the portfolio details to the server in order to simulate it. Once uploaded, the Calculation Manager creates a calculation job and returns the details.

GET api/v0/Simulation/{id}?apiKey={apiKey}&lang={lang}

Returns the simulation results for the specified calculation job ID.

PUT api/v0/Simulation/{id}?apiKey={apiKey}

Cancels the simulation.

Status

The API allows to check the status of the Calculation Manager.

MethodRouteDescription
GET api/v0/Status?apiKey={apiKey}&lang={lang}

Returns the current status of the Calculation Manager.

Html

The API processes the simulation results and wraps them into an HTML page.

MethodRouteDescription
GET api/v0/Html/{id}?apiKey={apiKey}&lang={lang}

Returns the simulation results as HTML content. The Content-type is set to 'text/html' and the charset is UTF-8.

POST api/v0/Html?apiKey={apiKey}&lang={lang}

Uploads the simulation results in JSON format to the server, wraps it into an HTML page and returns it. The Content-type is set to 'text/html' and the charset is UTF-8.