NAV

Introduction

The Forge API allows you to create and interact with servers and sites on Laravel Forge through a simple REST API.

Authentication

In order to use the API, you should authenticate your request by including your API key as a bearer token value:

Authorization: Bearer API_KEY_HERE

Headers

Make sure you have the following content type headers are set on every request:

Accept: application/json Content-Type: application/json

Errors

Forge uses conventional HTTP response codes to indicate the success or failure of an API request. The table below contains a summary of the typical response codes:

Code Description
200 Everything is ok.
400 Valid data was given but the request has failed.
401 No valid API Key was given.
404 The request resource could not be found.
422 The payload has missing required parameters or invalid data was given.
429 Too many attempts.
500 Request failed due to an internal error in Forge.
503 Forge is offline for maintenance.

Servers

Create Server

Payload

{
    "provider": "ocean2",
    "credential_id": 1,
    "name": "test-via-api",
    "size": "512MB",
    "database": "test123",
    "php_version": "php71",
    "region": "ams2"
}

Response

{
    "server": {
        "id": 16,
        "credential_id": 1,
        "name": "test-via-api",
        "size": "512MB",
        "region": "Amsterdam 2",
        "php_version": "php71",
        "ip_address": null,
        "private_ip_address": null,
        "blackfire_status": null,
        "papertrail_status": null,
        "revoked": false,
        "created_at": "2016-12-15 15:04:05",
        "is_ready": false,
        "network": []
    },
    "sudo_password": "baracoda",
    "database_password": "spotted_eagle_ray"
}

HTTP Request

POST /api/v1/servers

Parameters

Key Description
provider The server provider. Valid values are ocean2 for Digital Ocean, linode, aws, and custom.
credential_id This is only required when the provider is not custom.
region The name of the region where the server will be created. This value is not required you are building a Custom VPS server. Valid region identifiers.
ip_address The IP Address of the server. Only required when the provider is custom.
private_ip_address The Private IP Address of the server. Only required when the provider is custom.
php_version Valid values are php71, php70, and php56.
database The name of the database Forge should create when building the server. If omitted, forge will be used.
maria Indicates if MariaDB should be installed. Otherwise, MySQL will be installed.
load_balancer Determines if the server should be provisioned as a load balancer.
network An array of server IDs that the server should be able to connect to.

Server Status

Servers take about 10 minutes to provision. Once the server is ready to be used, the is_ready parameter on the server will be true. You should not repeatedly ping the Forge API asking if the server is ready. Instead, consider pinging the endpoint once every 2 minutes.

Valid Sizes

Forge accepts a human readable size and then validates it according to the acceptable values for each provider, a sample of valid sizes can be: 512MB, 1GB, 15GB, ...

Digital Ocean offers "high memory" servers. Forge supports creating these kinds of servers by passing any of the following values in the size parameter: m-16GB, m-32GB, and m-64GB.

Custom VPS

While creating a custom VPS, the response of this endpoint will contain a provision_command attribute:

{
    "provision_command": "wget -O forge.sh https://..."
}

List Servers

Response

{
    "servers": [
        {
            "id": 1,
            "credential_id": 1,
            "name": "test-via-api",
            "size": "512MB",
            "region": "Amsterdam 2",
            "php_version": "php71",
            "ip_address": "37.139.3.148",
            "private_ip_address": "10.129.3.252",
            "blackfire_status": null,
            "papertrail_status": null,
            "revoked": false,
            "created_at": "2016-12-15 18:38:18",
            "is_ready": true,
            "network": []
        }
    ]
}

HTTP Request

GET /api/v1/servers

Get Server

Response

{
    "server": {
        "id": 1,
        "credential_id": 1,
        "name": "test-via-api",
        "size": "512MB",
        "region": "Amsterdam 2",
        "php_version": "php71",
        "ip_address": "37.139.3.148",
        "private_ip_address": "10.129.3.252",
        "blackfire_status": null,
        "papertrail_status": null,
        "revoked": false,
        "created_at": "2016-12-15 18:38:18",
        "is_ready": true,
        "network": []
    }
}

HTTP Request

GET /api/v1/servers/{id}

Update Server

Payload

{
    "name": "renamed-server",
    "size": "512MB",
    "ip_address": "192.241.143.108",
    "private_ip_address": "10.136.8.40",
    "max_upload_size": 123,
    "network": [2, 3]
}

Response

