Posts Tagged: API

The MIDAS API allows developers to interface with a MIDAS booking system from their own code, applications, or websites.

This powerful addon is available as an option for both cloud-hosted and self-hosted MIDAS systems for an additional cost.

To help ensure maximum quality of service for all our cloud hosted customers, we will shortly be implementing a “Fair Usage” policy for API calls.

To clarify; this will only affect cloud-hosted customers using the optional MIDAS API. This does not affect self-hosted customers using the MIDAS API, and it does not affect non-API users.

Why the need for a “Fair Usage” API policy?

We recently became aware of a customer who was retrieving over 1GB of data each day from their cloud-hosted MIDAS system via automated API calls. On some days this would exceed over 1.5GB/day.

Now, we should stress that this customer was not acting maliciously in any way. They were not making an excessively high volume or frequency of API calls, but the calls that were being made were returning extremely large data sets every 10 minutes.

As a business, we obviously have to pay for our bandwidth (the amount of data transferred between our servers and customers), and so a customer pulling over 1GB of data from our servers everyday via the API becomes costly.

Therefore, going forward, we’ve decided to implement a “Fair Usage” policy on API calls made to cloud-hosted MIDAS systems.

What is the “Fair Usage” API policy?

The Fair Usage policy sets limits on the number of API calls that can be made in any given hour, and the amount of data that may be retrieved in any given 24 hour period.

Initially, these limits will be as follows *:

  • A maximum of 720 API calls per hour
  • A maximum of 480 MB of data per day

We believe API limits for cloud-hosted customers are generous, and from our analysis will not impact the vast majority of cloud-hosted API users.

* We reserve the right to review and amend these limits in the future. The current limits may always be found here.

What happens if I exceed these API limits?

Most API users will not be impacted by this change. However, should you exceed these limits, API access to your MIDAS system will be temporarily suspended, with subsequent API calls returning an error. API access will be automatically re-instated once API usage falls below these limits again.

We’ve also provided useful advice on how you can reduce API usage by optimizing your API calls.

Can I monitor my API usage?

It would be unfair of us to introduce a “Fair Usage” policy without providing a way for customers to monitor their API usage.

As such, we’ve just released an updated API (v2.48) in which you can view your current API usage via MIDAS Admin Options โ†’ Manage Addons โ†’ API Access.

NEW: API usage monitoring in API v4.28
NEW: API usage monitoring in API v4.28

API usage may also be monitored directly through the API itself via a new “util_api_usage” call.

When will this policy come into effect?

Cloud-hosted API users can now monitor their current API usage as outlined above.

We’re allowing a grace period before we implement our new API “fair usage” policy.

The “Fair Usage” policy will start being enforced from Monday 13th September 2021.

Can I opt-out of the “Fair Usage” policy?

Our API “Fair Usage” policy (which only applies to cloud-hosted customers) cannot be opted out of.

However, if you find that you regularly exceed the new API limits and are unable to refactor your code to reduce the frequency of API requests and/or the amount of data returned by your API calls, then please contact us to discuss increasing your API limits.

Alternatively, you could consider migrating to a self-hosted MIDAS system. API calls to self-hosted MIDAS systems do not have any usage limits imposed.


We thank you for your understanding and co-operation in helping us to ensure quality of service for all our cloud-hosted customers.

Should you have any questions or concerns, please don’t hesitate to reach out to us, and we’ll be happy to help!


Upcoming New Features in the MIDAS API

To coincide with our next release of MIDAS, v4.16, we’ll also be releasing an update to the optional MIDAS API.

Our optional API access addon offers a programmatic and bi-directional interface to a MIDAS scheduling system.

The API can be used to extract data from a MIDAS system. This data can then be processed and used within your website and applications.

The API can also be used to make changes to settings and data within a MIDAS system. For instance, the API could be used to automate the adding of new bookings.

Or, the API can be used to interface MIDAS with other 3rd party software apps…. the possibilities are near endless!

To further increase the power and usefulness of the MIDAS API, we’re adding a couple of significant features in the forthcoming API update:

NEW: Command Line Support

Until now, all calls to the API had to be made via HTTP transactions. With the next update, you’ll also be able to make API calls directly from the command line! (self hosted editions only). API calls made in this way have the added benefit of being significantly more efficient and 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 and values via command line switches.

For example, to retrieve the currently installed version of MIDAS from the Windows command line (cmd):

A MIDAS API call made from the Windows Command line (cmd)

…or from Windows PowerShell:

A MIDAS API call made from Windows PowerShell

