Skip to main content

Cycle API (1.0.0)

Download OpenAPI specification:Download

Cycle API

Environments

Get a list of environments

Requires the environments-view capability.

Authorizations:
(bearerAuthhubAuth)
query Parameters
MetaParam
Array of strings
Items Enum: "containers" "containers_count" "instances_count"

A comma separated list of meta values. Meta values will show up under a resource's meta field. In the case of applying a meta to a collection of resources, each resource will have it's own relevant meta data. In some rare cases, meta may not apply to individual resources, and may appear in the root document. These will be clearly labeled.

IncludeParam
Array of strings
Items Enum: "creators" "stacks"

A comma separated list of include values. Included resources will show up under the root document's include field, with the key being the id of the included resource. In the case of applying an include to a collection of resources, if two resources share the same include, it will only appear once in the return.

SortParam
string

An array of sort values. To sort descending, put a - in front of the value, e.g. -id.

FilterParam
string

The filter field is a key-value object, where the key is what you would like to filter, and the value is the value you're filtering for. For example, you may want to find all containers using image X. In this case, you'd pass a filter of ?filter[image]=X

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "includes": {
    }
}

Create Environment

Requires the environments-create capability.

Authorizations:
(bearerAuthhubAuth)
Request Body schema: application/json

Parameters for creating a new environment.

name
required
string

A user defined name for the environment resource.

cluster
required
string

The cluster this environment is associated with.

required
object (About)

Contains details regarding the environment.

required
object (Features)

An object representing specialized features configured for this environment.

required
object or null

An object representing the associated stack.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "cluster": "string",
  • "about": {
    },
  • "features": {
    },
  • "stack": {
    }
}

Response samples

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

Fetch Environment

Requires the environments-view capability.

Authorizations:
(bearerAuthhubAuth)
path Parameters
environmentId
required
string

The ID of the requested environment.

query Parameters
MetaParam
Array of strings
Items Enum: "containers" "containers_count" "instances_count"

A comma separated list of meta values. Meta values will show up under a resource's meta field. In the case of applying a meta to a collection of resources, each resource will have it's own relevant meta data. In some rare cases, meta may not apply to individual resources, and may appear in the root document. These will be clearly labeled.

IncludeParam
Array of strings
Items Enum: "creators" "stacks"

A comma separated list of include values. Included resources will show up under the root document's include field, with the key being the id of the included resource. In the case of applying an include to a collection of resources, if two resources share the same include, it will only appear once in the return.

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "includes": {
    }
}

Update Environment

Updates the specificed environment, setting the values of the parameters passed. If any parameters are omitted, they will be left unchanged. Requires the environments-update capability.

Authorizations:
(bearerAuthhubAuth)
path Parameters
environmentId
required
string

The ID of the requested environment.

Request Body schema: application/json

Parameters for updating an environment.

name
string
object (About)

Contains details regarding the environment.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "about": {
    }
}

Response samples

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

Create Environment Job

Used to start, stop, or delete an environment. Requires the environments-state capability.

Authorizations:
(bearerAuthhubAuth)
path Parameters
environmentId
required
string

The ID of the requested environment.

Request Body schema: application/json

Parameters for creating a new environment job.

action
required
string
Enum: "start" "stop" "delete"

The name of the action to perform.

Responses

Request samples

Content type
application/json
{
  • "action": "start"
}

Response samples

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

Fetch Environment Summary

Fetches a single summary object for a specific environment. Contains useful and relevant data/statistics that would otherwise be several separate API calls. Requires the environments-view capability.

Authorizations:
(bearerAuthhubAuth)
path Parameters
environmentId
required
string

The ID of the requested environment.

Responses

Response samples

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

List Telemetry Data

Requires the environments-view capability.

Authorizations:
(bearerAuthhubAuth)
path Parameters
environmentId
required
string

The environmentId where the instances being reported on reside.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Environment Services

Fetch LB Info

Requires the environments-view capability.

Authorizations:
(bearerAuthhubAuth)
path Parameters
environmentId
required
string

The environmentId where the load balancer resides.

Responses

Response samples

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

Reconfigure LB

Creates a task that will update the load balancer's configuration.

Authorizations:
(bearerAuthhubAuth)
path Parameters
environmentId
required
string

The ID of the environment where this load balancer resides.

Request Body schema: application/json

Parameters for reconfiguring a load balancer.

action
required
string
Value: "reconfigure"

The name of the action to perform.

required
object

Responses

Request samples

Content type
application/json
{
  • "action": "reconfigure",
  • "contents": {
    }
}

Response samples

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

Reconfigure Discovery

Creates a task that will update the discovery service's configuration.

Authorizations:
(bearerAuthhubAuth)
path Parameters
environmentId
required
string

The ID of the environment where this discovery service resides.

Request Body schema: application/json

Parameters for reconfiguring a discovery service.

action
required
string
Value: "reconfigure"

The name of the action to perform.

required
object

Responses

Request samples