{
    "server": {
        "id": 16,
        "credential_id": 1,
        "name": "test-via-api",
        "size": "512MB",
        "region": "Amsterdam 2",
        "php_version": "php71",
        "ip_address": null,
        "private_ip_address": null,
        "blackfire_status": null,
        "papertrail_status": null,
        "revoked": false,
        "created_at": "2016-12-15 15:04:05",
        "is_ready": false,
        "network": [2, 3]
    }
}

HTTP Request

PUT /api/v1/servers/{id}

Update Database Password

Payload

{
    "password": "maeve"
}

HTTP Request

PUT /api/v1/servers/{serverId}/database-password

This endpoint will update Forge's copy of the primary database password which should be used to authenticate the creation of new databases and database users. This is typically only needed if you are working with a Forge server that was built before database administration was added to Forge.

Delete Server

HTTP Request

DELETE /api/v1/servers/{id}

Reboot Server

HTTP Request

POST /api/v1/servers/{id}/reboot

Revoke Forge access to server

HTTP Request

POST /api/v1/servers/{id}/revoke

Reconnect revoked server

Response

{
    "public_key": "CONTENT_OF_THE_PUBLIC_KEY"
}

HTTP Request

POST /api/v1/servers/{id}/reconnect

This endpoint will return an SSH key which you will need to add to the server. Once the key has been added to the server, you may "reactivate" it.

Reactivate revoked server

HTTP Request

POST /api/v1/servers/{id}/reactivate

Services

Reboot MySQL

HTTP Request

POST /api/v1/servers/{id}/mysql/reboot

Stop MySQL

HTTP Request

POST /api/v1/servers/{id}/mysql/stop

Reboot Nginx

HTTP Request

POST /api/v1/servers/{id}/nginx/reboot

Stop Nginx

HTTP Request

POST /api/v1/servers/{id}/nginx/stop

Reboot Postgres

HTTP Request

POST /api/v1/servers/{id}/postgres/reboot

Stop Postgres

HTTP Request

POST /api/v1/servers/{id}/postgres/stop

Install Blackfire

Payload

{
    "server_id": "...",
    "server_token": "..."
}

HTTP Request

POST /api/v1/servers/{id}/blackfire/install

Remove Blackfire

HTTP Request

DELETE /api/v1/servers/{id}/blackfire/remove

Install Papertrail

Payload

{
    "host": "192.241.143.108"
}

HTTP Request

POST /api/v1/servers/{id}/papertrail/install

Remove Papertrail

HTTP Request

DELETE /api/v1/servers/{id}/papertrail/remove

Daemons

Create Daemon

Payload

{
    "command": "COMMAND",
    "user": "root"
}

Response

{
    "daemon": {
        "id": 1,
        "command": "COMMAND",
        "user": "root",
        "status": "installing",
        "created_at": "2016-12-16 15:46:22"
    }
}

HTTP Request

POST /api/v1/servers/{serverId}/daemons

List Daemons

Response

{
    "daemons": [
        {
            "id": 1,
            "command": "COMMAND",
            "user": "root",
            "status": "installing",
            "created_at": "2016-12-16 15:46:22"
        }
    ]
}

HTTP Request

GET /api/v1/servers/{serverId}/daemons

Get Daemon

Response

{
    "daemon": {
        "id": 1,
        "command": "COMMAND",
        "user": "root",
        "status": "installing",
        "created_at": "2016-12-16 15:46:22"
    }
}

HTTP Request

GET /api/v1/servers/{serverId}/daemons/{daemonId}

Delete Daemon

HTTP Request

DELETE /api/v1/servers/{serverId}/daemons/{daemonId}

Restart Daemon

HTTP Request

POST /api/v1/servers/{serverId}/daemons/{daemonId}/restart

Firewall Rules

Create Rule

Payload

{
    "name": "rule name",
    "port": 88
}

Response

{
    "rule": {
        "id": 4,
        "name": "rule",
        "port": 123,
        "ip_address": null,
        "status": "installing",
        "created_at": "2016-12-16 15:50:17"
    }
}

HTTP Request

POST /api/v1/servers/{serverId}/firewall-rules

List Rules

Response

{
    "rules": [
        {
            "id": 4,
            "name": "rule",
            "port": 123,
            "ip_address": null,
            "status": "installing",
            "created_at": "2016-12-16 15:50:17"
        }
    ]
}

HTTP Request

