Clusters

GET /bastion/clusters

Get the list of clusters

Response JSON Object:
 
  • [] (object) –
  • [].id (string) – The cluster ID
  • [].instanceID (string) – The terraform instance ID
  • [].source (string) – The terraform source location
  • [].category (string) – The cluster category

Example response:

[
  {}
]
GET /bastion/cluster/{clusterID}

Get a cluster

Parameters:
  • clusterID – The cluster ID
Response JSON Object:
 
  • id (string) – The cluster ID
  • instanceID (string) – The terraform instance ID
  • source (string) – The terraform source location
  • category (string) – The cluster category

Example response:

{}
POST /bastion/cluster/{clusterID}

Create a cluster. This operation will create a terraform instance.

Parameters:
  • clusterID – The cluster ID
Request JSON Object:
 
  • id (string) – The backend ID
  • variables[key] (string) –
  • category (string) – The cluster category

Example query:

{
  "variables": {}
}
DELETE /bastion/cluster/{clusterID}

Delete a cluster. This operation will be rejected if the terraform instance is not destroyed

Parameters:
  • clusterID – The cluster ID
Query Parameters:
 
  • force – Force the delete operation

Images

GET /bastion/cluster/{clusterID}/images

Get the images

Parameters:
  • clusterID – The cluster ID
Response JSON Object:
 
  • [key].id (string) –
  • [key].tag (string) –
  • [key].archfmt (string) –
  • [key].url (string) –
  • [key].dirty (boolean) –

Example response:

{}
POST /bastion/cluster/{clusterID}/images

Set the images

Parameters:
  • clusterID – The cluster ID
Request JSON Object:
 
  • [key].id (string) –
  • [key].tag (string) –
  • [key].archfmt (string) –
  • [key].url (string) –
  • [key].dirty (boolean) –

Example query:

{}
DELETE /bastion/cluster/{clusterID}/images

Delete all images

Parameters:
  • clusterID – The cluster ID
DELETE /bastion/cluster/{clusterID}/image/{imageID}

Delete an image

Parameters:
  • clusterID – The cluster ID
  • imageID – The image ID

Setup Jobs

GET /bastion/cluster/{clusterID}/setup_jobs

Get the setup jobs

Parameters:
  • clusterID – The cluster ID
Response JSON Object:
 
  • [key].id (string) –
  • [key].template (string) –

Example response:

{}
POST /bastion/cluster/{clusterID}/setup_jobs

Set the setup jobs

Parameters:
  • clusterID – The cluster ID
Request JSON Object:
 
  • [key].id (string) –
  • [key].template (string) –

Example query:

{}
DELETE /bastion/cluster/{clusterID}/setup_jobs

Delete all setup jobs

Parameters:
  • clusterID – The cluster ID

Setup

POST /bastion/cluster/{clusterID}/setup

Start the setup jobs

Parameters:
  • clusterID – The cluster ID
POST /bastion/cluster/{clusterID}/clean

Stop the setup jobs and clean consul config

Parameters:
  • clusterID – The cluster ID

Services

GET /bastion/cluster/{clusterID}/services/{service}

Get a service addreses

Parameters:
  • clusterID – The cluster ID
  • service – The service ID
Response JSON Object:
 
  • [] (string) –

Example response:

[]