Getting Started with the Public API

Getting Started with the Public API

ParkMyCloud has a public API which is for use by authorized customers and trial users.  (Note that API Access is not available at the Free subscription tier – please upgrade to enjoy this enhanced functionality!)  The ParkMyCloud API documentation is available at https://api.parkmycloud.com/ in the API Blueprint format.

This site lists a number of APIs, with the most recent updates appearing as "V2" APIs. In any place you see both a V2 API and non-V2 API, the V2 is the currently supported version, and the older version is deprecated but still available for backwards compatibility.  Note that the older APIs may be removed at any time without notice.  Existing API Tokens issued by ParkMyCloud for the older Auth API - DEPRECATED still work, though we would like you migrate to the new authentication method at your earliest convenience.

To start using the APIs, you must first authenticate using the Auth  API V2.  To do this, you must first create an authentication token using the ParkMyCloud Console.  Navigate in the ParkMyCloud Console at Users > [User name] > Access Settings, and click the Enable API Access checkbox.  Note that if you are creating a new user, you must first fill-in the information on the User->General tab, save the user, and then go back in and edit the Access Settings.
            


If this User is intended to be dedicated to API access, you can uncheck the Enable Console Login button.  NOTE: The API Keys provide full access to the ParkMyCloud Console at the privilege level of the assigned role and teams.  Handle these keys cautiously, avoid hard-coding them into scripts, and do not disclose them to outside parties.  ParkMyCloud is not responsible to problems related to improper user login key/password handling.

Since API Access is an attribute of a User, you can create dedicated API logins with access limited by role and team assignment, and keep better track of API access using the Reports > Audit Log function.

Successful login with Auth  API V2 will yield an X-Auth-Token that is then used to authenticate to all of the other APIs, both old-style, and V2.

To view an API, select the action on the left side of the https://api.parkmycloud.com/ site, such as the POST method on Auth API V2:


You will then see the documentation on the right-side of the site:
 

The documentation will show the required API URL, the parameters (with examples) and the expected responses.  Use the Production button shown here on the lower left and the Try button on the right to experiment and test the API against the Production ParkMyCloud system. 

Click the Switch to Example button in the upper-right to switch back to the documentation:
            

API Blueprint

The full API is available for download in API Blueprint format at https://jsapi.apiary.io/apis/parkmycloud.source

Using the API in Programs and Scripts

Many customers use the ParkMyCloud API to automate certain procedures, such as adding credentials en masse, or overriding resource schedules and stopping/starting them for build systems and automated test environments.

We provide several Python-based API examples in our public github repo at: https://github.com/parkmycloud/useful_tools/tree/master/ParkMyCloudAPIExamples

For direct access via Unix shell scripts, there is an excellent tutorial showing how to access APIs via the shell at https://www.baeldung.com/curl-rest.