GET /api/v1/servers/{serverId}/firewall-rules

Get Rule

Response

{
    "rule": {
        "id": 4,
        "name": "rule",
        "port": 123,
        "ip_address": null,
        "status": "installing",
        "created_at": "2016-12-16 15:50:17"
    }
}

HTTP Request

GET /api/v1/servers/{serverId}/firewall-rules/{ruleId}

Delete Rule

HTTP Request

DELETE /api/v1/servers/{serverId}/firewall-rules/{ruleId}

Scheduled Jobs

Create Job

Payload

{
    "command": "COMMAND_THE_JOB_RUNS",
    "frequency": "custom",
    "user": "root",
    "minute": "*",
    "hour": "*",
    "day": "*",
    "month": "*",
    "weekday": "*"
}

Response

{
    "job": {
        "id": 2,
        "command": "COMMAND_THE_JOB_RUNS",
        "user": "root",
        "frequency": "Nightly",
        "cron": "0 0 * * *",
        "status": "installing",
        "created_at": "2016-12-16 15:56:59"
    }
}

HTTP Request

POST /api/v1/servers/{serverId}/jobs

Parameters

Key Description
frequency The frequency in which the job should run. Valid values are minutely, hourly, nightly, weekly, monthly, and custom
minute Required if the frequency is custom.
hour Required if the frequency is custom.
day Required if the frequency is custom.
month Required if the frequency is custom.
weekday Required if the frequency is custom.

List Jobs

Response

{
    "jobs": [
        {
            "id": 2,
            "command": "COMMAND_THE_JOB_RUNS",
            "user": "root",
            "frequency": "nightly",
            "cron": "0 0 * * *",
            "status": "installing",
            "created_at": "2016-12-16 15:56:59"
        }
    ]
}

HTTP Request

GET /api/v1/servers/{serverId}/jobs

Get Job

Response

{
    "job": {
        "id": 2,
        "command": "COMMAND_THE_JOB_RUNS",
        "user": "root",
        "frequency": "Nightly",
        "cron": "0 0 * * *",
        "status": "installing",
        "created_at": "2016-12-16 15:56:59"
    }
}

HTTP Request

GET /api/v1/servers/{serverId}/jobs/{jobId}

Delete Job

HTTP Request

DELETE /api/v1/servers/{serverId}/jobs/{jobId}

PHP

Upgrade to PHP7.1

HTTP Request

POST /api/v1/servers/{serverId}/php/upgrade

Enable OPCache

HTTP Request

POST /api/v1/servers/{serverId}/php/opcache

Disable OPCache

HTTP Request

DELETE /api/v1/servers/{serverId}/php/opcache

MySQL Databases

Create Database

Payload

{
    "name": "forge",
    "user": "forge",
    "password": "dolores"
}

Response

{
    "database": {
        "id": 1,
        "name": "forge",
        "status": "installing",
        "created_at": "2016-12-16 16:12:22"
    }
}

HTTP Request

POST /api/v1/servers/{serverId}/mysql

Parameters

Key Description
user This field is optional. If passed, it will be used to create a new MySQL user with access to the newly created database.
password This field is only required when a user value is given.

List Databases

Response

{
    "databases": [
        {
            "id": 1,
            "name": "forge",
            "status": "installing",
            "created_at": "2016-12-16 16:12:22"
        }
    ]
}

HTTP Request

GET /api/v1/servers/{serverId}/mysql

Get Database

Response

{
    "database": {
        "id": 1,
        "name": "forge",
        "status": "installing",
        "created_at": "2016-12-16 16:12:22"
    }
}

HTTP Request

GET /api/v1/servers/{serverId}/mysql/{databaseId}

Delete Database

HTTP Request

DELETE /api/v1/servers/{serverId}/mysql/{databaseId}

MySQL Database Users

Create User

Payload

{
    "name": "forge",
    "password": "dolores",
    "databases": [1]
}

Response

{
    "user": {
        "id": 2,
        "name": "forge",
        "status": "installing",
        "created_at": "2016-12-16 16:19:01",
        "databases": [
            1
        ]
    }
}

HTTP Request

POST /api/v1/servers/{serverId}/mysql-users

Parameters

Key Description
databases An array of database IDs referencing the databases the user has access to.

List Users

Response

{
    "users": [
        {
            "id": 2,
            "name": "forge",
            "status": "installing",
            "created_at": "2016-12-16 16:19:01",
            "databases": [
                1
            ]
        }
    ]
}