Content type
application/json
{
  • "action": "reconfigure",
  • "contents": {
    }
}

Response samples

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

Fetch VPN Info

Requires the environments-vpn capability.

Authorizations:
(bearerAuthhubAuth)
path Parameters
environmentId
required
string

The environmentId where the VPN resides.

Responses

Response samples

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

List Logins

Requires the environments-vpn-manage capability.

Authorizations:
(bearerAuthhubAuth)
path Parameters
environmentId
required
string

The environmentId where the VPN service resides.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

List VPN Users

Requires the environments-vpn-manage capability.

Authorizations:
(bearerAuthhubAuth)
path Parameters
environmentId
required
string

The environmentId where the VPN service resides.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Create VPN User

Requires the environments-vpn-manage capability.

Authorizations:
(bearerAuthhubAuth)
path Parameters
environmentId
required
string

The environmentId where the VPN service resides.

Request Body schema: application/json

Parameters for creating a new VPN user.

required
object (VPNUser)

A VPN user for a given VPN.

id
required
string (ID)

A unique identifier.

username
required
string

The username for the login.

required
object (Creator)

A creator object. Describes who created the resource.

last_login
required
string <date-time> (DateTime)
hub_id
required
string (HubID)

The unique ID of the Hub this resource was created in.

environment_id
required
string

An identifier for the environment the VPN service is associated with.

required
object (VPNUserEvents)

A collection of timestamps for each event in the VPN user's lifetime.

Responses

Request samples

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

Response samples

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

Delete VPN user

Requires the environments-vpn-manage capability.

Authorizations:
(bearerAuthhubAuth)
path Parameters
environmentId
required
string

The environmentId where the VPN service the given user belongs to resides.

userId
required
string

The userId of the user to be deleted.

Responses

Response samples

Content type
application/json
{
  • "data": "string"
}

Reconfigure VPN

Requires the environments-vpn-manage capability.

Authorizations:
(bearerAuthhubAuth)
path Parameters
environmentId
required
string

The ID of the environment the VPN service resides in.

Request Body schema: application/json

An object to be submitted when reconfiguring a VPN service.

enable
boolean

A boolean where true means the VPN service is enabled.

object or null

The config object for the VPN service, in this case without the required fields normally found in a VPN config object.

Responses

Request samples

Content type
application/json
{
  • "enable": true,
  • "config": {
    }
}

Response samples

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

Containers

List Containers

Requires the containers-view capability.

Authorizations:
(bearerAuthhubAuth)
query Parameters
MetaParam
Array of strings
Items Enum: "instances_count" "domain" "domains" "ips"

A comma separated list of meta values. Meta values will show up under a resource's meta field. In the case of applying a meta to a collection of resources, each resource will have it's own relevant meta data. In some rare cases, meta may not apply to individual resources, and may appear in the root document. These will be clearly labeled.

IncludeParam
Array of strings
Items Enum: "creators" "images" "stack_builds" "stacks" "environments"

A comma separated list of include values. Included resources will show up under the root document's include field, with the key being the id of the included resource. In the case of applying an include to a collection of resources, if two resources share the same include, it will only appear once in the return.

SortParam
string

An array of sort values. To sort descending, put a - in front of the value, e.g. -id.

FilterParam
string

The filter field is a key-value object, where the key is what you would like to filter, and the value is the value you're filtering for. For example, you may want to find all containers using image X. In this case, you'd pass a filter of ?filter[image]=X

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "includes": {
    }
}

Create Container

Requires the containers-deploy capability.

Authorizations:
(bearerAuthhubAuth)
Request Body schema: application/json

Parameters for creating a new container.

name
required
string

A user defined name for the container.

environment_id
required
string

An identifier for the environment this container will be deployed to.

image_id
required
string

An identifier for the image used to create this container.

stateful
required
boolean

A boolean where true represents this container is stateful.

required
object (ContainerConfig)

A container configuration.

object (ContainerVolumes)

Configuration settings for container volumes.

object

User defined meta data for the container.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "environment_id": "string",
  • "image_id": "string",
  • "stateful": true,
  • "config": {
    },
  • "volumes": {
    },
  • "annotations": {
    }
}

Response samples

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

Fetch Container

Requires the containers-view capability.

Authorizations:
(bearerAuthhubAuth)
path Parameters
containerId
required
string

The ID of the requested container.

query Parameters
MetaParam
Array of strings
Items Enum: "instances_count" "domain" "domains" "ips"

A comma separated list of meta values. Meta values will show up under a resource's meta field. In the case of applying a meta to a collection of resources, each resource will have it's own relevant meta data. In some rare cases, meta may not apply to individual resources, and may appear in the root document. These will be clearly labeled.

IncludeParam
Array of strings
Items Enum: "creators" "images" "stack_builds" "stacks" "environments"

A comma separated list of include values. Included resources will show up under the root document's include field, with the key being the id of the included resource. In the case of applying an include to a collection of resources, if two resources share the same include, it will only appear once in the return.

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "includes": {