Cloudron API (1.0.0)

Download OpenAPI specification:Download

Cloudron provides a RESTful API to manage all aspects of the Cloudron like adding users, configuring groups and installing apps.

If you are an app developer, the Cloudron CLI tool implements a workflow that allows you to develop apps on your Cloudron. The CLI tool uses the REST API documented here.

The access token can be provided via the request query ?access_token=<token> or the token can be provided via the Authorization header using Bearer <token>.

Cloudron

Initial DNS Setup

Public route and very first call to setup the dashboard domain.

This call has to be made against the raw IP address (eg. https://1.2.3.4 ) accepting self-signed certificates.

A curl example could look like:
curl -k -X POST -H 'Content-Type: application/json' --data '{...}' http://1.2.3.4/api/v1/cloudron/setup

Once called, the process can be tracked through the setup object in the /api/v1/cloudron/status API reply. After the status API returns a success, future API requests must be made to https://my.domain.com.

This routes gets disabled once the Cloudron has been activated.

Request Body schema: application/json
required
object

Responses

Request samples

Content type
application/json
{
  • "dnsConfig":
    {
    }
}

Response samples

Content type
application/json
{ }

Get status

Public route to get status information for this Cloudron.

Responses

Response samples

Content type
application/json
{
  • "version": "5.1.0",
  • "apiServerOrigin": "https://api.cloudron.io",
  • "webServerOrigin": "https://cloudron.io",
  • "provider": "linode",
  • "cloudronName": "My Space",
  • "footer": "&copy; 2020 &nbsp; [Cloudron](https://cloudron.io) &nbsp; &nbsp; &nbsp; [Forum <i class=\"fa fa-comments\"></i>](https://forum.cloudron.io)",
  • "adminFqdn": "my.example.com",
  • "activated": true,
  • "setup":
    {
    },
  • "restore":
    {
    }
}

Activate

Public route to activate the Cloudron. This creates the first user (aka owner) account.

Before installing apps, the Cloudron must be registered with a valid Appstore account as well using the 'Register Cloudron' route.

Request Body schema: application/json
username
required
string

Username. The first user is also called the Owner.

password
required
string

Password. Minimum of 8 characters required.

email
required
string

Primary email of the user.

displayName
string

Full name of the user.

Responses

Request samples

Content type
application/json
{
  • "username": "oksana",
  • "password": "strongPa55word!?",
  • "email": "oksane@example.com",
  • "displayName": "Oksana Muller"
}

Response samples

Content type
application/json
{
  • "userId": "uid-e08ca116-d3e5-43c9-b43f-6eb990be58ea",
  • "token": "sometoken",
  • "expires": "ISO-8601 UTC date"
}

Restore

Public route to restore a whole Cloudron from backup. This is only available until the Cloudron is activated.

Request Body schema: application/json
required
object (BackupConfig)
backupId
required
string
version
required
string
object (SysinfoConfig)

Responses

Request samples

Content type
application/json
{
  • "backupConfig":
    {
    },
  • "backupId": "2020-04-20-161041-646/box_2020-04-20-161045-600_v5.2.0",
  • "version": "5.1.0",
  • "sysinfoConfig":
    {
    }
}

Response samples

Content type
application/json
{ }

API Login

Login to the Cloudron API to obtain an access token

Request Body schema: application/json
username
required
string
password
required
string

Responses

Request samples

Content type
application/json
{
  • "username": "julia",
  • "password": "supersecret"
}

Response samples

Content type
application/json
{
  • "token": "sometoken",
  • "expiresAt": "ISO-8601 UTC date"
}

Get Config

This config object contains the platform configuration.

Responses

Response samples

Content type
application/json
{
  • "apiServerOrigin": "https://api.cloudron.io",
  • "webServerOrigin": "https://cloudron.io",
  • "adminDomain": "example.com",
  • "adminFqdn": "my.example.com",
  • "mailFqdn": "my.example.com",
  • "version": "4.1.2",
  • "isDemo": false,
  • "provider": "linode",
  • "cloudronName": "My Cloudron",
  • "uiSpec": { }
}

Appstore

Register Cloudron

Register this Cloudron with cloudron.io AppStore and enable access to the app library.

Request Body schema: application/json
signup
required
boolean

If true a new cloudron.io account will be created. If an account already exists, this request will return an error. Otherwise, this Cloudron will be assigned to the existing account.

email
required
string <email>
password
required
string
totpToken
string

2FA token. Required when the cloudron.io account already exists and was setup with 2FA.

Responses

Request samples

Content type
application/json
{
  • "signup": false,
  • "email": "julia@example.com",
  • "password": "supersecret",
  • "totpToken": "string"
}

Get Subscription

Responses

Response samples