MEDSTACK API DOCS¶
MedStack Inc. API v1 1.0¶
API for managing cluster services on MedStack Control
Servers¶
Description | URL |
---|---|
Production server | https://api.medstack.co/v1 |
Base¶
GET /companies/current¶
Retrieve current company
Description
Retrieves the personal access token's company
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
basicAuth |
header | string | N/A | No | Basic authentication |
Response 200 OK
{
"id": "string",
"name": "string",
"street_address": "string",
"city": "string",
"province": "string",
"country": "string",
"postal_code": "string",
"phone_number": "string",
"object": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"street_address": {
"type": "string"
},
"city": {
"type": "string"
},
"province": {
"type": "string"
},
"country": {
"type": "string"
},
"postal_code": {
"type": "string"
},
"phone_number": {
"type": "string"
},
"object": {
"type": "string"
}
}
}
Response 401 Unauthorized
Refer to the common response description: 401.
Response 404 Not Found
Refer to the common response description: 404.
Response 500 Internal Server Error
Refer to the common response description: 500.
GET /companies/{company_id}/clusters¶
Get a list of clusters
Description
Fetches a list of clusters
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
basicAuth |
header | string | N/A | No | Basic authentication |
company_id |
path | string | No | The `id` of the company in which the cluster belongs |
Response 200 OK
{
"data": [
{
"id": "string",
"label": "string",
"object": "string",
"infrastructure_provider": {
"id": "string"
},
"region": {
"name": "string"
}
}
],
"object": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Cluster"
}
},
"object": {
"type": "string"
}
}
}
Response 401 Unauthorized
Refer to the common response description: 401.
Response 404 Not Found
Refer to the common response description: 404.
Response 500 Internal Server Error
Refer to the common response description: 500.
GET /companies/{company_id}/clusters/{cluster_id}¶
Get a cluster
Description
Fetches a cluster by ID
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
basicAuth |
header | string | N/A | No | Basic authentication |
cluster_id |
path | string | No | The `id` of the cluster in which the service belongs | |
company_id |
path | string | No | The `id` of the company in which the cluster belongs |
Response 200 OK
{
"id": "string",
"label": "string",
"object": "string",
"infrastructure_provider": {
"id": "string"
},
"region": {
"name": "string"
}
}
Schema of the response body
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"label": {
"type": "string"
},
"object": {
"type": "string"
},
"infrastructure_provider": {
"type": "object",
"properties": {
"id": {
"type": "string"
}
}
},
"region": {
"type": "object",
"properties": {
"name": {
"type": "string"
}
}
}
}
}
Response 401 Unauthorized
Refer to the common response description: 401.
Response 404 Not Found
Refer to the common response description: 404.
Response 500 Internal Server Error
Refer to the common response description: 500.
POST /companies/{company_id}/webhooks/outgoing¶
Create an outgoing webhook - IN PREVIEW
Description
Add a new outgoing webhook
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
basicAuth |
header | string | N/A | No | Basic authentication |
company_id |
path | string | No | The `id` of the company in which the cluster belongs |
Request body
{
"cluster_id": "cluster_a1b2c3",
"label": "notification for cluster1",
"url": "https://mycompany.com/webhook/cluster1"
}
Schema of the request body
{
"type": "object",
"properties": {
"cluster_id": {
"type": "string"
},
"label": {
"type": "string"
},
"url": {
"type": "string"
}
}
}
Response 201 Created
{
"id": "string",
"object": "string",
"url": "string",
"label": "string",
"cluster_id": "string",
"metadata": {
"last_triggered": "string",
"failure_count": 0
}
}
Schema of the response body
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"object": {
"type": "string"
},
"url": {
"type": "string"
},
"label": {
"type": "string",
"nullable": true
},
"cluster_id": {
"type": "string",
"nullable": true
},
"metadata": {
"type": "object",
"properties": {
"last_triggered": {
"type": "string",
"nullable": true
},
"failure_count": {
"type": "integer"
}
}
}
}
}
Response 400 Bad Request
{
"code": 400,
"type": "invalid_request_error",
"param": "webhook_url",
"message": null,
"webhook_url": "Webhook url must use https protocol"
}
Schema of the response body
Response 401 Unauthorized
Refer to the common response description: 401.
Response 404 Not Found
Refer to the common response description: 404.
Response 409 Conflict
Refer to the common response description: 409.
Response 500 Internal Server Error
Refer to the common response description: 500.
GET /companies/{company_id}/webhooks/outgoing¶
Get a list of outgoing webhooks - IN PREVIEW
Description
List the outgoing webhooks for a company
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
basicAuth |
header | string | N/A | No | Basic authentication |
company_id |
path | string | No | The `id` of the company in which the cluster belongs |
Response 200 OK
{
"object": "string",
"data": [
{
"id": "string",
"object": "string",
"url": "string",
"label": "string",
"cluster_id": "string",
"metadata": {
"last_triggered": "string",
"failure_count": 0
}
}
]
}
Schema of the response body
{
"type": "object",
"properties": {
"object": {
"type": "string"
},
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"object": {
"type": "string"
},
"url": {
"type": "string"
},
"label": {
"type": "string",
"nullable": true
},
"cluster_id": {
"type": "string",
"nullable": true
},
"metadata": {
"type": "object",
"properties": {
"last_triggered": {
"type": "string",
"nullable": true
},
"failure_count": {
"type": "integer"
}
}
}
}
}
}
}
}
Response 401 Unauthorized
Refer to the common response description: 401.
Response 404 Not Found
Refer to the common response description: 404.
Response 500 Internal Server Error
Refer to the common response description: 500.
GET /companies/{company_id}/webhooks/outgoing/{outgoing_webhook_id}¶
Get an outgoing webhook - IN PREVIEW
Description
Fetch an outgoing webhook by id
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
basicAuth |
header | string | N/A | No | Basic authentication |
company_id |
path | string | No | The `id` of the company in which the cluster belongs | |
outgoing_webhook_id |
path | string | No | The `id` of the outgoing webhook to be retrieved |
Response 200 OK
{
"id": "string",
"object": "string",
"url": "string",
"label": "string",
"cluster_id": "string",
"metadata": {
"last_triggered": "string",
"failure_count": 0
}
}
Schema of the response body
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"object": {
"type": "string"
},
"url": {
"type": "string"
},
"label": {
"type": "string",
"nullable": true
},
"cluster_id": {
"type": "string",
"nullable": true
},
"metadata": {
"type": "object",
"properties": {
"last_triggered": {
"type": "string",
"nullable": true
},
"failure_count": {
"type": "integer"
}
}
}
}
}
Response 401 Unauthorized
Refer to the common response description: 401.
Response 404 Not Found
Refer to the common response description: 404.
Response 500 Internal Server Error
Refer to the common response description: 500.
PUT /companies/{company_id}/webhooks/outgoing/{outgoing_webhook_id}¶
Update an outgoing webhook - IN PREVIEW
Description
Update an existing outgoing webhook
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
basicAuth |
header | string | N/A | No | Basic authentication |
company_id |
path | string | No | The `id` of the company in which the cluster belongs | |
outgoing_webhook_id |
path | string | No | The `id` of the outgoing webhook to be retrieved |
Request body
{
"cluster_id": "cluster_a1b2c3",
"label": "notification for cluster1",
"url": "https://mycompany.com/webhook/cluster1"
}
Schema of the request body
{
"type": "object",
"properties": {
"cluster_id": {
"type": "string"
},
"label": {
"type": "string"
},
"url": {
"type": "string"
}
}
}
Response 200 OK
{
"id": "string",
"object": "string",
"url": "string",
"label": "string",
"cluster_id": "string",
"metadata": {
"last_triggered": "string",
"failure_count": 0
}
}
Schema of the response body
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"object": {
"type": "string"
},
"url": {
"type": "string"
},
"label": {
"type": "string",
"nullable": true
},
"cluster_id": {
"type": "string",
"nullable": true
},
"metadata": {
"type": "object",
"properties": {
"last_triggered": {
"type": "string",
"nullable": true
},
"failure_count": {
"type": "integer"
}
}
}
}
}
Response 400 Bad Request
{
"code": 400,
"type": "invalid_request_error",
"param": "webhook_url",
"message": null,
"webhook_url": "Webhook url must use https protocol"
}
Schema of the response body
Response 401 Unauthorized
Refer to the common response description: 401.
Response 404 Not Found
Refer to the common response description: 404.
Response 409 Conflict
Refer to the common response description: 409.
Response 500 Internal Server Error
Refer to the common response description: 500.
DELETE /companies/{company_id}/webhooks/outgoing/{outgoing_webhook_id}¶
Delete an outgoing webhook - IN PREVIEW
Description
Delete an outgoing webhook by id
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
basicAuth |
header | string | N/A | No | Basic authentication |
company_id |
path | string | No | The `id` of the company in which the cluster belongs | |
outgoing_webhook_id |
path | string | No | The `id` of the outgoing webhook to be retrieved |
Response 204 No Content
Refer to the common response description: 204.
Response 401 Unauthorized
Refer to the common response description: 401.
Response 404 Not Found
Refer to the common response description: 404.
Response 500 Internal Server Error
Refer to the common response description: 500.
POST /companies/{company_id}/webhooks/outgoing/{outgoing_webhook_id}/test¶
Trigger a test alert to a given outgoing webhook - IN PREVIEW
Description
Trigger a test alert to a given outgoing webhook
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
basicAuth |
header | string | N/A | No | Basic authentication |
company_id |
path | string | No | The `id` of the company in which the cluster belongs | |
outgoing_webhook_id |
path | string | No | The `id` of the outgoing webhook to be retrieved |
Response 202 Accepted
Response 401 Unauthorized
Refer to the common response description: 401.
Response 404 Not Found
Refer to the common response description: 404.
Response 500 Internal Server Error
Refer to the common response description: 500.
Infrastructure¶
GET /companies/{company_id}/clusters/{cluster_id}/node-sizes¶
Get a list of node sizes for the cluster
Description
List of node sizes available to the cluster
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
basicAuth |
header | string | N/A | No | Basic authentication |
cluster_id |
path | string | No | The `id` of the cluster in which the service belongs | |
company_id |
path | string | No | The `id` of the company in which the cluster belongs |
Response 200 OK
{
"object": "string",
"data": [
{
"id": "string",
"object": "string",
"title": "string",
"vcpu": 0,
"memory": 10.12
}
]
}
Schema of the response body
{
"type": "object",
"properties": {
"object": {
"type": "string"
},
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"object": {
"type": "string"
},
"title": {
"type": "string"
},
"vcpu": {
"type": "integer"
},
"memory": {
"type": "number"
}
}
}
}
}
}
Response 401 Unauthorized
Refer to the common response description: 401.
Response 404 Not Found
Refer to the common response description: 404.
Response 500 Internal Server Error
Refer to the common response description: 500.
GET /companies/{company_id}/clusters/{cluster_id}/nodes¶
Get a list of nodes
Description
Fetches list of nodes in cluster (in preview)
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
basicAuth |
header | string | N/A | No | Basic authentication |
cluster_id |
path | string | No | The `id` of the cluster in which the service belongs | |
company_id |
path | string | No | The `id` of the company in which the cluster belongs |
Response 200 OK
{
"data": [
{
"id": "string",
"status": "string",
"public_ip_address": "string",
"swarm_manager": true,
"size": "string",
"operating_system": {
"type": "string",
"distribution": "string",
"version": "string"
}
}
],
"object": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Node"
}
},
"object": {
"type": "string"
}
}
}
Response 401 Unauthorized
Refer to the common response description: 401.
Response 404 Not Found
Refer to the common response description: 404.
Response 500 Internal Server Error
Refer to the common response description: 500.
POST /companies/{company_id}/clusters/{cluster_id}/nodes¶
Create a node
Description
Add a new node to the cluster
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
basicAuth |
header | string | N/A | No | Basic authentication |
cluster_id |
path | string | No | The `id` of the cluster in which the service belongs | |
company_id |
path | string | No | The `id` of the company in which the cluster belongs |
Request body
{
"size_id": "node_size_kwM9o3B8"
}
Schema of the request body
{
"type": "object",
"properties": {
"size_id": {
"type": "string"
}
}
}
Response 202 Accepted
{
"id": "string",
"status": "string",
"public_ip_address": "string",
"swarm_manager": true,
"size": "string",
"operating_system": {
"type": "string",
"distribution": "string",
"version": "string"
}
}
Schema of the response body
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"status": {
"type": "string"
},
"public_ip_address": {
"type": "string"
},
"swarm_manager": {
"type": "boolean"
},
"size": {
"type": "string"
},
"operating_system": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"distribution": {
"type": "string"
},
"version": {
"type": "string"
}
}
}
}
}
Response 400 Bad Request
{
"code": 400,
"type": "invalid_request_error",
"param": "size_id",
"message": null,
"size_id": "must be a string"
}
Schema of the response body
Response 401 Unauthorized
Refer to the common response description: 401.
Response 404 Not Found
Refer to the common response description: 404.
Response 409 Conflict
Refer to the common response description: 409.
Response 500 Internal Server Error
Refer to the common response description: 500.
GET /companies/{company_id}/clusters/{cluster_id}/nodes/{node_id}¶
Get a node
Description
Get a single node
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
basicAuth |
header | string | N/A | No | Basic authentication |
cluster_id |
path | string | No | The `id` of the cluster in which the service belongs | |
company_id |
path | string | No | The `id` of the company in which the cluster belongs | |
node_id |
path | string | No | The `id` of the node to be resized. |
Response 202 Accepted
{
"id": "string",
"status": "string",
"public_ip_address": "string",
"swarm_manager": true,
"size": "string",
"operating_system": {
"type": "string",
"distribution": "string",
"version": "string"
}
}
Schema of the response body
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"status": {
"type": "string"
},
"public_ip_address": {
"type": "string"
},
"swarm_manager": {
"type": "boolean"
},
"size": {
"type": "string"
},
"operating_system": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"distribution": {
"type": "string"
},
"version": {
"type": "string"
}
}
}
}
}
Response 401 Unauthorized
Refer to the common response description: 401.
Response 404 Not Found
Refer to the common response description: 404.
Response 500 Internal Server Error
Refer to the common response description: 500.
PATCH /companies/{company_id}/clusters/{cluster_id}/nodes/{node_id}¶
Resize a node
Description
Vertically scale a node up or down by providing the node size
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
basicAuth |
header | string | N/A | No | Basic authentication |
cluster_id |
path | string | No | The `id` of the cluster in which the service belongs | |
company_id |
path | string | No | The `id` of the company in which the cluster belongs | |
node_id |
path | string | No | The `id` of the node to be resized. |
Request body
{
"size_id": "node_size_eY3J1QgW"
}
Schema of the request body
{
"type": "object",
"properties": {
"size_id": {
"type": "string"
}
}
}
Response 202 Accepted
{
"id": "string",
"status": "string",
"public_ip_address": "string",
"swarm_manager": true,
"size": "string",
"operating_system": {
"type": "string",
"distribution": "string",
"version": "string"
}
}
Schema of the response body
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"status": {
"type": "string"
},
"public_ip_address": {
"type": "string"
},
"swarm_manager": {
"type": "boolean"
},
"size": {
"type": "string"
},
"operating_system": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"distribution": {
"type": "string"
},
"version": {
"type": "string"
}
}
}
}
}
Response 400 Bad Request
{
"code": 400,
"type": "invalid_request_error",
"param": "size_id",
"message": null,
"size_id": "must be a string"
}
Schema of the response body
Response 401 Unauthorized
Refer to the common response description: 401.
Response 404 Not Found
Refer to the common response description: 404.
Response 409 Conflict
Refer to the common response description: 409.
Response 500 Internal Server Error
Refer to the common response description: 500.
DELETE /companies/{company_id}/clusters/{cluster_id}/nodes/{node_id}¶
Delete a node
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
basicAuth |
header | string | N/A | No | Basic authentication |
cluster_id |
path | string | No | The `id` of the cluster in which the service belongs | |
company_id |
path | string | No | The `id` of the company in which the cluster belongs | |
node_id |
path | string | No | The `id` of the node to be resized. |
Response 202 Accepted
{
"id": "string",
"status": "string",
"public_ip_address": "string",
"swarm_manager": true,
"size": "string",
"operating_system": {
"type": "string",
"distribution": "string",
"version": "string"
}
}
Schema of the response body
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"status": {
"type": "string"
},
"public_ip_address": {
"type": "string"
},
"swarm_manager": {
"type": "boolean"
},
"size": {
"type": "string"
},
"operating_system": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"distribution": {
"type": "string"
},
"version": {
"type": "string"
}
}
}
}
}
Response 401 Unauthorized
Refer to the common response description: 401.
Response 404 Not Found
Refer to the common response description: 404.
Response 409 Conflict
Refer to the common response description: 409.
Response 500 Internal Server Error
Refer to the common response description: 500.
POST /companies/{company_id}/clusters/{cluster_id}/nodes/{node_id}/reboot¶
Reboot a node
Description
Reboots a node
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
basicAuth |
header | string | N/A | No | Basic authentication |
cluster_id |
path | string | No | The `id` of the cluster in which the service belongs | |
company_id |
path | string | No | The `id` of the company in which the cluster belongs | |
node_id |
path | string | No | The `id` of the node to be resized. |
Response 202 Accepted
{
"id": "string",
"status": "string",
"public_ip_address": "string",
"swarm_manager": true,
"size": "string",
"operating_system": {
"type": "string",
"distribution": "string",
"version": "string"
}
}
Schema of the response body
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"status": {
"type": "string"
},
"public_ip_address": {
"type": "string"
},
"swarm_manager": {
"type": "boolean"
},
"size": {
"type": "string"
},
"operating_system": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"distribution": {
"type": "string"
},
"version": {
"type": "string"
}
}
}
}
}
Response 401 Unauthorized
Refer to the common response description: 401.
Response 404 Not Found
Refer to the common response description: 404.
Response 409 Conflict
Refer to the common response description: 409.
Response 500 Internal Server Error
Refer to the common response description: 500.
Deployment¶
GET /companies/{company_id}/clusters/{cluster_id}/services¶
Get a list of services
Description
List services that are running in a cluster
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
basicAuth |
header | string | N/A | No | Basic authentication |
cluster_id |
path | string | No | The `id` of the cluster in which the service belongs | |
company_id |
path | string | No | The `id` of the company in which the cluster belongs |
Response 200 OK
{
"data": [
{
"id": "string",
"name": "string",
"image": "string",
"replicas": 96,
"command": "string",
"args": "string",
"hosts": [
"string"
],
"port": 189,
"protocol": "string",
"healthcheck_path": "string",
"healthcheck_interval": 108,
"healthcheck_timeout": 37,
"secrets": [
{
"id": "string",
"name": "string",
"file_name": "string",
"uid": 20,
"gid": 300,
"mode": "string"
}
],
"configs": [
{
"id": "string",
"name": "string",
"file_name": "string",
"uid": 148,
"gid": 286,
"mode": "string"
}
],
"mounts": [
{
"type": "string",
"target": "string",
"source": "string",
"readonly": true
}
],
"environment_variables": [
{
"key": "string",
"value": "string"
}
],
"placement_constraints": [
"string"
],
"update_order": "stop-first",
"update_delay": 187,
"update_parallelism": 96,
"update_failure_action": "continue",
"update_max_failure_ratio": 10.12,
"update_monitor": 129,
"rollback_order": "stop-first",
"rollback_delay": 99,
"rollback_parallelism": 38,
"rollback_failure_action": "continue",
"rollback_max_failure_ratio": 10.12,
"rollback_monitor": 195,
"object": "string"
}
],
"object": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Service"
}
},
"object": {
"type": "string"
}
}
}
Response 401 Unauthorized
Refer to the common response description: 401.
Response 404 Not Found
Refer to the common response description: 404.
Response 500 Internal Server Error
Refer to the common response description: 500.
POST /companies/{company_id}/clusters/{cluster_id}/services¶
Create a service
Description
Add a new service on a cluster
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
basicAuth |
header | string | N/A | No | Basic authentication |
cluster_id |
path | string | No | The `id` of the cluster in which the service belongs | |
company_id |
path | string | No | The `id` of the company in which the cluster belongs |
Request body
{
"value": {
"name": "my-app",
"image": "redis",
"replicas": 2,
"healthcheck_path": "/my-app-healthcheck",
"healthcheck_interval": 10,
"healthcheck_timeout": 3,
"secrets": [
{
"name": "mysecret",
"file_name": "/var/run/secrets",
"uid": "0",
"gid": "0",
"mode": "400"
}
],
"configs": [
{
"name": "myconfig",
"file_name": "/var/run/configs",
"uid": "0",
"gid": "0",
"mode": "400"
}
],
"mounts": [
{
"target": "/mnt/myvolume",
"source": "d91d32507ad09fa24908464abf9450370ab5870a2dd50e5ba27ff0104f63d204",
"readonly": true
}
],
"environment_variables": [
{
"key": "MYVAR1",
"value": "some_value"
}
],
"placement_constraints": [
"node.labels.your_label2 != small"
],
"update_order": "start-first",
"update_delay": 60,
"update_parallelism": 1,
"update_failure_action": "rollback",
"update_max_failure_ratio": 0.33,
"update_monitor": 5,
"rollback_order": "stop-first",
"rollback_delay": 0,
"rollback_parallelism": 2,
"rollback_failure_action": "pause",
"rollback_max_failure_ratio": 0,
"rollback_monitor": 5,
"object": {
"type": "string"
}
}
}
Schema of the request body
{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"image": {
"type": "string"
},
"replicas": {
"type": "integer",
"format": "int32"
},
"command": {
"type": "string"
},
"args": {
"type": "string"
},
"hosts": {
"type": "array",
"items": {
"type": "string"
}
},
"port": {
"type": "integer",
"format": "int32"
},
"protocol": {
"type": "string"
},
"healthcheck_path": {
"type": "string"
},
"healthcheck_interval": {
"type": "integer",
"format": "int32"
},
"healthcheck_timeout": {
"type": "integer",
"format": "int32"
},
"secrets": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"file_name": {
"type": "string"
},
"uid": {
"type": "string"
},
"gid": {
"type": "string"
},
"mode": {
"type": "string"
}
}
}
},
"configs": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"file_name": {
"type": "string"
},
"uid": {
"type": "string"
},
"gid": {
"type": "string"
},
"mode": {
"type": "string"
}
}
}
},
"mounts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"target": {
"type": "string"
},
"source": {
"type": "string"
},
"readonly": {
"type": "boolean"
}
}
}
},
"environment_variables": {
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
},
"placement_constraints": {
"type": "array",
"items": {
"type": "string"
}
},
"update_order": {
"type": "string",
"enum": [
"stop-first",
"start-first"
]
},
"update_delay": {
"type": "integer",
"format": "int32"
},
"update_parallelism": {
"type": "integer",
"format": "int32"
},
"update_failure_action": {
"type": "string",
"enum": [
"continue",
"pause",
"rollback"
]
},
"update_max_failure_ratio": {
"type": "number",
"format": "float"
},
"update_monitor": {
"type": "integer",
"format": "int32"
},
"rollback_order": {
"type": "string",
"enum": [
"stop-first",
"start-first"
]
},
"rollback_delay": {
"type": "integer",
"format": "int32"
},
"rollback_parallelism": {
"type": "integer",
"format": "int32"
},
"rollback_failure_action": {
"type": "string",
"enum": [
"continue",
"pause"
]
},
"rollback_max_failure_ratio": {
"type": "number",
"format": "float"
},
"rollback_monitor": {
"type": "integer",
"format": "int32"
},
"object": {
"type": "string"
}
}
}
Response 201 Created
{
"id": "string",
"name": "string",
"image": "string",
"replicas": 54,
"command": "string",
"args": "string",
"hosts": [
"string"
],
"port": 25,
"protocol": "string",
"healthcheck_path": "string",
"healthcheck_interval": 289,
"healthcheck_timeout": 200,
"secrets": [
{
"id": "string",
"name": "string",
"file_name": "string",
"uid": 280,
"gid": 268,
"mode": "string"
}
],
"configs": [
{
"id": "string",
"name": "string",
"file_name": "string",
"uid": 41,
"gid": 245,
"mode": "string"
}
],
"mounts": [
{
"type": "string",
"target": "string",
"source": "string",
"readonly": true
}
],
"environment_variables": [
{
"key": "string",
"value": "string"
}
],
"placement_constraints": [
"string"
],
"update_order": "stop-first",
"update_delay": 49,
"update_parallelism": 220,
"update_failure_action": "continue",
"update_max_failure_ratio": 10.12,
"update_monitor": 253,
"rollback_order": "stop-first",
"rollback_delay": 36,
"rollback_parallelism": 173,
"rollback_failure_action": "continue",
"rollback_max_failure_ratio": 10.12,
"rollback_monitor": 195,
"object": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"image": {
"type": "string"
},
"replicas": {
"type": "integer",
"format": "int32"
},
"command": {
"type": "string"
},
"args": {
"type": "string"
},
"hosts": {
"type": "array",
"items": {
"type": "string"
}
},
"port": {
"type": "integer",
"format": "int32"
},
"protocol": {
"type": "string"
},
"healthcheck_path": {
"type": "string"
},
"healthcheck_interval": {
"type": "integer",
"format": "int32"
},
"healthcheck_timeout": {
"type": "integer",
"format": "int32"
},
"secrets": {
"$ref": "#/components/schemas/ServiceSecrets"
},
"configs": {
"$ref": "#/components/schemas/ServiceConfigs"
},
"mounts": {
"$ref": "#/components/schemas/ServiceMounts"
},
"environment_variables": {
"$ref": "#/components/schemas/EnvironmentVariables"
},
"placement_constraints": {
"$ref": "#/components/schemas/PlacementConstraints"
},
"update_order": {
"type": "string",
"enum": [
"stop-first",
"start-first"
]
},
"update_delay": {
"type": "integer",
"format": "int32"
},
"update_parallelism": {
"type": "integer",
"format": "int32"
},
"update_failure_action": {
"type": "string",
"enum": [
"continue",
"pause",
"rollback"
]
},
"update_max_failure_ratio": {
"type": "number",
"format": "float"
},
"update_monitor": {
"type": "integer",
"format": "int32"
},
"rollback_order": {
"type": "string",
"enum": [
"stop-first",
"start-first"
]
},
"rollback_delay": {
"type": "integer",
"format": "int32"
},
"rollback_parallelism": {
"type": "integer",
"format": "int32"
},
"rollback_failure_action": {
"type": "string",
"enum": [
"continue",
"pause"
]
},
"rollback_max_failure_ratio": {
"type": "number",
"format": "float"
},
"rollback_monitor": {
"type": "integer",
"format": "int32"
},
"object": {
"type": "string"
}
}
}
Response 400 Bad Request
Refer to the common response description: 400.
Response 404 Not Found
Refer to the common response description: 404.
Response 500 Internal Server Error
Refer to the common response description: 500.
GET /companies/{company_id}/clusters/{cluster_id}/services/{service_id}¶
Get a service
Description
Fetch a service running on the cluster by id
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
basicAuth |
header | string | N/A | No | Basic authentication |
cluster_id |
path | string | No | The `id` of the cluster in which the service belongs | |
company_id |
path | string | No | The `id` of the company in which the cluster belongs | |
service_id |
path | string | No | The `id` of the service to be retrieved running in the cluster |
Response 200 OK
{
"id": "string",
"name": "string",
"image": "string",
"replicas": 100,
"command": "string",
"args": "string",
"hosts": [
"string"
],
"port": 40,
"protocol": "string",
"healthcheck_path": "string",
"healthcheck_interval": 12,
"healthcheck_timeout": 92,
"secrets": [
{
"id": "string",
"name": "string",
"file_name": "string",
"uid": 19,
"gid": 286,
"mode": "string"
}
],
"configs": [
{
"id": "string",
"name": "string",
"file_name": "string",
"uid": 86,
"gid": 90,
"mode": "string"
}
],
"mounts": [
{
"type": "string",
"target": "string",
"source": "string",
"readonly": true
}
],
"environment_variables": [
{
"key": "string",
"value": "string"
}
],
"placement_constraints": [
"string"
],
"update_order": "stop-first",
"update_delay": 21,
"update_parallelism": 26,
"update_failure_action": "continue",
"update_max_failure_ratio": 10.12,
"update_monitor": 6,
"rollback_order": "stop-first",
"rollback_delay": 26,
"rollback_parallelism": 7,
"rollback_failure_action": "continue",
"rollback_max_failure_ratio": 10.12,
"rollback_monitor": 185,
"object": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"image": {
"type": "string"
},
"replicas": {
"type": "integer",
"format": "int32"
},
"command": {
"type": "string"
},
"args": {
"type": "string"
},
"hosts": {
"type": "array",
"items": {
"type": "string"
}
},
"port": {
"type": "integer",
"format": "int32"
},
"protocol": {
"type": "string"
},
"healthcheck_path": {
"type": "string"
},
"healthcheck_interval": {
"type": "integer",
"format": "int32"
},
"healthcheck_timeout": {
"type": "integer",
"format": "int32"
},
"secrets": {
"$ref": "#/components/schemas/ServiceSecrets"
},
"configs": {
"$ref": "#/components/schemas/ServiceConfigs"
},
"mounts": {
"$ref": "#/components/schemas/ServiceMounts"
},
"environment_variables": {
"$ref": "#/components/schemas/EnvironmentVariables"
},
"placement_constraints": {
"$ref": "#/components/schemas/PlacementConstraints"
},
"update_order": {
"type": "string",
"enum": [
"stop-first",
"start-first"
]
},
"update_delay": {
"type": "integer",
"format": "int32"
},
"update_parallelism": {
"type": "integer",
"format": "int32"
},
"update_failure_action": {
"type": "string",
"enum": [
"continue",
"pause",
"rollback"
]
},
"update_max_failure_ratio": {
"type": "number",
"format": "float"
},
"update_monitor": {
"type": "integer",
"format": "int32"
},
"rollback_order": {
"type": "string",
"enum": [
"stop-first",
"start-first"
]
},
"rollback_delay": {
"type": "integer",
"format": "int32"
},
"rollback_parallelism": {
"type": "integer",
"format": "int32"
},
"rollback_failure_action": {
"type": "string",
"enum": [
"continue",
"pause"
]
},
"rollback_max_failure_ratio": {
"type": "number",
"format": "float"
},
"rollback_monitor": {
"type": "integer",
"format": "int32"
},
"object": {
"type": "string"
}
}
}
Response 401 Unauthorized
Refer to the common response description: 401.
Response 404 Not Found
Refer to the common response description: 404.
Response 500 Internal Server Error
Refer to the common response description: 500.
PUT /companies/{company_id}/clusters/{cluster_id}/services/{service_id}¶
Update a service
Description
Update a service running on the cluster, fully replacing the resource.
Whether or not provided, all lists associated with the service (secrets
,
configs
, volumes
, environment_variables
and
placement_constraints
) are replaced entirely.
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
basicAuth |
header | string | N/A | No | Basic authentication |
cluster_id |
path | string | No | The `id` of the cluster in which the service belongs | |
company_id |
path | string | No | The `id` of the company in which the cluster belongs | |
service_id |
path | string | No | The `id` of the service to be retrieved running in the cluster |
Request body
{
"value": {
"image": "redis",
"replicas": 3,
"healthcheck_path": "/healthcheck",
"healthcheck_interval": 5,
"healthcheck_timeout": 1,
"secrets": [
{
"name": "mysecret",
"file_name": "/var/run/secrets",
"uid": "0",
"gid": "0",
"mode": "600"
}
],
"configs": [
{
"name": "mysecret",
"file_name": "/var/run/configs",
"uid": "0",
"gid": "0",
"mode": "600"
}
],
"mounts": [
{
"target": "/mnt/myvolume",
"source": "myvolume",
"readonly": true
}
],
"environment_variables": [
{
"key": "MYVAR2",
"value": "another_value"
}
],
"placement_constraints": [
"node.labels.your_label2 != small"
],
"update_order": "stop-first",
"update_delay": 30,
"update_parallelism": 1,
"update_failure_action": "continue",
"update_max_failure_ratio": 0.33,
"update_monitor": 15,
"rollback_order": "start-first",
"rollback_delay": 0,
"rollback_parallelism": 1,
"rollback_failure_action": "pause",
"rollback_max_failure_ratio": 0,
"rollback_monitor": 5
}
}
Schema of the request body
{
"type": "object",
"properties": {
"image": {
"type": "string"
},
"replicas": {
"type": "integer",
"format": "int32"
},
"command": {
"type": "string"
},
"args": {
"type": "string"
},
"hosts": {
"type": "array",
"items": {
"type": "string"
}
},
"port": {
"type": "integer",
"format": "int32"
},
"protocol": {
"type": "string"
},
"healthcheck_path": {
"type": "string"
},
"healthcheck_interval": {
"type": "integer",
"format": "int32"
},
"healthcheck_timeout": {
"type": "integer",
"format": "int32"
},
"mode": {
"type": "string"
},
"secrets": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"example": "dwhb4a0itpah4mnniozsodhql"
},
"file_name": {
"type": "string",
"example": "my_filename"
},
"uid": {
"type": "string",
"example": "0"
},
"gid": {
"type": "string",
"example": "0"
},
"mode": {
"type": "string",
"example": "420"
}
}
}
},
"configs": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"example": "pj2acl6c8hp9b0yckwbuo11nl"
},
"file_name": {
"type": "string",
"example": "updated_filename"
},
"uid": {
"type": "string",
"example": "0"
},
"gid": {
"type": "string",
"example": "0"
},
"mode": {
"type": "string",
"example": "420"
}
}
}
},
"mounts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"target": {
"type": "string",
"example": "/mnt/myvolume"
},
"source": {
"type": "string",
"example": "myvolume"
},
"readonly": {
"type": "boolean",
"example": true
}
}
}
},
"environment_variables": {
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string",
"example": "ciao"
},
"value": {
"type": "string",
"example": "mondo"
}
}
}
},
"placement_constraints": {
"type": "array",
"items": {
"type": "string",
"example": "node.labels.your_label2 != small"
}
},
"update_order": {
"type": "string",
"enum": [
"stop-first",
"start-first"
]
},
"update_delay": {
"type": "integer",
"format": "int32"
},
"update_parallelism": {
"type": "integer",
"format": "int32"
},
"update_failure_action": {
"type": "string",
"enum": [
"continue",
"pause",
"rollback"
]
},
"update_max_failure_ratio": {
"type": "number",
"format": "float"
},
"update_monitor": {
"type": "integer",
"format": "int32"
},
"rollback_order": {
"type": "string",
"enum": [
"stop-first",
"start-first"
]
},
"rollback_delay": {
"type": "integer",
"format": "int32"
},
"rollback_parallelism": {
"type": "integer",
"format": "int32"
},
"rollback_failure_action": {
"type": "string",
"enum": [
"continue",
"pause"
]
},
"rollback_max_failure_ratio": {
"type": "number",
"format": "float"
},
"rollback_monitor": {
"type": "integer",
"format": "int32"
},
"object": {
"type": "string"
}
}
}
Response 201 Created
{
"id": "string",
"name": "string",
"image": "string",
"replicas": 224,
"command": "string",
"args": "string",
"hosts": [
"string"
],
"port": 300,
"protocol": "string",
"healthcheck_path": "string",
"healthcheck_interval": 162,
"healthcheck_timeout": 278,
"secrets": [
{
"id": "string",
"name": "string",
"file_name": "string",
"uid": 242,
"gid": 138,
"mode": "string"
}
],
"configs": [
{
"id": "string",
"name": "string",
"file_name": "string",
"uid": 26,
"gid": 136,
"mode": "string"
}
],
"mounts": [
{
"type": "string",
"target": "string",
"source": "string",
"readonly": true
}
],
"environment_variables": [
{
"key": "string",
"value": "string"
}
],
"placement_constraints": [
"string"
],
"update_order": "stop-first",
"update_delay": 168,
"update_parallelism": 135,
"update_failure_action": "continue",
"update_max_failure_ratio": 10.12,
"update_monitor": 73,
"rollback_order": "stop-first",
"rollback_delay": 50,
"rollback_parallelism": 261,
"rollback_failure_action": "continue",
"rollback_max_failure_ratio": 10.12,
"rollback_monitor": 145,
"object": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"image": {
"type": "string"
},
"replicas": {
"type": "integer",
"format": "int32"
},
"command": {
"type": "string"
},
"args": {
"type": "string"
},
"hosts": {
"type": "array",
"items": {
"type": "string"
}
},
"port": {
"type": "integer",
"format": "int32"
},
"protocol": {
"type": "string"
},
"healthcheck_path": {
"type": "string"
},
"healthcheck_interval": {
"type": "integer",
"format": "int32"
},
"healthcheck_timeout": {
"type": "integer",
"format": "int32"
},
"secrets": {
"$ref": "#/components/schemas/ServiceSecrets"
},
"configs": {
"$ref": "#/components/schemas/ServiceConfigs"
},
"mounts": {
"$ref": "#/components/schemas/ServiceMounts"
},
"environment_variables": {
"$ref": "#/components/schemas/EnvironmentVariables"
},
"placement_constraints": {
"$ref": "#/components/schemas/PlacementConstraints"
},
"update_order": {
"type": "string",
"enum": [
"stop-first",
"start-first"
]
},
"update_delay": {
"type": "integer",
"format": "int32"
},
"update_parallelism": {
"type": "integer",
"format": "int32"
},
"update_failure_action": {
"type": "string",
"enum": [
"continue",
"pause",
"rollback"
]
},
"update_max_failure_ratio": {
"type": "number",
"format": "float"
},
"update_monitor": {
"type": "integer",
"format": "int32"
},
"rollback_order": {
"type": "string",
"enum": [
"stop-first",
"start-first"
]
},
"rollback_delay": {
"type": "integer",
"format": "int32"
},
"rollback_parallelism": {
"type": "integer",
"format": "int32"
},
"rollback_failure_action": {
"type": "string",
"enum": [
"continue",
"pause"
]
},
"rollback_max_failure_ratio": {
"type": "number",
"format": "float"
},
"rollback_monitor": {
"type": "integer",
"format": "int32"
},
"object": {
"type": "string"
}
}
}
Response 400 Bad Request
{
"code": 400,
"type": "invalid_request_error",
"param": "name",
"message": "name must be a string"
}
{
"code": 400,
"type": "invalid_request_error",
"param": "hosts",
"message": "hosts no ip address for test.test, example.com does not resolve to manager ip address 1.2.3.4"
}
Schema of the response body
Response 404 Not Found
Refer to the common response description: 404.
Response 500 Internal Server Error
Refer to the common response description: 500.
PATCH /companies/{company_id}/clusters/{cluster_id}/services/{service_id}¶
Update a service
Description
Update a service running on the cluster, partially updating the resource. If
provided, a list associated with the service (secrets
, configs
,
volumes
, environment_variables
or placement_constraints
) is
replaced entirely.
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
basicAuth |
header | string | N/A | No | Basic authentication |
cluster_id |
path | string | No | The `id` of the cluster in which the service belongs | |
company_id |
path | string | No | The `id` of the company in which the cluster belongs | |
service_id |
path | string | No | The `id` of the service to be retrieved running in the cluster |
Request body
{
"value": {
"image": "redis",
"replicas": 3,
"healthcheck_path": "/healthcheck",
"healthcheck_interval": 5,
"healthcheck_timeout": 1,
"secrets": [
{
"name": "mysecret",
"file_name": "/var/run/secrets",
"uid": "0",
"gid": "0",
"mode": "600"
}
],
"configs": [
{
"name": "mysecret",
"file_name": "/var/run/configs",
"uid": "0",
"gid": "0",
"mode": "600"
}
],
"mounts": [
{
"target": "/mnt/myvolume",
"source": "myvolume",
"readonly": true
}
],
"environment_variables": [
{
"key": "MYVAR2",
"value": "another_value"
}
],
"placement_constraints": [
"node.labels.your_label2 != small"
],
"update_order": "stop-first",
"update_delay": 30,
"update_parallelism": 1,
"update_failure_action": "continue",
"update_max_failure_ratio": 0.33,
"update_monitor": 15,
"rollback_order": "start-first",
"rollback_delay": 0,
"rollback_parallelism": 1,
"rollback_failure_action": "pause",
"rollback_max_failure_ratio": 0,
"rollback_monitor": 5
}
}
Schema of the request body
{
"type": "object",
"properties": {
"image": {
"type": "string"
},
"replicas": {
"type": "integer",
"format": "int32"
},
"command": {
"type": "string"
},
"args": {
"type": "string"
},
"hosts": {
"type": "array",
"items": {
"type": "string"
}
},
"port": {
"type": "integer",
"format": "int32"
},
"protocol": {
"type": "string"
},
"healthcheck_path": {
"type": "string"
},
"healthcheck_interval": {
"type": "integer",
"format": "int32"
},
"healthcheck_timeout": {
"type": "integer",
"format": "int32"
},
"mode": {
"type": "string"
},
"secrets": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"example": "dwhb4a0itpah4mnniozsodhql"
},
"file_name": {
"type": "string",
"example": "my_filename"
},
"uid": {
"type": "string",
"example": "0"
},
"gid": {
"type": "string",
"example": "0"
},
"mode": {
"type": "string",
"example": "420"
}
}
}
},
"configs": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"example": "pj2acl6c8hp9b0yckwbuo11nl"
},
"file_name": {
"type": "string",
"example": "updated_filename"
},
"uid": {
"type": "string",
"example": "0"
},
"gid": {
"type": "string",
"example": "0"
},
"mode": {
"type": "string",
"example": "420"
}
}
}
},
"mounts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"target": {
"type": "string",
"example": "/mnt/myvolume"
},
"source": {
"type": "string",
"example": "myvolume"
},
"readonly": {
"type": "boolean",
"example": true
}
}
}
},
"environment_variables": {
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string",
"example": "ciao"
},
"value": {
"type": "string",
"example": "mondo"
}
}
}
},
"placement_constraints": {
"type": "array",
"items": {
"type": "string",
"example": "node.labels.your_label2 != small"
}
},
"update_order": {
"type": "string",
"enum": [
"stop-first",
"start-first"
]
},
"update_delay": {
"type": "integer",
"format": "int32"
},
"update_parallelism": {
"type": "integer",
"format": "int32"
},
"update_failure_action": {
"type": "string",
"enum": [
"continue",
"pause",
"rollback"
]
},
"update_max_failure_ratio": {
"type": "number",
"format": "float"
},
"update_monitor": {
"type": "integer",
"format": "int32"
},
"rollback_order": {
"type": "string",
"enum": [
"stop-first",
"start-first"
]
},
"rollback_delay": {
"type": "integer",
"format": "int32"
},
"rollback_parallelism": {
"type": "integer",
"format": "int32"
},
"rollback_failure_action": {
"type": "string",
"enum": [
"continue",
"pause"
]
},
"rollback_max_failure_ratio": {
"type": "number",
"format": "float"
},
"rollback_monitor": {
"type": "integer",
"format": "int32"
},
"object": {
"type": "string"
}
}
}
Response 201 Created
{
"id": "string",
"name": "string",
"image": "string",
"replicas": 132,
"command": "string",
"args": "string",
"hosts": [
"string"
],
"port": 281,
"protocol": "string",
"healthcheck_path": "string",
"healthcheck_interval": 55,
"healthcheck_timeout": 276,
"secrets": [
{
"id": "string",
"name": "string",
"file_name": "string",
"uid": 261,
"gid": 255,
"mode": "string"
}
],
"configs": [
{
"id": "string",
"name": "string",
"file_name": "string",
"uid": 203,
"gid": 218,
"mode": "string"
}
],
"mounts": [
{
"type": "string",
"target": "string",
"source": "string",
"readonly": true
}
],
"environment_variables": [
{
"key": "string",
"value": "string"
}
],
"placement_constraints": [
"string"
],
"update_order": "stop-first",
"update_delay": 136,
"update_parallelism": 251,
"update_failure_action": "continue",
"update_max_failure_ratio": 10.12,
"update_monitor": 221,
"rollback_order": "stop-first",
"rollback_delay": 33,
"rollback_parallelism": 94,
"rollback_failure_action": "continue",
"rollback_max_failure_ratio": 10.12,
"rollback_monitor": 240,
"object": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"image": {
"type": "string"
},
"replicas": {
"type": "integer",
"format": "int32"
},
"command": {
"type": "string"
},
"args": {
"type": "string"
},
"hosts": {
"type": "array",
"items": {
"type": "string"
}
},
"port": {
"type": "integer",
"format": "int32"
},
"protocol": {
"type": "string"
},
"healthcheck_path": {
"type": "string"
},
"healthcheck_interval": {
"type": "integer",
"format": "int32"
},
"healthcheck_timeout": {
"type": "integer",
"format": "int32"
},
"secrets": {
"$ref": "#/components/schemas/ServiceSecrets"
},
"configs": {
"$ref": "#/components/schemas/ServiceConfigs"
},
"mounts": {
"$ref": "#/components/schemas/ServiceMounts"
},
"environment_variables": {
"$ref": "#/components/schemas/EnvironmentVariables"
},
"placement_constraints": {
"$ref": "#/components/schemas/PlacementConstraints"
},
"update_order": {
"type": "string",
"enum": [
"stop-first",
"start-first"
]
},
"update_delay": {
"type": "integer",
"format": "int32"
},
"update_parallelism": {
"type": "integer",
"format": "int32"
},
"update_failure_action": {
"type": "string",
"enum": [
"continue",
"pause",
"rollback"
]
},
"update_max_failure_ratio": {
"type": "number",
"format": "float"
},
"update_monitor": {
"type": "integer",
"format": "int32"
},
"rollback_order": {
"type": "string",
"enum": [
"stop-first",
"start-first"
]
},
"rollback_delay": {
"type": "integer",
"format": "int32"
},
"rollback_parallelism": {
"type": "integer",
"format": "int32"
},
"rollback_failure_action": {
"type": "string",
"enum": [
"continue",
"pause"
]
},
"rollback_max_failure_ratio": {
"type": "number",
"format": "float"
},
"rollback_monitor": {
"type": "integer",
"format": "int32"
},
"object": {
"type": "string"
}
}
}
Response 400 Bad Request
{
"code": 400,
"type": "invalid_request_error",
"param": "name",
"message": "name must be a string"
}
{
"code": 400,
"type": "invalid_request_error",
"param": "hosts",
"message": "hosts no ip address for test.test, example.com does not resolve to manager ip address 1.2.3.4"
}
Schema of the response body
Response 404 Not Found
Refer to the common response description: 404.
Response 500 Internal Server Error
Refer to the common response description: 500.
DELETE /companies/{company_id}/clusters/{cluster_id}/services/{service_id}¶
Delete a service
Description
Delete a service from the cluster
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
basicAuth |
header | string | N/A | No | Basic authentication |
cluster_id |
path | string | No | The `id` of the cluster in which the service belongs | |
company_id |
path | string | No | The `id` of the company in which the cluster belongs | |
service_id |
path | string | No | The `id` of the service to be retrieved running in the cluster |
Response 204 No Content
Refer to the common response description: 204.
Response 404 Not Found
Refer to the common response description: 404.
Response 401 Unauthorized
Refer to the common response description: 401.
POST /companies/{company_id}/clusters/{cluster_id}/services/{service_id}/refresh_image¶
Refresh service image
Description
Restarts a service by stopping and starting all of a service's containers.
Often used for deployments where the :latest
image tag is used, or
troubleshooting.
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
basicAuth |
header | string | N/A | No | Basic authentication |
cluster_id |
path | string | No | The `id` of the cluster in which the service belongs | |
company_id |
path | string | No | The `id` of the company in which the cluster belongs | |
service_id |
path | string | No | The `id` of the service to be retrieved running in the cluster |
Response 200 OK
{
"id": "string",
"name": "string",
"image": "string",
"replicas": 58,
"command": "string",
"args": "string",
"hosts": [
"string"
],
"port": 193,
"protocol": "string",
"healthcheck_path": "string",
"healthcheck_interval": 156,
"healthcheck_timeout": 223,
"secrets": [
{
"id": "string",
"name": "string",
"file_name": "string",
"uid": 204,
"gid": 63,
"mode": "string"
}
],
"configs": [
{
"id": "string",
"name": "string",
"file_name": "string",
"uid": 74,
"gid": 272,
"mode": "string"
}
],
"mounts": [
{
"type": "string",
"target": "string",
"source": "string",
"readonly": true
}
],
"environment_variables": [
{
"key": "string",
"value": "string"
}
],
"placement_constraints": [
"string"
],
"update_order": "stop-first",
"update_delay": 249,
"update_parallelism": 220,
"update_failure_action": "continue",
"update_max_failure_ratio": 10.12,
"update_monitor": 189,
"rollback_order": "stop-first",
"rollback_delay": 23,
"rollback_parallelism": 278,
"rollback_failure_action": "continue",
"rollback_max_failure_ratio": 10.12,
"rollback_monitor": 269,
"object": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"image": {
"type": "string"
},
"replicas": {
"type": "integer",
"format": "int32"
},
"command": {
"type": "string"
},
"args": {
"type": "string"
},
"hosts": {
"type": "array",
"items": {
"type": "string"
}
},
"port": {
"type": "integer",
"format": "int32"
},
"protocol": {
"type": "string"
},
"healthcheck_path": {
"type": "string"
},
"healthcheck_interval": {
"type": "integer",
"format": "int32"
},
"healthcheck_timeout": {
"type": "integer",
"format": "int32"
},
"secrets": {
"$ref": "#/components/schemas/ServiceSecrets"
},
"configs": {
"$ref": "#/components/schemas/ServiceConfigs"
},
"mounts": {
"$ref": "#/components/schemas/ServiceMounts"
},
"environment_variables": {
"$ref": "#/components/schemas/EnvironmentVariables"
},
"placement_constraints": {
"$ref": "#/components/schemas/PlacementConstraints"
},
"update_order": {
"type": "string",
"enum": [
"stop-first",
"start-first"
]
},
"update_delay": {
"type": "integer",
"format": "int32"
},
"update_parallelism": {
"type": "integer",
"format": "int32"
},
"update_failure_action": {
"type": "string",
"enum": [
"continue",
"pause",
"rollback"
]
},
"update_max_failure_ratio": {
"type": "number",
"format": "float"
},
"update_monitor": {
"type": "integer",
"format": "int32"
},
"rollback_order": {
"type": "string",
"enum": [
"stop-first",
"start-first"
]
},
"rollback_delay": {
"type": "integer",
"format": "int32"
},
"rollback_parallelism": {
"type": "integer",
"format": "int32"
},
"rollback_failure_action": {
"type": "string",
"enum": [
"continue",
"pause"
]
},
"rollback_max_failure_ratio": {
"type": "number",
"format": "float"
},
"rollback_monitor": {
"type": "integer",
"format": "int32"
},
"object": {
"type": "string"
}
}
}
Response 400 Bad Request
{
"code": 400,
"type": "invalid_request_error",
"param": "name",
"message": "name must be a string"
}
{
"code": 400,
"type": "invalid_request_error",
"param": "hosts",
"message": "hosts no ip address for test.test, example.com does not resolve to manager ip address 1.2.3.4"
}
Schema of the response body
Response 401 Unauthorized
Refer to the common response description: 401.
Response 404 Not Found
Refer to the common response description: 404.
Response 500 Internal Server Error
Refer to the common response description: 500.
GET /companies/{company_id}/clusters/{cluster_id}/secrets¶
Get a list of secrets
Description
List secrets on a cluster
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
basicAuth |
header | string | N/A | No | Basic authentication |
cluster_id |
path | string | No | The `id` of the cluster in which the service belongs | |
company_id |
path | string | No | The `id` of the company in which the cluster belongs |
Response 200 OK
{
"object": "string",
"data": [
{
"id": "string",
"object": "string",
"name": "string",
"created": "string"
}
]
}
Schema of the response body
{
"type": "object",
"properties": {
"object": {
"type": "string"
},
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"object": {
"type": "string"
},
"name": {
"type": "string"
},
"created": {
"type": "string"
}
}
}
}
}
}
Response 401 Unauthorized
Refer to the common response description: 401.
Response 404 Not Found
Refer to the common response description: 404.
Response 500 Internal Server Error
Refer to the common response description: 500.
POST /companies/{company_id}/clusters/{cluster_id}/secrets¶
Create a secret
Description
Add a new secret on a cluster
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
basicAuth |
header | string | N/A | No | Basic authentication |
cluster_id |
path | string | No | The `id` of the cluster in which the service belongs | |
company_id |
path | string | No | The `id` of the company in which the cluster belongs |
Request body
{
"name": "mysecret",
"data": "abcxyz123"
}
Schema of the request body
{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"data": {
"type": "string"
}
}
}
Response 201 Created
{
"id": "string",
"object": "string",
"name": "string",
"created": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"object": {
"type": "string"
},
"name": {
"type": "string"
},
"created": {
"type": "string"
}
}
}
Response 400 Bad Request
Refer to the common response description: 400.
Response 404 Not Found
Refer to the common response description: 404.
Response 500 Internal Server Error
Refer to the common response description: 500.
DELETE /companies/{company_id}/clusters/{cluster_id}/secrets/{secret_id}¶
Delete a secret
Description
Delete a secret from the cluster
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
basicAuth |
header | string | N/A | No | Basic authentication |
cluster_id |
path | string | No | The `id` of the cluster in which the service belongs | |
company_id |
path | string | No | The `id` of the company in which the cluster belongs | |
secret_id |
path | string | No | The `id` of the secret to be retrieved |
Response 204 No Content
Refer to the common response description: 204.
Response 404 Not Found
Refer to the common response description: 404.
Response 401 Unauthorized
Refer to the common response description: 401.
GET /companies/{company_id}/clusters/{cluster_id}/configs¶
Get a list of configs
Description
List configs on a cluster
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
basicAuth |
header | string | N/A | No | Basic authentication |
cluster_id |
path | string | No | The `id` of the cluster in which the service belongs | |
company_id |
path | string | No | The `id` of the company in which the cluster belongs |
Response 200 OK
{
"object": "string",
"data": [
{
"id": "string",
"object": "string",
"name": "string",
"data": "string",
"created": "string"
}
]
}
Schema of the response body
{
"type": "object",
"properties": {
"object": {
"type": "string"
},
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"object": {
"type": "string"
},
"name": {
"type": "string"
},
"data": {
"type": "string"
},
"created": {
"type": "string"
}
}
}
}
}
}
Response 401 Unauthorized
Refer to the common response description: 401.
Response 404 Not Found
Refer to the common response description: 404.
Response 500 Internal Server Error
Refer to the common response description: 500.
POST /companies/{company_id}/clusters/{cluster_id}/configs¶
Create a config
Description
Add a new config on a cluster
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
basicAuth |
header | string | N/A | No | Basic authentication |
cluster_id |
path | string | No | The `id` of the cluster in which the service belongs | |
company_id |
path | string | No | The `id` of the company in which the cluster belongs |
Request body
{
"name": "myconfig",
"data": "abcxyz123"
}
Schema of the request body
{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"data": {
"type": "string"
}
}
}
Response 201 Created
{
"id": "string",
"object": "string",
"name": "string",
"data": "string",
"created": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"object": {
"type": "string"
},
"name": {
"type": "string"
},
"data": {
"type": "string"
},
"created": {
"type": "string"
}
}
}
Response 400 Bad Request
Refer to the common response description: 400.
Response 404 Not Found
Refer to the common response description: 404.
Response 500 Internal Server Error
Refer to the common response description: 500.
GET /companies/{company_id}/clusters/{cluster_id}/configs/{config_id}¶
Get a config
Description
Fetch a config by id
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
basicAuth |
header | string | N/A | No | Basic authentication |
cluster_id |
path | string | No | The `id` of the cluster in which the service belongs | |
company_id |
path | string | No | The `id` of the company in which the cluster belongs | |
config_id |
path | string | No | The `id` of the config to be retrieved |
Response 200 OK
{
"id": "string",
"object": "string",
"name": "string",
"data": "string",
"created": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"object": {
"type": "string"
},
"name": {
"type": "string"
},
"data": {
"type": "string"
},
"created": {
"type": "string"
}
}
}
Response 401 Unauthorized
Refer to the common response description: 401.
Response 404 Not Found
Refer to the common response description: 404.
Response 500 Internal Server Error
Refer to the common response description: 500.
DELETE /companies/{company_id}/clusters/{cluster_id}/configs/{config_id}¶
Delete a config
Description
Delete a config from the cluster
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
basicAuth |
header | string | N/A | No | Basic authentication |
cluster_id |
path | string | No | The `id` of the cluster in which the service belongs | |
company_id |
path | string | No | The `id` of the company in which the cluster belongs | |
config_id |
path | string | No | The `id` of the config to be retrieved |
Response 204 No Content
Refer to the common response description: 204.
Response 404 Not Found
Refer to the common response description: 404.
Response 401 Unauthorized
Refer to the common response description: 401.
GET /companies/{company_id}/clusters/{cluster_id}/volumes¶
Get a list of volumes
Description
List volumes on a cluster with their associated service usage
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
basicAuth |
header | string | N/A | No | Basic authentication |
cluster_id |
path | string | No | The `id` of the cluster in which the service belongs | |
company_id |
path | string | No | The `id` of the company in which the cluster belongs |
Response 200 OK
{
"object": "string",
"data": [
{
"id": "string",
"object": "string",
"name": "string",
"created": "string",
"service_usage": [
"string"
]
}
]
}
Schema of the response body
{
"type": "object",
"properties": {
"object": {
"type": "string"
},
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"object": {
"type": "string"
},
"name": {
"type": "string"
},
"created": {
"type": "string"
},
"service_usage": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
}
Response 401 Unauthorized
Refer to the common response description: 401.
Response 404 Not Found
Refer to the common response description: 404.
Response 500 Internal Server Error
Refer to the common response description: 500.
POST /companies/{company_id}/clusters/{cluster_id}/volumes¶
Create a volume
Description
Add a new volume on a cluster
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
basicAuth |
header | string | N/A | No | Basic authentication |
cluster_id |
path | string | No | The `id` of the cluster in which the service belongs | |
company_id |
path | string | No | The `id` of the company in which the cluster belongs |
Request body
{
"name": "myvolume"
}
Schema of the request body
{
"type": "object",
"properties": {
"name": {
"type": "string"
}
}
}
Response 201 Created
{
"id": "string",
"object": "string",
"name": "string",
"created": "string",
"service_usage": [
"string"
]
}
Schema of the response body
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"object": {
"type": "string"
},
"name": {
"type": "string"
},
"created": {
"type": "string"
},
"service_usage": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
Response 400 Bad Request
Refer to the common response description: 400.
Response 404 Not Found
Refer to the common response description: 404.
Response 500 Internal Server Error
Refer to the common response description: 500.
DELETE /companies/{company_id}/clusters/{cluster_id}/volumes/{volume_id}¶
Delete a volume
Description
Delete a volume from the cluster
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
basicAuth |
header | string | N/A | No | Basic authentication |
cluster_id |
path | string | No | The `id` of the cluster in which the service belongs | |
company_id |
path | string | No | The `id` of the company in which the cluster belongs | |
volume_id |
path | string | No | The `id` of the volume to be retrieved |
Response 204 No Content
Refer to the common response description: 204.
Response 404 Not Found
Refer to the common response description: 404.
Response 401 Unauthorized
Refer to the common response description: 401.
GET /companies/{company_id}/clusters/{cluster_id}/tasks¶
Get a list of tasks
Description
Lists the status and desired state of all service container tasks in a cluster. This feature may be available upon request and is currently In Preview. Please contact support to request access.
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
basicAuth |
header | string | N/A | No | Basic authentication |
cluster_id |
path | string | No | The `id` of the cluster in which the service belongs | |
company_id |
path | string | No | The `id` of the company in which the cluster belongs |
Response 200 OK
{
"object": "string",
"data": [
{
"id": "string",
"service_id": "string",
"container_id": "string",
"status": {
"timestamp": "string",
"state": "string",
"message": "string",
"error": "string"
},
"desired_state": "string",
"created_at": "string"
}
]
}
Schema of the response body
{
"type": "object",
"properties": {
"object": {
"type": "string"
},
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"service_id": {
"type": "string"
},
"container_id": {
"type": "string",
"nullable": true
},
"status": {
"type": "object",
"properties": {
"timestamp": {
"type": "string"
},
"state": {
"type": "string"
},
"message": {
"type": "string"
},
"error": {
"type": "string",
"nullable": true
}
}
},
"desired_state": {
"type": "string"
},
"created_at": {
"type": "string"
}
}
}
}
}
}
Response 401 Unauthorized
Refer to the common response description: 401.
Response 404 Not Found
Refer to the common response description: 404.
Response 500 Internal Server Error
Refer to the common response description: 500.
Schemas¶
Cluster¶
Name | Type |
---|---|
id |
string |
infrastructure_provider |
Properties: id |
label |
string |
object |
string |
region |
Properties: name |
Clusters¶
Name | Type |
---|---|
data |
Array<Cluster> |
object |
string |
Companies¶
Name | Type |
---|---|
data |
Array<Company> |
object |
string |
Company¶
Name | Type |
---|---|
city |
string |
country |
string |
id |
string |
name |
string |
object |
string |
phone_number |
string |
postal_code |
string |
province |
string |
street_address |
string |
DockerNode¶
Name | Type |
---|---|
id |
string |
labels |
Array<string> |
EnvironmentVariable¶
Name | Type |
---|---|
key |
string |
value |
string |
EnvironmentVariables¶
Type: Array<EnvironmentVariable>
Node¶
Name | Type |
---|---|
id |
string |
operating_system |
Properties: type, distribution, version |
public_ip_address |
string |
size |
string |
status |
string |
swarm_manager |
boolean |
Nodes¶
Name | Type |
---|---|
data |
Array<Node> |
object |
string |
NodeSizes¶
Name | Type |
---|---|
data |
Array<Properties: id, object, title, vcpu, memory > |
object |
string |
PlacementConstraint¶
Type: string
PlacementConstraints¶
Type: Array<PlacementConstraint>
Service¶
Name | Type |
---|---|
args |
string |
command |
string |
configs |
ServiceConfigs |
environment_variables |
EnvironmentVariables |
healthcheck_interval |
integer(int32) |
healthcheck_path |
string |
healthcheck_timeout |
integer(int32) |
hosts |
Array<string> |
id |
string |
image |
string |
mounts |
ServiceMounts |
name |
string |
object |
string |
placement_constraints |
PlacementConstraints |
port |
integer(int32) |
protocol |
string |
replicas |
integer(int32) |
rollback_delay |
integer(int32) |
rollback_failure_action |
string |
rollback_max_failure_ratio |
number(float) |
rollback_monitor |
integer(int32) |
rollback_order |
string |
rollback_parallelism |
integer(int32) |
secrets |
ServiceSecrets |
update_delay |
integer(int32) |
update_failure_action |
string |
update_max_failure_ratio |
number(float) |
update_monitor |
integer(int32) |
update_order |
string |
update_parallelism |
integer(int32) |
ServiceConfig¶
Name | Type |
---|---|
file_name |
string |
gid |
integer(int64) |
id |
string |
mode |
string |
name |
string |
uid |
integer(int64) |
ServiceConfigs¶
Type: Array<ServiceConfig>
ServiceMount¶
Name | Type |
---|---|
readonly |
boolean |
source |
string |
target |
string |
type |
string |
ServiceMounts¶
Type: Array<ServiceMount>
Services¶
Name | Type |
---|---|
data |
Array<Service> |
object |
string |
ServiceSecret¶
Name | Type |
---|---|
file_name |
string |
gid |
integer(int64) |
id |
string |
mode |
string |
name |
string |
uid |
integer(int64) |
ServiceSecrets¶
Type: Array<ServiceSecret>
Common responses¶
This section describes common responses that are reused across operations.
204¶
Request succeeeded with no content to return
400¶
Request body contains incorrect types or invalid format
{
"code": 400,
"type": "invalid_request_error",
"param": "name",
"message": "must be a string"
}
Schema of the response body
401¶
Authorization information is missing or invalid
404¶
An entity with the specified id
or path was not found
{
"code": 404,
"type": "not_found",
"message": "Path not found"
}
Schema of the response body
409¶
Request cannot be completed because it is incompatible with the resource's current state.
{
"code": 409,
"type": "conflict error",
"message": "Request conflicts with the resource's current state"
}
Schema of the response body
500¶
Unexpected error
{
"code": 500,
"type": "error",
"message": "An error occured"
}
Schema of the response body
Common parameters¶
This section describes common parameters that are reused across operations.
companyId¶
Name | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
company_id |
path | string | No |
clusterId¶
Name | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
cluster_id |
path | string | No |
nodeId¶
Name | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
node_id |
path | string | No |
serviceId¶
Name | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
service_id |
path | string | No |
Security schemes¶
Name | Type | Scheme | Description |
---|---|---|---|
basicAuth | http | basic |