Skip to main content

Version 1.2 of the Data Exchange library supports a new capability to expose procedures in your model through a REST API. You can simply expose procedures by adding a model annotation to specify the service name through which you want the procedure to be exposed. Within a procedure called this way, you have full access to the query parameters, HTTP headers and the body of the request through predefined parameters in the Data Exchange library. The latter can also be used to map the data in a request body to parameters in your model, or conversely, to create a response body from the output data of your model. 

For now, you can directly use this feature on the desktop, for instance to allow AIMMS to be called from within a Python application, or a Jupyter notebook. As you can use this functionality directly from the AIMMS IDE, this will even allow you to interactively debug such requests using the AIMMS debugger. As this functionality will work with all types of AIMMS licenses (also the free Academic and Community licenses), this is now the preferred way to embed AIMMS in other applications running on your desktop.  

This functionality will also form the basis for exposing AIMMS models through a REST API on the AMMS Cloud Platform. This will, however, require additional support in the AIMMS Cloud Platform for load-balancing and routing API calls to the appropriate solver session, which is planned for Q4 of this year. We do not plan to support this functionality for AIMMS PRO on-premise installations.  

In addition, the Data Exchange library now also contains a completely asynchronous Curl-based HTTP client library, which supports any feature supported by libCurl that can be activated through an integer- or string-valued Curl option.  

This makes the Data Exchange library your one-stop shop for producing or consuming REST APIs from within your AIMMS models.

Visit the documentation page for more information.

Hi , How do we obtain the key for access to the RESTful API in Data Exchange Library ?


Hi , How do we obtain the key for access to the RESTful API in Data Exchange Library ?

Hi @premkrishnan612 ! We would love to help you out with using DEX and the REST API. Can you give us a bit more details on your question? Is there a specific API you are trying to connect with, and what is the purpose of the connection?


Hi , How do we obtain the key for access to the RESTful API in Data Exchange Library ?

Hi @premkrishnan612 ! We would love to help you out with using DEX and the REST API. Can you give us a bit more details on your question? Is there a specific API you are trying to connect with, and what is the purpose of the connection?

Hi @RoxannaBindenga 

Please allow me to jump into this discussion. I have used AIMMS and python together to create some large academic models. The recent retired AIMMScom for acadamic license and the new introduction of REST API really made my head spinning. The old AIMMScom was really neat and self-explained (I am not questioning your business decision and actually thanks for the free academic license anyway).

What I will really appreciate is to provide a updated version of the python example in the AIMMS user manual (https://github.com/aimms/examples/blob/1b5b7a834cf6b4125304bf2025817bc38b5646c9/Functional%20Examples/Calling%20AIMMSCOM/RunAIMMS.py) based on the new REST API. Look forwards to hearing from you.

Andy


Hi , How do we obtain the key for access to the RESTful API in Data Exchange Library ?

Hi @premkrishnan612 ! We would love to help you out with using DEX and the REST API. Can you give us a bit more details on your question? Is there a specific API you are trying to connect with, and what is the purpose of the connection?

Hi @RoxannaBindenga 

Please allow me to jump into this discussion. I have used AIMMS and python together to create some large academic models. The recent retired AIMMScom for acadamic license and the new introduction of REST API really made my head spinning. The old AIMMScom was really neat and self-explained (I am not questioning your business decision and actually thanks for the free academic license anyway).

What I will really appreciate is to provide a updated version of the python example in the AIMMS user manual (https://github.com/aimms/examples/blob/1b5b7a834cf6b4125304bf2025817bc38b5646c9/Functional%20Examples/Calling%20AIMMSCOM/RunAIMMS.py) based on the new REST API. Look forwards to hearing from you.

Andy

Hi Andy! Thank you for your message. I will look into updating the article and get back to you asap! :)


Just to give a general update here: we are working on new Python examples/documentation. These will be published in Q1. 


Didn't find what you were looking for? Try searching on our documentation pages:

AIMMS Developer & PRO | AIMMS How-To | AIMMS SC Navigator