HTTP API

The HTTP API can be used to programmatically manage your hosts.

Authentication is with an Authorization header containing your API token:

Authorization: Token <hex string>

Creating hosts

POST https://api.orchardup.com/v2/hosts

Attributes

name
the name of the host
size
the size of the host, in MB (optional, default 512)

Example

$ curl https://api.orchardup.com/v2/hosts \
  -H "Authorization: Token AUTH_TOKEN" \
  -d name=test
{
  "id": "8866919b-7610-40d6-bff5-a80150e30e7a",
  "url": "https://api.orchardup.com/v2/hosts/test",
  "name": "test",
  "owner": "d9a269a3-d444-4198-aa20-4f8ab7bfc49e",
  "size": 512,
  "ipv4_address": "162.243.28.224",
  "port": 4243,
  "client_key": "...",
  "client_cert": "...",
  "created_at": "2014-02-10T21:53:49.148"
}

A host is now available at 162.243.28.224 on port 4243. Authentication with the host is done with an SSL client certificate, specified by client_key and client_cert in the API response.

Listing hosts

GET https://api.orchardup.com/v2/hosts

Example

$ curl https://api.orchardup.com/v2/hosts \
  -H "Authorization: Token AUTH_TOKEN"
[
  {
    "id": "8866919b-7610-40d6-bff5-a80150e30e7a",
    "url": "https://api.orchardup.com/v2/hosts/test",
    "name": "test",
    "owner": "d9a269a3-d444-4198-aa20-4f8ab7bfc49e",
    "size": 512,
    "ipv4_address": "162.243.28.224",
    "port": 4243,
    "client_key": "...",
    "client_cert": "...",
    "created_at": "2014-02-10T21:53:49.148"
  }
]

Retrieving a host

GET https://api.orchardup.com/v2/hosts/{NAME_OR_ID}

Example

$ curl https://api.orchardup.com/v2/hosts/test \
  -H "Authorization: Token AUTH_TOKEN"
{
  "id": "8866919b-7610-40d6-bff5-a80150e30e7a",
  "url": "https://api.orchardup.com/v2/hosts/test",
  "name": "test",
  "owner": "d9a269a3-d444-4198-aa20-4f8ab7bfc49e",
  "size": 512,
  "ipv4_address": "162.243.28.224",
  "port": 4243,
  "client_key": "...",
  "client_cert": "...",
  "created_at": "2014-02-10T21:53:49.148"
}

Deleting a host

DELETE https://api.orchardup.com/v2/hosts/{NAME_OR_ID}

Example

$ curl https://api.orchardup.com/v2/hosts/test \
  -H "Authorization: Token AUTH_TOKEN" \
  -X DELETE