Container Services¶
List all container services¶
GET /api/container_services
OAuth authorization required: projects_read
View Schema
container_services: Arrayid: Integername: Stringdefault_domain: Stringpublic_ip: Stringcommand: Stringis_load_balancer: Booleanhas_domain_management: Booleancontainer_image_id: Integercurrent_state: Stringauto_scale: Booleanauto_scale_horizontal: Booleanauto_scale_max: Booleanlabels: Objectcreated_at: DateTimeupdated_at: DateTimeproject: Objectid: Integername: String
package: Objectlabel: Stringcpu: Decimalmemory: Integerstorage: Integerbandwidth: Integerlocal_disk: Integerbackup: Integermemory_swap: Integermemory_swappiness: Integer
has_sftp: Booleaningress_rules:Array<Integer>product_id: Integerbastions:Array<Integer>domains:Array<Integer>deployed_containers: Integerhelp: Objectgeneral: Stringssh: Stringremote: Stringdomain: String
links: Objectproject: String (url)bastions: String (url)containers: String (url)events: String (url)ingress_rules: String (url)metadata: String (url)logs: String (url)products: String (url)
View Container Service¶
GET /api/container_services/{id}
OAuth authorization required: projects_read
View Schema
container_service: Objectid: Integername: Stringdefault_domain: Stringpublic_ip: Stringcommand: Stringis_load_balancer: Booleanhas_domain_management: Booleancontainer_image_id: Integercurrent_state: Stringauto_scale: Booleanauto_scale_horizontal: Booleanauto_scale_max: Booleanlabels: Objectcreated_at: DateTimeupdated_at: DateTimeproject: Objectid: Integername: String
package: Objectlabel: Stringcpu: Decimalmemory: Integerstorage: Integerbandwidth: Integerlocal_disk: Integerbackup: Integermemory_swap: Integermemory_swappiness: Integer
has_sftp: Booleaningress_rules:Array<Integer>product_id: Integerbastions:Array<Integer>domains:Array<Integer>deployed_containers: Integerhelp: Objectgeneral: Stringssh: Stringremote: Stringdomain: String
links: Objectproject: String (url)bastions: String (url)containers: String (url)events: String (url)ingress_rules: String (url)metadata: String (url)logs: String (url)products: String (url)
Update a container service¶
PATCH /api/container_services/{id}
OAuth authorization required: projects_write
Schema
container_service: Objectname: Stringscale: Integerpackage_id: Integermaster_domain_id: Integer | ID of domain that you want to be default.
Delete a container service¶
DELETE /api/container_services/{id}
OAuth authorization required: projects_write
Resize Service¶
Initiate a resize event for a ContainerService
POST /api/container_services/{container-service-id}/resize
OAuth authorization required: projects_write
Schema
product_id: Integer | New plan
Example
Scale Service¶
Initiate a scale event for a ContainerService
POST /api/container_services/{container-service-id}/scale
OAuth authorization required: projects_write
Schema
qty: Integer | The total number of containers this service should have #
Example
Power Management¶
Perform a power action on all containers belonging to a service
PUT /api/container_services/{container-service-id}/power/{action}
OAuth authorization required: projects_write
Schema
action:String<start,stop,restart,rebuild>
Logs¶
View Recent Logs
GET /api/container_services/{id}/logs
OAuth authorization required: projects_read
Schema
limit: Integer | How many lines to include?period_start: Integer | Log date range (start). As an integer, time since epoch. Default: 1 day agoperiod_end: Integer | Log date range (end). As an integer, time since epoch. Default: Now
Returns an Array of Arrays containing: Timestamp, container name, log entry
Example
[
[
1612904254.9995728,
"mystifying-poincare61-104",
"t=2021-02-09T20:57:34+0000 lvl=info msg=\\"HTTP Server Listen\\" logger=http.server address=[::]:3000 protocol=http subUrl= socket="
],
[
1612904254.991145,
"mystifying-poincare61-104",
"t=2021-02-09T20:57:34+0000 lvl=info msg=\\"Registering plugin\\" logger=plugins id=input"
],
[
1612904254.8895183,
"mystifying-poincare61-104",
"t=2021-02-09T20:57:34+0000 lvl=info msg=\\"Starting plugin search\\" logger=plugins"
]
]