Table of Contents
- API Usage Guide
- API Command Reference
- add_booking
- add_client
- add_invoice
- add_resource
- add_venue_group
- approve_request
- authenticate_user
- del_booking
- del_bookings
- del_client
- del_invoice
- del_resource
- del_venue_group
- 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
- mod_venue_group
- 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
Making MIDAS API Calls & Authentication
API calls via HTTP
To make an API call, your application will need to perform an HTTP POST transaction (HTTP GET requests can also be enabled - see API Settings) to http(s)://your_midas_url/api.pl.Each request must include as a minimum:
- Your unique MIDAS API key.
- An API command.
- All associated required parameters (if applicable) for the particular API command being issued.
The API key itself may be passed either in a GET / POST parameter named "key", or via an "X-API-KEY" HTTP header (recommended).
Please refer to the API Command Reference for details of available API commands and associated parameters.
API calls from the Command Line
API calls made in this way have the added benefit of being significantly faster (assuming the call is made from the command line on the same server as the MIDAS system), as they do not require an HTTP transaction to be conducted.
To make API calls from the command line, simply call "api.pl" (located within your server's MIDAS directory) and pass API parameters & values via command line switches.
For example, to retrieve the currently installed version of MIDAS from the Windows command line (cmd):

...or from Windows PowerShell:

API calls from 
Postman is a third party API development tool, helping developers build, test, collaborate and integrate APIs.If you use Postman, we have a MIDAS API collection available for import. For more information, please see our KB article: Using the MIDAS API with Postman.
Keeping your API keys secure
Anyone who holds your API key can use the API against your MIDAS system, so treat it like a password.- Do not publish it or commit it to source control, including private repositories that may later become public. Keep it in an environment variable or secrets manager. Deleting a key from a later commit does not remove it from the repository history, so replace the key instead.
- Send it in the X-API-KEY header rather than as a URL parameter, so it is not recorded in server logs, browser history or referrer data.
- Only share it with people who need it, and replace it when someone who had access leaves.
- If you think it has been exposed, rotate it immediately. Until you do, anyone who has it can keep using it.
- You are responsible for the security of your API key and for activity carried out using it.
Important information for Cloud-Hosted customers
For more information, please see: Usage Limits.
Making MIDAS API Calls & Authentication