HTTP Request

GET /api/v1/servers/{serverId}/mysql-users

Get User

Response

{
    "user": {
        "id": 2,
        "name": "forge",
        "status": "installing",
        "created_at": "2016-12-16 16:19:01",
        "databases": [
            1
        ]
    }
}

HTTP Request

GET /api/v1/servers/{serverId}/mysql-users/{userId}

Update User

Payload

{
    "databases": [2]
}

Response

{
    "user": {
        "id": 2,
        "name": "forge",
        "status": "installing",
        "created_at": "2016-12-16 16:19:01",
        "databases": [
            1
        ]
    }
}

HTTP Request

PUT /api/v1/servers/{serverId}/mysql-users/{userId}

This endpoint may be used to update the databases the MySQL user has access to.

Delete User

HTTP Request

DELETE /api/v1/servers/{serverId}/mysql-users/{userId}

Sites

Create Site

Payload

{
    "domain": "site.com",
    "project_type": "php",
    "directory": "/test"
}

Response

{
    "site": {
        "id": 2,
        "name": "site.com",
        "directory": "/test",
        "wildcards": false,
        "status": "installing",
        "repository": null,
        "repository_provider": null,
        "repository_branch": null,
        "repository_status": null,
        "quick_deploy": false,
        "project_type": "php",
        "app": null,
        "app_status": null,
        "hipchat_room": null,
        "slack_channel": null,
        "created_at": "2016-12-16 16:38:08"
    }
}

HTTP Request

POST /api/v1/servers/{serverId}/sites

Available site types

Key Description
php General PHP/Laravel Application.
html Static HTML site.
Symfony Symfony Application.
symfony_dev Symfony (Dev) Application.

List Sites

Response

{
    "sites": [
        {
            "id": 2,
            "name": "site.com",
            "directory": "/test",
            "wildcards": false,
            "status": "installing",
            "repository": null,
            "repository_provider": null,
            "repository_branch": null,
            "repository_status": null,
            "quick_deploy": false,
            "project_type": "php",
            "app": null,
            "app_status": null,
            "hipchat_room": null,
            "slack_channel": null,
            "created_at": "2016-12-16 16:38:08"
        }
    ]
}

HTTP Request

GET /api/v1/servers/{serverId}/sites

Get Site

Response

{
    "site": {
        "id": 2,
        "name": "site.com",
        "directory": "/test",
        "wildcards": false,
        "status": "installing",
        "repository": null,
        "repository_provider": null,
        "repository_branch": null,
        "repository_status": null,
        "quick_deploy": false,
        "project_type": "php",
        "app": null,
        "app_status": null,
        "hipchat_room": null,
        "slack_channel": null,
        "created_at": "2016-12-16 16:38:08"
    }
}

HTTP Request

GET /api/v1/servers/{serverId}/sites/{siteId}

Update Site

Payload

{
    "directory": "/some/path"
}

Response

{
    "site": {
        "id": 2,
        "name": "site.com",
        "directory": "/some/path",
        "wildcards": false,
        "status": "installing",
        "repository": null,
        "repository_provider": null,
        "repository_branch": null,
        "repository_status": null,
        "quick_deploy": false,
        "project_type": "php",
        "app": null,
        "app_status": null,
        "hipchat_room": null,
        "slack_channel": null,
        "created_at": "2016-12-16 16:38:08"
    }
}

HTTP Request

PUT /api/v1/servers/{serverId}/sites/{siteId}

This endpoint may be used to update the "web directory" for a given site.

Delete Site

HTTP Request

DELETE /api/v1/servers/{serverId}/sites/{siteId}

Load Balancing

Payload

{
    "servers": [2,3]
}

HTTP Request

POST /api/v1/servers/{serverId}/sites/{siteId}/balancing

If the server is a load balancer, this endpoint may be used to specify the servers the load balancer should send traffic to.

SSL Certificates

Create Certificate

Payload

{
    "type": "new",
    "domain": "domain.com",
    "country": "US",
    "state": "NY",
    "city": "New York",
    "organization": "Company Name",
    "department": "IT"
}

Response

{
    "certificate": {
        "domain": "domain.com",
        "request_status": "creating",
        "created_at": "2016-12-17 07:02:35",
        "id": 3,
        "existing": false,
        "active": false
    }
}

HTTP Request

