Table of Contents
- API Usage Guide
- API Command Reference
- add_booking
- add_client
- add_invoice
- add_resource
- approve_request
- authenticate_user
- del_booking
- del_bookings
- del_client
- del_invoice
- del_resource
- email_client
- gen_invoice
- get_activity
- get_availability
- get_booking
- get_booking_type
- get_booking_types
- get_bookings
- get_client
- get_consumable_levels
- get_invoice
- get_invoices
- get_messages
- get_reminders
- get_resource
- get_resource_availability
- get_setting
- get_template
- get_user
- get_users_logged_in
- get_venue
- get_venue_groups
- get_venues
- get_venues_in_group
- get_venues_in_use
- get_watches
- mod_booking
- mod_client
- mod_invoice
- mod_resource
- mod_venue
- notify_user
- reject_request
- restore_booking
- set_setting
- set_template
- util_api_usage
- util_from_epoch
- util_to_epoch
- Appendix A - Activity Codes
- Appendix B - Setting Names
- Appendix C - Error Handling
- Code Samples
- Troubleshooting
- Release Notes
← Hide Table of Contents
MIDAS API: Global Parameters
The following parameters must be supplied with each call to the MIDAS API:
Required Parameters | Possible Values | Description |
key | API key | Your 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. |
action | API command | The 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 Parameters | Possible Values | Description |
l | language code | By 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. |
db | database code | Multiple, 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. |
logas | user id or email address | By 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. |
runas | user id or email address | Similar 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". |
callback | JavaScript function name | If 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. |
epoch | 1 | 0 | For 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
Epoch seconds are the number of seconds that have elapsed since midnight Coordinated Universal Time (UTC) on 1 January 1970