Skip to content

Scripting APIs

The server application of the Tool is a C++ application. It contains an interface called CIMSpy Core APIs. All of the services/functionalities provided by the Tool are exposed though CIMSpy Core APIs, which are object oriented.

To support Python scripting, a subset of CIMSpy APIs are wrapped and published in Python. They are classified into the following groups:

  • General APIs: The general APIs wrap some generic C++ data structures and expose them in a Python style. The wrapped data structures include enumeration and some string-based collection classes. They are designed to support Model APIs.
  • Model APIs: These APIs are defined create, query, update, import, and export models, and build views for reporting. These are core APIs designed to support various customization use cases, ranging from building custom processes to plugging-in custom functions for model validation, transformation, or reporting.
  • Context APIs: These APIs are defined to exchange information between the server application and the plug-in scripts. The script functions that can be called by the server application must take a pre-defined parameter, called context object, defined to carry-in the input information from the server to the script and carry-out the output information from script to the server.

It is import to note that the published APIs are intended to extend the Tool to meet the customization requirements. They serve as the building-blocks of the customization process. The APIs published for this purpose is only a subset of the CIMSpy Core APIs. They are intended to be used in the Tool environment. In general, any tasks that can be performed from the UI, for example, model comparison, will NOT result in an API published here, since it is not needed if the Tool already provides such a capability. From this perspective, the published APIs serve as the extension of the Tool.

There is also a standalone CIMSpy module available, which is released under an evaluation license. The standalone CIMSpy Python module enables users to build independent Python applications outside of the Tool. This module publishes the full CIMSpy Core APIs and can be leveraged to build a custom solution rapidly by taking full advantage of the services/functionalities provided by the Tool.

To learn how to use the published APIs, check the scripting tutorial.