POST /api/v1/servers/{serverId}/sites/{siteId}/certificates

Installing An Existing Certificate

Payload

{
    "type": "existing",
    "key": "PRIVATE_KEY_HERE",
    "certificate": "CERTIFICATE_HERE"
}

Response

{
    "certificate": {
        "domain": "domain.com",
        "request_status": "creating",
        "created_at": "2016-12-17 07:02:35",
        "id": 3,
        "existing": false,
        "active": false
    }
}

HTTP Request

POST /api/v1/servers/{serverId}/sites/{siteId}/certificates

Cloning An Existing Certificate

Payload

{
    "type": "clone",
    "certificate_id": 1
}

Response

{
    "certificate": {
        "domain": "domain.com",
        "request_status": "creating",
        "created_at": "2016-12-17 07:02:35",
        "id": 3,
        "existing": false,
        "active": false
    }
}

HTTP Request

POST /api/v1/servers/{serverId}/sites/{siteId}/certificates

Obtain A LetsEncrypt Certificate

Payload

{
    "domains": ["www.site.com"]
}

Response

{
    "certificate": {
        "domain": "www.test.com",
        "type": "letsencrypt",
        "request_status": "created",
        "status": "installing",
        "created_at": "2017-02-09 17:14:34",
        "id": 1,
        "existing": true,
        "active": false
    }
}

HTTP Request

POST /api/v1/servers/{serverId}/sites/{siteId}/certificates/letsencrypt

List Certificates

Response

{
    "certificates": [
        {
            "domain": "domain.com",
            "request_status": "creating",
            "created_at": "2016-12-17 07:02:35",
            "id": 3,
            "existing": false,
            "active": false
        }
    ]
}

HTTP Request

GET /api/v1/servers/{serverId}/sites/{siteId}/certificates

Get Certificate

Response

{
    "certificate": {
        "domain": "domain.com",
        "request_status": "creating",
        "created_at": "2016-12-17 07:02:35",
        "id": 3,
        "existing": false,
        "active": false
    }
}

HTTP Request

GET /api/v1/servers/{serverId}/sites/{siteId}/certificates/{id}

Get Signing Request

HTTP Request

GET /api/v1/servers/{serverId}/sites/{siteId}/certificates/{id}/csr

This endpoint may be used to get the full certificate signing request content.

Install Certificate

Payload

{
    "certificate": "certificate content",
    "add_intermediates": false
}

HTTP Request

POST /api/v1/servers/{serverId}/sites/{siteId}/certificates/{id}/install

Activate Certificate

HTTP Request

POST /api/v1/servers/{serverId}/sites/{siteId}/certificates/{id}/activate

Delete Certificate

HTTP Request

DELETE /api/v1/servers/{serverId}/sites/{siteId}/certificates/{id}

SSH Keys

Create Key

Payload

{
    "name": "test-key",
    "key": "KEY_CONTENT_HERE"
}

Response

{
    "key": {
        "id": 9,
        "name": "test-key",
        "status": "installing",
        "created_at": "2016-12-16 16:31:16"
    }
}

HTTP Request

POST /api/v1/servers/{serverId}/keys

List Keys

Response

{
    "keys": [
        {
            "id": 9,
            "name": "test-key",
            "status": "installing",
            "created_at": "2016-12-16 16:31:16"
        }
    ]
}

HTTP Request

GET /api/v1/servers/{serverId}/keys

Get Key

Response

{
    "key": {
        "id": 9,
        "name": "test-key",
        "status": "installing",
        "created_at": "2016-12-16 16:31:16"
    }
}

HTTP Request

GET /api/v1/servers/{serverId}/keys/{keyId}

Delete Key

HTTP Request

DELETE /api/v1/servers/{serverId}/keys/{keyId}

Workers

Create Worker

Payload

{
    "connection": "sqs",
    "timeout": 90,
    "sleep": 60,
    "tries": null,
    "processes": 1,
    "daemon": true
}

Response

{
    "worker": {
        "id": 1,
        "connection": "rule",
        "command": "php /home/forge/default/artisan queue:work rule --sleep=60 --daemon --quiet --timeout=90",
        "queue": null,
        "timeout": 90,
        "sleep": 60,
        "tries": null,
        "processes": 1,
        "environment": null,
        "daemon": 1,
        "status": "installing",
        "created_at": "2016-12-17 07:15:03"
    }
}

HTTP Request

