Platform API

API Overview

Estimated reading: 3 minutes 704 views

The API empowers developers to streamline a series of essential actions throughout the application lifecycle and enhances the platform’s capabilities by integrating it with various services. Through our platform API, you have the capability to automatically generate environments, launch applications, and conduct additional tasks that were previously exclusive to the platform dashboard (though not restricted to these responsibilities).

The Platform API adheres to REST principles. A REST API defines a collection of functions that developers can request and subsequently receive a response for. This interaction occurs through the HTTP protocol. The benefit of this methodology lies in the extensive reach of the HTTP protocol, enabling the REST API to be compatible with nearly all programming languages.

How to Use Platform API

All API calls are GET or POST HTTP requests to the URL with a set of parameters:

https://[hoster-api-host]/1.0/

[hoster-api-host] – You can get this information from here. The “User Environment Domain(s)” field corresponds to the URL type for API access.

Each method is provided with a response example. The request’s response is UTF-8 encoded.

Request Parameters

Each request has a set of mandatory parameters that are required to execute the called operation. Additionally, methods can have optional parameters for the request customization (e.g. to perform extra actions). You can find a list of all parameters for a particular method within the API documentation.

All API methods require authentication and action target details, provided through the appropriate session (token) (mandatory) and envName (appid)  parameters.

The text value of the parameters should be provided in the UTF-8 code. The sequence of the parameters in the request is not important.

Request Authentication

The session (token) parameter is responsible for authentication, i.e. it determines the user who performs the action.

You can get either generate session id or you can use API token for this parameter.

API Token – You can generate API toke from the user account. Here is how you can generate API access token.

Session ID – You can get your session by calling the Users> Authentication> Signin method. Due to security reasons, this API method (and other ones that require a password as a parameter, e.g. signup or change password) can be called via POST request only. After obtaining a session, you can use it to authenticate and execute other methods.

It is recommended to close the working session after completing all the needed operations with API – call the Users> Authentication> Signout method.

Request Target

The request’s target is defined with one of the following parameters:

  • appid (optional – when method is target to user account) – specifies the action target. To simplify API usage, this parameter can be omitted if the default “dashboard” value is used (i.e. when the API method is applied to the current user account)
  • envName – a user-friendly alias for the appid parameter if the method is applied to the specific environment within the current user account

Platform API Response

The response will not include the information of the parameter with the null value.

Leave a Comment