API Documentation

REST API is written in Python and served from Ignition’s WebDev module, providing Web Services through REST. All arguments and returns are json.

Authentication

All endpoints that require authentication take a token. The contents of the token vary by who is calling them. All endpoints will only be accessible via HTTPS/SSL.

Web Server
For functions called from Ignition’s web server through Django, the token will be an internal secret API Key. For each endpoint, it will check this token to see if it’s the API key. If it is, it will then check the requester’s IP address to verify it is from the internal web server. After verifying both, the logic in the function will execute.

External REST Access
Users who will use REST access will be provided a time-limited token based on their username, password, and API Key. A user’s API Key is found in the getAPIKey() function under “2. Account” below, and is accessible via web pages. After the API Key is stored, authenticate() is called.

token authenticate(apiKey, username, password)
Note: Upon token generation, the calling IP will be stored, and token usage will be restricted to requests from the caller’s IP, as an additional security precaution. Tokens will be time limited to 1 hour.

Common Arguments
token (string): This is an internal token for IA’s web server interface or an external token for 3rd party module developers. For module developers, this is created with the authenticate() function above.

account (string): This is the account owner email address, used to uniquely identify an account. This is always used with token so we know which account is associated with the API call. If the token was generated with authenticate(), functions will verify that the token’s account and this argument match.

Account

These are services for allowing 3rd parties to register their account and register modules. Modules can then be added to their license keys and can be marked to be listed on the showcase.

checkValidForRegistration(token, account)
Checks to see if the logged in user is tied to a CRM account and is valid to register. Only callable from Django.

token (string): see Authentication section above
account (string): see Authentication section above

registerAccount(token, account, fields)
Registers an account. Registered accounts still need to be manually approved. Only callable from Django. One of the fields will be module prefix.

getAPIKey(token, account)
After an account is registered, this returns the logged in user’s API Key. Only callable from Django.

addModule(token, account, moduleDetails)
Register a new moduleID, optionally marking it to be listed on the showcase. When called by a user, only moduleIDs with their module prefix can be added. When called by the web server, only moduleIDs that are already registered and don’t start with com.inductiveautomation can be added.

editModule(token, account, moduleDetails)
Change a module’s details

deleteModule(token, account, moduleID)
Remove a module. This will not work if any license keys use this moduleID.

License

These are services for allowing 3rd parties to create license keys, and manage which of their modules and parameters are part of their licenses. All module additions and removals invoked by a user will be limited to modules that are associated with their API Key.

generateLicenseKey(token, account, module+Version+ParamsList [, notes]) Optional “notes” will allow API users free-form descriptions for license keys, if they choose. Generated licenses start with 1 grant.

suspendLicenseKey(token, account, licenseKey)

addModulesToLicenseKey(token, account, licenseKey, module+Version+ParamsList)

updateModulesOnLicenseKey(token, account, licenseKey, module+Version+ParamsList)

removeModulesFromLicenseKey(token, account, licenseKey, moduleList)

getLicenseKeys(token, account, moduleList)

getLicenseInfo(token, account, licenseKeys) Returns license info, including module list with versions and params, grants, and notes.

increaseGrants(token, account, licenseKey[, quantity]) Increases grants. Defaults to increasing by 1.

decreaseGrants(token, account, licenseKey[, quantity]) Decreases grants. Defaults to decreasing by 1. Returns an error if grants are already at 0.

Showcase

These are services for the showcase listings.

listModules(category, vendor)
Provide a list of modules. Optionally, filter by category (and possibly vendor)

getModuleDetails(moduleID)
Provide the details of a module for the details page of the showcase

getCategories()
Provide the list of categories

getVendors()
Provide list of 3rd Party Module vendors

Activation

These are services for Ignition Gateway activation. The functions here match the functions in the legacy SOAP based API, except the “WithMethod” functions have been removed, and an option “method” argument has been added to associated functions.

isAccessible()
Always returns True. This can be used by the Ignition Gateway to verify the service can be reached.

latestBuild()
Provides a list of all module ids and versions of the most recent build.
Returns: An array of module ids and versions, two elements per item. First is module id, second is version.

latestBuildPlatform(version)
Provides a list of all module ids and versions of the most recent build of a specific line.

Arguments:
version - The line of Ignition to get the module IDs and module Versions from.

Returns: An array of module ids and versions, two elements per item. First is module id, second is version.

activateKey(activationRequestBase64[, method])
Activates a given ActivationRequest and throws a LicensingException if anything goes wrong.

Arguments:
activationRequestBase64 (String) - ActivationRequest xml encoded in Base64
method (String) - Activation method WS (Web Service), WB (Web Site), PH (Phone), default WS

Returns String: Ignition license file encoded in Base64

unactivateKey(unactivationNoticeBase64[, method])
Unactivates a given UnactivationNotice and throws a LicensingException if anything goes wrong.

Arguments
unactivationNoticeBase64 (String) - UnactivationNotice xml encoded in Base64
method (String) - Activation method WS (Web Service), WB (Web Site), PH (Phone), default WS

Returns String: Response Code

reloadActivation(activationRequestBase64[, method])
Reloads a valid activation and throws a LicensingException if anything goes wrong.

Arguments:
activationRequestBase64 (String) - ActivationRequest xml encoded in Base64
method (String) - Optional activation method WS (Web Service), WB (Web Site), PH (Phone), default WS

Returns String: Ignition license file encoded in Base64