POST /api/v1/servers/{serverId}/sites/{siteId}/workers

List Workers

Response

{
    "workers": [
        {
            "id": 1,
            "connection": "rule",
            "command": "php /home/forge/default/artisan queue:work rule --sleep=60 --daemon --quiet --timeout=90",
            "queue": null,
            "timeout": 90,
            "sleep": 60,
            "tries": null,
            "processes": 1,
            "environment": null,
            "daemon": 1,
            "status": "installing",
            "created_at": "2016-12-17 07:15:03"
        }
    ]
}

HTTP Request

GET /api/v1/servers/{serverId}/sites/{siteId}/workers

Get Worker

Response

{
    "worker": {
        "id": 1,
        "connection": "rule",
        "command": "php /home/forge/default/artisan queue:work rule --sleep=60 --daemon --quiet --timeout=90",
        "queue": null,
        "timeout": 90,
        "sleep": 60,
        "tries": null,
        "processes": 1,
        "environment": null,
        "daemon": 1,
        "status": "installing",
        "created_at": "2016-12-17 07:15:03"
    }
}

HTTP Request

GET /api/v1/servers/{serverId}/sites/{siteId}/workers/{id}

Delete Worker

HTTP Request

DELETE /api/v1/servers/{serverId}/sites/{siteId}/workers/{id}

Restart Worker

HTTP Request

POST /api/v1/servers/{serverId}/sites/{siteId}/workers/{id}/restart

Deployment

Enable Quick Deployment

HTTP Request

POST /api/v1/servers/{serverId}/sites/{siteId}/deployment

Disable Quick Deployment

HTTP Request

DELETE /api/v1/servers/{serverId}/sites/{siteId}/deployment

Get Deployment Script

The response is a string for this request.

HTTP Request

GET /api/v1/servers/{serverId}/sites/{siteId}/deployment/script

Update Deployment Script

Payload

{
    "content": "CONTENT_OF_THE_SCRIPT"
}

HTTP Request

PUT /api/v1/servers/{serverId}/sites/{siteId}/deployment/script

Deploy Now

HTTP Request

POST /api/v1/servers/{serverId}/sites/{siteId}/deployment/deploy

Reset Deployment Status

HTTP Request

POST /api/v1/servers/{serverId}/sites/{siteId}/deployment/reset

Get Deployment Log

The response is a string for this request.

HTTP Request

GET /api/v1/servers/{serverId}/sites/{siteId}/deployment/log

Configuration Files

Get Nginx Configuration

The response is a string for this request.

HTTP Request

GET /api/v1/servers/{serverId}/sites/{siteId}/nginx

Update Nginx Configuration

Payload

{
    "content": "CONTENT"
}

HTTP Request

PUT /api/v1/servers/{serverId}/sites/{siteId}/nginx

Get .env File

The response is a string for this request.

HTTP Request

GET /api/v1/servers/{serverId}/sites/{siteId}/env

Update .env File

Payload

{
    "content": "CONTENT"
}

HTTP Request

PUT /api/v1/servers/{serverId}/sites/{siteId}/env

git Projects

Install New

Payload

{
    "provider": "github",
    "repository": "username/repository"
}

HTTP Request

POST /api/v1/servers/{serverId}/sites/{siteId}/git

Remove Project

HTTP Request

DELETE /api/v1/servers/{serverId}/sites/{siteId}/git

WordPress

Install

Payload

{
    "database": "forge",
    "user": "forge"
}

HTTP Request

POST /api/v1/servers/{serverId}/sites/{siteId}/wordpress

Uninstall WordPress

HTTP Request

DELETE /api/v1/servers/{serverId}/sites/{siteId}/wordpress

This endpoint will uninstall WordPress and revert the site back to a default state.

Recipes

Create Recipe

Payload

{
    "name": "Recipe Name",
    "user": "root",
    "script": "SCRIPT_CONTENT"
}

Response

{
    "recipe": {
        "id": 1,
        "name": "Recipe Name",
        "user": "root",
        "script": "SCRIPT_CONTENT",
        "created_at": "2016-12-16 16:24:05"
    }
}

HTTP Request

POST /api/v1/recipes

List Recipes

Response

{
    "recipes": [
        {
            "id": 1,
            "name": "Recipe Name",
            "user": "root",
            "script": "SCRIPT_CONTENT",
            "created_at": "2016-12-16 16:24:05"
        }
    ]
}

HTTP Request

