Deprecation Notice - RunCloud API Beta is deprecated effective 31 May 2019. New API will be released and it's not backward compatible.

Introduction

This API docs will evolve from time to time depending on feature that we are adding. Please note that there will be NO API VERSIONING. Please treat our API as beta stage and may evolve from time to time without further notice.

Get Started

To get started with API, you need a RunCloud account. If you don't have one, you can create a new account here.

Once you have created the account, you can use API Key and API Secret that you can get from the profile menu to use our API.

API endpoint

The base URL for our API is

https://manage.runcloud.io/base-api/
All request to the API must be made over HTTPS.
All request and response will be in JSON formatted output.
Asynchronous

If you are creating any object from the API, the response you will get from POST request will not contain the object that you are creating since the process is asynchronous. If the process is not asynchronous, we will add the object that you have created inside response.

Sometimes you may found _links inside response data. This is due to our panel https://manage.runcloud.io is also using the same API. However, they are different in path. So, you may found the link start from /api instead of /base-api. If you want to use _link resources, you need to rewrite the /api to /base-api.

Authentication

We are using Basic Authentication for Authentication

For every request made to RunCloud API, you need to supply API Key and API Secret as Basic Authentication.

You can get API Key and API Secret inside your Settings > API Key.

Once you have got your API Key and Secret, you can test the authentication by sending GET request to /ping endpoint

Request
curl -X GET "https://manage.runcloud.io/base-api/ping" \
    -u YOUR_API_KEY:YOUR_API_SECRET \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"

If your request is successful, you will get pong message as the output.

Response
{
	"message": "pong"
}
HTTP Response

We are using standard HTTP response codes that is familiar to API development.

HTTP CodeExplanation
200Ok (Usually you will get this code)
401Authentication failed. This is due to wrong API Key and/or API Secret
403Forbidden request
422Unprocessable Entity. You will expect this HTTP Code if you send incomplete data for POST / PATCH request
404Not found. The resources you are trying to reach is unavailable
429Too Many Request. You will get this HTTP Code if you have exceeded our rate limits
500, 502, 503, 504Server Errors. If you get this error, it is coming from our side. Just make sure you know how to handle it.

Each HTTP code output may carry some message. You may use the message to output to your application that you are building.

Rate Limit

We placed rate limit to every endpoint to allow fair usage for each users.

The rate limit is 60 requests/minute. All request to our endpoint will be count.

Additonally, we send X-RateLimit-Limit and X-RateLimit-Remaining header for each requests.

Once you have exceeded the rate limit, you will receive 429 HTTP Status Code indicating Too Many Requests.