Hubs

Endpoints related to managing hubs on Cycle.

List Hubs

Lists all associated Hubs.

SecuritybearerAuth
Request
query Parameters
object

In a list return, the data associated with the page number and size returned. 20 results per page, page 2 would be page[size]=20&page[number]=2

object

Filter Field

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.

Responses
200

Returns a list of Hubs.

default

General error response from the platform

get/v1/hubs
Response samples
application/json
{
  • "data": [
    ]
}

Create Hub

Create a Hub.

SecuritybearerAuth
Request
Request Body schema: application/json

Parameters for creating a Hub.

name
string

A name for the Hub.

identifier
string (Identifier)

A human-readable identifier used to refer to a resource, where using the official ID may be inconvenient. The identifier is automatically tokenized from the name/relevant field of the resource if one is not provided. For example, a container named "My Container" will have the identifier of my-container and is automatically created by the platform.

The identifier does not have to be unique.

object (HubWebhooks)

Hub related webhooks. When supplied, the given webhook will be called with a payload any time one of these events occurs.

Responses
200

Returns a Hub resource.

default

General error response from the platform

post/v1/hubs
Request samples
application/json
{
  • "name": "string",
  • "identifier": "string",
  • "webhooks": {
    }
}
Response samples
application/json
{
  • "data": {
    }
}

Get Hub

Requires the hubs-view capability.

SecuritybearerAuth
Request
query Parameters
meta
Array of strings

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.

Items Value: "memberships"
Responses
200

Returns an hub resource.

default

General error response from the platform

get/v1/hubs/current
Response samples
application/json
{
  • "data": {
    }
}

Update Hub

Updates the specified hub, setting the values of the parameters passed.

SecuritybearerAuth and hubAuth
Request
Request Body schema: application/json

Parameters for updating a hub.

name
string

A name for the hub.

object (HubWebhooks)

Hub related webhooks. When supplied, the given webhook will be called with a payload any time one of these events occurs.

Responses
200

Returns the updated Hub resource.

default

General error response from the platform

patch/v1/hubs/current
Request samples
application/json
{
  • "name": "string",
  • "webhooks": {
    }
}
Response samples
application/json
{
  • "data": {
    }
}

Delete Hub

Requires the hubs-delete capability. This can only be aquired by being the hub owner.

SecuritybearerAuth
Responses
202

Returns a task descriptor.

default

General error response from the platform

delete/v1/hubs/current
Response samples
application/json
{
  • "data": {
    }
}

List Hub Capabilities

Responses
200

Returns a list of capabilities.

default

General error response from the platform

get/v1/hubs/capabilities
Response samples
application/json
{
  • "data": [
    ],
  • "meta": {
    }
}

Get Hub Usage

Requires the hubs-view capability.

SecuritybearerAuth
Request
query Parameters
filter
object
Responses
200

Returns usage detail points of the Hub over a range of time.

default

General error response from the platform

get/v1/hubs/current/usage
Response samples
application/json
{
  • "data": [
    ]
}

List Hub Activity

SecuritybearerAuth and hubAuth
Request
query Parameters
include
Array of strings

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.

Items Enum: "users" "components" "creators" "images" "stack_builds" "stacks" "environments"
object

Filter Field

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.

sort
Array of strings

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

object

In a list return, the data associated with the page number and size returned. 20 results per page, page 2 would be page[size]=20&page[number]=2

Responses
200

Returns a list of Hub Activity entries.

default

General error response from the platform

get/v1/hubs/current/activity
Response samples
application/json
{
  • "data": [
    ],
  • "includes": {
    }
}

List Default Hub Roles

Responses
200

Returns a list of the default roles/capabilities for a hub.

default

General error response from the platform

get/v1/hubs/current/roles/defaults
Response samples
application/json
{
  • "data": [
    ]
}