|Top Previous Next|
In addition to be used interactively, Crash Magic can be used to generate reports as requested by other applications. The following are the supported methods for accessing and controlling Crash Magic programmatically:
•Basic URL - A simple URL interface for accessing program information without logging in. (all calls are prefixed with "$")
•MagicAuto - A more advanced URL interface, requiring login, that provides a high level access to navigation and report generation by manipulating URL parameters.
•Remote Access (REST) - This method provides much more extensive control of the program including error handling and more granular access to program components.
Note: When utilizing any of these URI - based options, the first step is always gaining access to the server in the first place. If the server is already exposed, this will not require any additional steps. However, if the server is behind a firewall or protected by an authentication mechanism, this will need to be addressed. The first test for access to the system should be to check the version. This must be successful before attempting to make calls that require log in or additional data exchange. There are two mechanisms for this. One is in Basic URL and the other is in Remote access:
This first call, using Basic URL, will return just the simple text of the version, such as 220.127.116.11:
This second call, using Remote access, will return a more complete response in JSON, XML or HTML. The call below returns the version in a JSON object like this:
"Application": "Crash Magic Online",
"RequestBegin": "2020\/06\/12 12:05:19 170",
"RequestEnd": "2020\/06\/12 12:05:19 170",
Active Directory and URI access, such as REST
If your Crash Magic system is being protected via IIS Authentication such as Active Directory authentication, making these calls require the additional step of logging in. This will require an account that IIS will authenticate. Frequently, Active Directory accounts, being set up for "real" users, are configured to expire their passwords periodically. This can be very inconvenient to REST programmers attempting to communicate with Crash Magic. These accounts should be set to "password never expires" if they will be used here.
Another option is to merely use a local server account. A user account created on the same server that hosts IIS will also authenticate. In fact, the user need not be added to any AD groups, as it will not need to do anything other than authenticate its password. For this reason, the Crash Magic installer creates an appropriate "cmREST" account during installation. Simply specify a password and press the "Create local cmREST user" button.