Plutocalc Designer - API Reference


The instructions below target software developers familiar with API interfaces.

Introduction

The API allows Plutocalc Designer to be connected with other tools like spreadsheets, optimization models or databases.
Plutocalc Designer backend uses an HTTP interface that outputs data to users based on GET and POST commands.
The input/output data format follows JSON standard for data collections and UTF-8 text for errors, notes and warnings.

Request format

Only two parameters are required to exchange data with the server, the model and the command. Server URL format:
https://www.plutocalc.com/designer/server/[MODEL]/[COMMAND]
Where:
[BASE_URL]:
https://www.plutocalc.com/designer/server/
[MODEL]: Plutocalc Designer computation model internal name/id. The complete list can be extracted using the command listmodels. Examples:
  • cmasbod
  • cmasbodnh4
  • cmasbodno3
  • mbrbodnh4
  • mbrbodno3
  • stripping
  • rocip
[COMMAND]: Command used to request a response from the server.

Mandatory POST headers:
Content-type": "application/json"
Response headers can be either
Content-type": "application/json"
for data packages or
text/html
for errors, warnings and information.

Command reference

CommandTypeInputOutputDescription
BASE_URL/GET-text/htmlServer version
BASE_URL/statusGET-text/htmlServer operational status (normal is "Online")
BASE_URL/listmodelsGET-application/jsonList the available models and internal names
BASE_URL/MODELGET-text/htmlModel name and version
BASE_URL/MODEL/informationGET-application/jsonModel detailed information object
BASE_URL/MODEL/templateGET-application/jsonModel data input template (use as a reference for the inputs)
BASE_URL/MODEL/referencedbGET-application/jsonList reference databases (example: chemical compounds)
BASE_URL/MODEL/unitslistGET-application/jsonSupported units for conversion
BASE_URL/MODEL/POSTapplication/jsonapplication/jsonOutput the calculation results from an input JSON

License keys

If required, a license key must be included in the appropriate field of the input JSON structure. Credits will be used as they would in a normal calculation from the user interface. We recommend using HTTPS request to prevent key leak. For input/output testing purposes use any text string as key, the backend will answer with the properly formatted response, except of the calculation results.

Abuse prevention

The backend server has embed algorithms that detect abuses in several levels and block the API usage. The threshold limits depend on the IP origin, license key, external abuse prevention lists and other factors. If you believe your requests were blocked by mistake please contact us.