Skip to main content

Cycle Internal API (1.0.0)

Download OpenAPI specification:Download

Inside every container running on Cycle, there is a Unix socket mounted at /var/run/cycle/api/api.sock. You can send HTTP requests over this socket to access information about the local environment, access secrets, and much more. The way this internal API functions is very similar to how Cycle's main API works, though the purpose is different. The internal API is primarily used by instances to learn about their environment, and dynamically update as deployments change. In the future, we expect you'll be able to use the internal API to register service containers and much more. The internal API returns identical JSON responses to the main API. There is also a websocket based API that you can tune into for streaming platform updates.

Environments

Fetch Environment

Doesn't require specific capability.

Authorizations:
hubAuth

Responses

Response samples

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

List Environment Containers

Doesn't require specific capability.

Authorizations:
hubAuth

Responses

Response samples

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

List Envioronment Instances

Doesn't require a specific capability.

Authorizations:
hubAuth

Responses

Response samples

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

List Environment IPs

Doesn't require a specific capability.

Authorizations:
hubAuth

Responses

Response samples

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

Hubs

Fetch Hub

Doesn't require a specific capability.

Authorizations:
hubAuth

Responses

Response samples

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

Servers

Fetch Server

Internal API, no capabilities needed.

Authorizations:
hubAuth

Responses

Response samples

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

List Server Containers

Doesn't require specific capability.

Authorizations:
hubAuth

Responses

Response samples

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

Fetch Server Instances

Internal API, no capabilities needed.

Authorizations:
hubAuth

Responses

Response samples

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

Containers

Fetch Container

Internal API, no capabilities needed.

Authorizations:
hubAuth
query Parameters
meta
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.

Responses

Response samples

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

Fetch Instances

Internal API, no capabilities needed.

Authorizations:
hubAuth

Responses

Response samples

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

List Certificates

Authorizations:
hubAuth

Responses

Response samples

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

Notifications

Hub Notification Pipeline Auth

Doesn't require a specific capability.

Authorizations:
hubAuth

Responses

Response samples

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