MIDAS API Addon MIDAS API: Global Parameters

The following parameters must be supplied with each call to the MIDAS API:
Required ParametersPossible ValuesDescription
keyAPI keyYour unique API key. For security, the API will only respond to your unique key. Calls made to the API without a key, or with an invalid key, will not be processed and will return an "invalid api key"/401 Unauthorized response. You should not make your API key visible/available to anyone.
actionAPI commandThe action you wish the API to perform. See the API Command Reference for a full list of supported commands
If making API calls via HTTP, Your API "key" may alternatively be passed to the server in an "X-API-KEY" HTTP header, rather than as a GET/POST parameter.

The following parameters are optional, but may also be included with any API call:

Optional ParametersPossible ValuesDescription
llanguage codeBy default, the API will use the "en-US" language pack where applicable. To optionally use a different language pack, its corresponding language code can be specified.
dbdatabase codeMultiple, independent, databases can be run from a single MIDAS interface. If multiple databases have been set up in your MIDAS, API calls will be made to whichever database is currently set as the "default". To make API calls to one of the other defined databases, its corresponding database code can be passed in the "db" parameter.
To locate the correct database code to pass with the "db" parameter, open up your midas.dat settings file in a standard text editor and locate the <database> section within this file. This section contains details of all defined databases for your MIDAS. The database "code" to use is the current value of the "r" parameter for the relevant database.
logasuser id or email addressBy default, all API calls are actioned in MIDAS under an internal "API" account. By setting the optional "logas" parameter to either the internal ID or the email address of an existing user account, API calls will instead be recorded as having been actioned under that particular user account.
runasuser id or email addressSimilar to the "logas" parameter above, but the "runas" parameter abides by a specified user's permissions when making API calls. If both "logas" and "runas" parameters are supplied, "runas" will override "logas".
callbackJavaScript function nameIf JSONP support is enabled, the callback parameter can contain the name of an existing JavaScript function to execute upon receiving an API response. The received API response will be passed to this function.
epoch1 | 0For API calls that require start/end times, setting "epoch" to "1" will accept start/end values in epoch seconds (instead of the default YYYYMMDDHHMM format)
For API calls that return a date/time, setting "epoch" to "1" will return date/time values in epoch seconds (instead of following the current MIDAS date/time format settings, for instance, "DD/MM/YYYY @ HH:MM").
What are epoch seconds?
Epoch seconds are the number of seconds that have elapsed since midnight Coordinated Universal Time (UTC) on 1 January 1970