Cherry Servers API Docs (1.0.0)

Download OpenAPI specification:Download

Authentication

Most of the endpoints require authentication. Authenticating is done with an Bearer Token in the Authorization header.

    curl -H 'Authorization: Bearer my_authentication_token'

Authentication tokens are used to identify the user your application is connecting to the Cherry Servers API on behalf of. Think of authentication tokens as permanent sessions—the user creates authentication tokens, and your app can use them to connect to the API on their behalf until they delete the token.

Users can create authentication tokens in the Cherry Server client portal.

Response codes

Codes in the 2xx range indicate success. Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, a charge failed, etc.). Codes in the 5xx range indicate an error with internal servers.

200, 201, 204 Everything worked as expexted.
400 Bad parameters or request can't be made.
401 No valid API key provided.
403 Insufficient permissions to access resource.
404 Resource doesn't exist.
500 Something went wrong.

Common parameters

List parameters:

Limit Ofset X-Total-Count header

More params: query parameter fields

Images

Retrieve plan oses

path Parameters
planId
required
string
query Parameters
fields
required
string
Default: "images,pricing"
limit
string\d+
Default: 0
offset
string\d+
Default: 0

Responses

200

Returns list of available operating systemsšą

get /v1/plans/{planId}/images
http://api.cherryservers.com/v1/plans/{planId}/images
https://api.cherryservers.com/v1/plans/{planId}/images

Response samples

application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Retrieve custom plan oses

path Parameters
teamId
required
string
planId
required
string
query Parameters
fields
required
string
Default: "images,pricing"
limit
string\d+
Default: 0
offset
string\d+
Default: 0

Responses

200

Returns list of available operating systems

get /v1/teams/{teamId}/plans/{planId}/images
http://api.cherryservers.com/v1/teams/{teamId}/plans/{planId}/images
https://api.cherryservers.com/v1/teams/{teamId}/plans/{planId}/images

Response samples

application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Invitations

Retrieve team invitations

path Parameters
teamId
required
string
query Parameters
fields
required
string
Default: "invitation,href"
limit
string\d+
Default: 0
offset
string\d+
Default: 0

Responses

200

Returns team invitation list

get /v1/teams/{teamId}/invitations
http://api.cherryservers.com/v1/teams/{teamId}/invitations
https://api.cherryservers.com/v1/teams/{teamId}/invitations

Response samples

application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Send inviation

path Parameters
teamId
required
string
query Parameters
fields
required
string
Default: "invitation,href"
Request Body schema: application/json
email
required
string

invitee email

message
required
string
Default: ""
projects
Array of any
roles
required
Array of anyROLE_ADMIN|ROLE_BILLING|ROLE_COLLABORATOR
Default: "ROLE_COLLABORATOR"

Responses

201

Create invitation

post /v1/teams/{teamId}/invitations
http://api.cherryservers.com/v1/teams/{teamId}/invitations
https://api.cherryservers.com/v1/teams/{teamId}/invitations

Request samples

application/json
Copy
Expand all Collapse all
{
  • "email": "string",
  • "message": "",
  • "projects":
    [
    ],
  • "roles": "ROLE_COLLABORATOR"
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "id": 0,
  • "href": "string",
  • "invitee": "string",
  • "message": "string",
  • "updated": "2019-04-18T12:05:33Z",
  • "created": "2019-04-18T12:05:33Z",
  • "invited_by":
    {
    },
  • "team":
    {
    },
  • "roles":
    [
    ],
  • "projects":
    [
    ]
}

View an invitation

path Parameters
invitationId
required
string
query Parameters
fields
required
string
Default: "invitation,href"

Responses

200

Get invitation

get /v1/invitations/{invitationId}
http://api.cherryservers.com/v1/invitations/{invitationId}
https://api.cherryservers.com/v1/invitations/{invitationId}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "id": 0,
  • "href": "string",
  • "invitee": "string",
  • "message": "string",
  • "updated": "2019-04-18T12:05:33Z",
  • "created": "2019-04-18T12:05:33Z",
  • "invited_by":
    {
    },
  • "team":
    {
    },
  • "roles":
    [
    ],
  • "projects":
    [
    ]
}

Accept invitation

path Parameters
invitationId
required
string
query Parameters
fields
required
string
Default: "membership,href"

Responses

200

Accept invitation

put /v1/invitations/{invitationId}
http://api.cherryservers.com/v1/invitations/{invitationId}
https://api.cherryservers.com/v1/invitations/{invitationId}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "id": 0,
  • "href": "string",
  • "roles": { }
}

Decline invitation

path Parameters
invitationId
required
string

Responses

204

Successfully delete invitation object

403

Access denied

delete /v1/invitations/{invitationId}
http://api.cherryservers.com/v1/invitations/{invitationId}
https://api.cherryservers.com/v1/invitations/{invitationId}

Ip Addresses

Retrieve available project ip addresses

List of free project ip addresses.

path Parameters
projectId
required
string
query Parameters
fields
required
string
Default: "ip,href,region"
region
required
string <RegionConstraint>

Responses

200

Returns list of available ip addresses

get /v1/projects/{projectId}/available_ips
http://api.cherryservers.com/v1/projects/{projectId}/available_ips
https://api.cherryservers.com/v1/projects/{projectId}/available_ips

Response samples

application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Retrieve all project ip addresses

path Parameters
projectId
required
string
query Parameters
fields
required
string
Default: "ip,href,region"
limit
string\d+
Default: 0
offset
string\d+
Default