GET /api/v1/recipes

Get Recipe

Response

{
    "recipe": {
        "id": 1,
        "name": "Recipe Name",
        "user": "root",
        "script": "SCRIPT_CONTENT",
        "created_at": "2016-12-16 16:24:05"
    }
}

HTTP Request

GET /api/v1/recipes/{recipeId}

Update Recipe

Payload

{
    "name": "Recipe Name",
    "user": "root",
    "script": "SCRIPT_CONTENT"
}

Response

{
    "recipe": {
        "id": 1,
        "name": "Recipe Name",
        "user": "root",
        "script": "SCRIPT_CONTENT",
        "created_at": "2016-12-16 16:24:05"
    }
}

HTTP Request

PUT /api/v1/recipes/{recipeId}

Delete Recipe

HTTP Request

DELETE /api/v1/recipes/{recipeId}

Run Recipe

Payload

{
    "servers": [1,2]
}

HTTP Request

POST /api/v1/recipes/{recipeId}/run

Regions

Digital Ocean Regions

Key Region
ams2 Amsterdam 2
ams3 Amsterdam 3
blr1 Bangalore
lon1 London
fra1 Frankfurt
nyc1 New York 1
nyc2 New York 2
nyc3 New York 3
sfo1 San Francisco 1
sfo2 San Francisco 2
sgp1 Singapore
tor1 Toronto

AWS Regions

Key Region
us-west-1 California
eu-west-1 Ireland
eu-central-1 Frankfurt
ap-south-1 Mumbai
us-west-2 Oregon
sa-east-1 Sao Paulo
ap-northeast-2 Seoul
ap-southeast-1 Singapore
ap-southeast-2 Sydney
ap-northeast-1 Tokyo
us-east-1 Virginia

Linode Regions

Key Region
4 Atlanta
2 Dallas
1 Frankfurt
3 Fremont
7 London
6 Newark
9 Singapore
8 Tokyo

Rackspace Regions

Key Region
ORD Chicago
DFW Dallas
HKG Hong Kong
LON London
IAD Virginia
SYD Sydney

Server Sizes

Digital Ocean

Key Description
512MB 512MB RAM - 1 CPU Core - 20GB SSD
1GB 1GB RAM - 1 CPU Core - 30GB SSD
2GB" 2GB RAM - 2 CPU Cores - 40GB SSD
4GB 4GB RAM - 2 CPU Cores - 60GB SSD
8GB 8GB RAM - 4 CPU Cores - 80GB SSD
16GB 16GB RAM - 8 CPU Cores - 160GB SSD
m-16GB 16GB RAM (High Memory) - 2 CPU Cores - 30GB SSD
32GB 32GB RAM - 12 CPU Cores - 320GB SSD
m-32GB 32GB RAM (High Memory) - 4 CPU Cores - 90GB SSD
64GB 64GB RAM - 20 CPU Cores - 640GB SSD
m-64GB 64GB RAM (High Memory) - 8 CPU Cores - 200GB SSD

AWS

Key Description
512MB 0.5 GiB RAM - 1 vCPU
1GB 1 GiB RAM - 1 vCPU
2GB 2 GiB RAM - 1 vCPU
4GB 4 GiB RAM - 2 vCPUs
8GB 8 GiB RAM - 2 vCPUs
16GB 16 GiB RAM - 4 vCPUs
32GB 32 GiB RAM - 8 vCPUs
64GB 64 GiB RAM - 16 vCPUs

Linode

Key Description
1GB 1GB RAM - 1 CPU Cores - 20GB SSD
2GB 2GB RAM - 1 CPU Cores - 30GB SSD
4GB 4GB RAM - 2 CPU Cores - 48GB SSD
8GB 8GB RAM - 4 CPU Cores - 96GB SSD
12GB 12GB RAM - 6 CPU Cores - 192GB SSD
16GB 16GB RAM - 1 CPU Cores - 20GB SSD
32GB 32GB RAM - 2 CPU Cores - 40GB SSD
60GB 60GB RAM - 4 CPU Cores - 90GB SSD
100GB 100GB RAM - 8 CPU Cores - 100GB SSD
200GB 200GB RAM - 16 CPU Cores - 340GB SSD

Credentials

List

Response

{
  "credentials": [
    {
      "id": 1,
      "type": "ocean2",
      "name": "Personal"
    }
  ]
}

HTTP Request

GET /api/v1/credentials