Choose a category from the left to browse the available API commands.
The LayerStack API allows you to manage LayerStack Cloud Servers with RestFUL API using HTTP request.
All API endpoints are relative to the base URL. The base URL is LayerStack API is https://api.layerpanel.com/api. Therefore, /cloudserver
endpoint refers to https://api.layerpanel.com/api/cloudserver.
The following types of requests are supported by LayerStack API:
HTTP Method | Usage |
---|---|
GET |
For retrieval of information about your environment or account. Response will be returned as a JSON object. |
POST |
for creating a new object in your account or environment |
PUT |
For updating resources of information in your account or environment |
DELETE |
For destroying or removing an object or resource in your account or environment |
Each request will have its own parameters. Refer to the documentation of each endpoint for parameters details.
Response for LayerStack API will include standard HTTP statuses including error codes. Specific error messages would be provided for different API calls. The following explains the meaning of different status codes in general.
Status Code | Message | Explanation |
---|---|---|
200 | OK |
The default success code. |
201 | Object created |
The success code return after POST method created an object. |
204 | No content |
Request completed successfully but no content to return. |
206 | Partial content |
There are more results available. The pagination information can be found in metadata via HEAD method. |
400 | Bad request |
The request is not valid. Possible reason can be missing parameters. |
401 | Unauthorized |
The authentication failed. |
403 | Forbidden |
The user is authenticated but is disallowed from performing the action. |
404 | Not Found |
The request URI is not found. |
422 | Unprocessable Entity |
Validation error. |
429 | Too Many Requests |
Limit reached for number of request sent. |
500 | Internal server error |
Please contact our support. |
503 | Service unavailable |
Please contact our support. |
Response of LayerStack API is in JSON format.
An Access token is needed for a complete authentication request. Include your access token as HTTP header in your request. The Access token can be obtained from User Profile & Settings Page.
Headers required
AccessToken
your API token optained from panel.
Account
your Account ID in XX-12345678 format.
Object ids are unique system wide. It is a 12 char string. It is used for identifying objects such as cloud servers.