NEW: Optional JSONP Support

By default, the MIDAS API outputs in JSON format. However following feedback from API users, we’re also introducing optional JSONP support with the next update to the API.

If you don’t know what JSONP is, then you probably don’t need it!

JSONP is a method commonly used to bypass the cross-domain policies in web browsers. Typically, modern browsers won’t allow you to make AJAX (Asynchronous Javascript) requests from one domain to another domain perceived to be on a different server.

For instance, if your MIDAS system is running on server A, and you wish to make client-side API calls through Javascript, you would typically only be able to make such AJAX requests from pages residing on server A itself. Attempting to initiate an AJAX request for server A from server B would be blocked by the user’s browser.

JSON and JSONP behave differently on the client and the server. JSONP requests are not dispatched using the XMLHTTPRequest and the associated browser methods. Instead, a <script> tag is created, the source of which is set to the target URL. This script tag is then added to the DOM (normally inside the element).

JSONP support in the MIDAS API (which is disabled by default) can be enabled via the API settings screen.

WARNING: Before enabling JSONP support, you should instead look to use CORS (Cross Origin Resource Sharing) wherever possible, as JSONP has inherent security risks as it injects Jasacript code directly into your web pages

With JSONP support enabled, you’d then be able to pass the name of a Javascript function in a “callback” parameter along with your API calls.

Consider a simple API call to retrieve the version number of MIDAS (passing the “action” parameter with a value of “get_setting“, and a “setting” parameter with a value of “version“). The typical JSON response would be:

{"version":"4.16"}

Now consider the same API call, with JSONP support enabled, and an additional “callback” parameter passed with a value of “myfunction“. The JSONP response would then be:

myfunction({"version":"4.16"})

The “callback” parameter must contain the name of an existing Javascript function on the calling page.

Upon receiving the JSONP response, the user’s browser will execute the “myfunction” Javascript function, passing the JSON data {"version":"4.16"} to it accordingly.


Version 2 of the MIDAS API is here

Introducing API Version 2…

MIDAS API The MIDAS API is an optional addon for MIDAS, allowing you to interface directly with your MIDAS scheduling system from your own applications.

First introduced just over a year ago, version 1 of the API allowed developers to access and retrieve data from MIDAS.

Version 2 of the API builds on this, and extends the API’s capabilities further by now allowing “bi-directional” access to MIDAS. This means that as well as being able to simply “read” data from MIDAS through the API, developers can now also “write” data to MIDAS, and modify existing data.

Nearly two dozen new API calls have been implemented for API v2, allowing you to:

  • Add, delete or modify bookings, clients, and resources
  • Add, generate, or delete invoices
  • Approve or reject booking requests
  • Email clients
  • Change settings
    …and more!

Full documentation for version 2 of the API is now available online at mid.as/api, and will shortly be available in an offline format too.API v2 will be available to coincide with the upcoming release of MIDAS v4.07, and will a FREE update to existing API users who have an ongoing annual support subscription covering the release of v4.07.

v2 is also backwards compatible with v1 of the API. Existing customers who wish to add the optional API to their MIDAS installation can do so via mid.as/upgrade.

New customers can purchase MIDAS along with the optional API addon via mid.as/pricing.

MIDAS API calls

New API and RSS addons

MIDAS v4.03 is just around the corner, and this update to our popular web based scheduling software will include a number of new features and improvements over previous versions.

Perhaps one of the most exciting new features of v4.03 will be the introduction of a new “addon” system, allowing the capabilities of your MIDAS to be extended through a range of optional extras.

A couple of optional “addons” will be initially available to coincide with the release of MIDAS v4.03, including a much anticipated API addon, and also an RSS addon…

API Access

MIDAS APIThe “API Access” addon will allow developers to interface directly with MIDAS from their own software applications! You can read more here.

Extensive API Documentation, including code samples, is already available online and the API Access addon is also now available to Beta Testers.

If you’re a programmer/developer and would like to test the new API, become a Beta Tester today!

RSS Feeds

RSS Feeds Settings

The RSS Feeds addon will allow MIDAS to automatically generate multiple public RSS 2.0/Atom data feeds from your booking data! Read More ยป

…and here’s an example of a typical MIDAS RSS Feed


Both the above “addons” are available right now to beta testers, and can be found within the software via MIDAS Admin Options โ†’ Manage Addons.

Once MIDAS v4.03 is released, new customers will be able to include optional addons at time of purchase, or add them at a later date.
Existing users will be able to obtain addons for their MIDAS as upgrades in just a few simple steps!