Application¶
Contents
Template¶
-
GET
/api/v1/template/
(string: application)/wizard
¶ Read the wizard config file and return with specific language.
Parameters: - application – Application name
Query Parameters: - lang – Wizard language. Default is eng
QTS supports the following languages:
- eng (English)
- chs (Simplified Chinese)
- cht (Traditional Chinese)
- cze (Czech)
- dan (Danish)
- ger (Deutsch)
- spa (Spanish)
- fre (French)
- ita (Italian)
- jpn (Japanese)
- kor (Korean)
- nor (Norwegian)
- pol (Polish)
- rus (Russian)
- fin (Finnish)
- swe (Swedish)
- dut (Dutch)
- tur (Turkish)
- tha (Thai)
- por (Portuguese)
- hun (Hungarian)
- grk (Greek)
- rom (Romanian)
Example request
$ curl -sq -XGET -b cookies.txt \ "http://${QIP}:${QPORT}/container-station/api/v1/template/gitlab/wizard?lang=eng"
Example response
{ "api_version": "v1", "default": { "http_port": 12080, "ssh_port": 12022 }, "description": "## Prerequisites \nYour docker host needs to have 2 cores CPU and 8GB RAM to run GitLab. Please refer to the GitLab <a href=\"https://docs.gitlab.com/ee/install/requirements.html#hardware-requirements\" target=\"_blank\">hardware requirements</a> documentation for additional information.\n\n## Description \n__NOTE__: Please allow a few minutes for the GitLab service to start.\n\nLogin using the default username and password:\n\nUsername: **root**\n\nPassword: **5iveL!fe**\n", "title": "GitLab", "wizard": [ { "form": [ "*" ], "schema": { "properties": { "http_port": { "description": "The port of the GitLab server. Defaults to 12080.", "maximum": 65535, "required": true, "title": "HTTP Port", "type": "integer" }, "ssh_port": { "description": "The ssh port number. Defaults to 12022.<div>Please note that HTTP Port and SSH Port must be different.</div>", "maximum": 65535, "required": true, "title": "SSH Port", "type": "integer" } }, "type": "object" }, "title": "Configure Gitlab" } ] }
User’s application¶
-
GET
/api/v1/apps
¶ List all custom application information.
Example request
$ curl -sq -XGET -b cookies.txt "http://${QIP}:${QPORT}/container-station/api/v1/apps"
Example response
{ "joomla": { "container": [ "joomla_web_1", "joomla_db_1" ], "creating": false, "yml": true } }
-
GET
/api/v1/apps/
(string: name)¶ Get custom application information.
Parameters: - name – Custom application name
Example request
$ curl -sq -XGET -b cookies.txt \ "http://${QIP}:${QPORT}/container-station/api/v1/apps/joomla"
Example response
{ "binding": {}, "createFrom": "wizard", "httpPort": "10082", "name": "joomla", "template": "joomla", "version": "3.8.13" }
-
PUT
/api/v1/apps/
(string: name)/restart
¶ Restart running application.
Parameters: - name – Custom application name
Example request
$ curl -sq -XPUT -b cookies.txt \ "http://${QIP}:${QPORT}/container-station/api/v1/apps/joomla/restart"
Example response
[ "joomla_web_1" ]
-
PUT
/api/v1/apps/
(string: name)/kill
¶ Force stop application containers.
Parameters: - name – Custom application name
Example request
$ curl -sq -XPUT -b cookies.txt \ "http://${QIP}:${QPORT}/container-station/api/v1/apps/joomla/kill"
Example response
[ "joomla_web_1" ]
-
PUT
/api/v1/apps/
(string: name)/start
¶ Start existing application.
Parameters: - name – Custom application name
Example request
$ curl -sq -XPUT -b cookies.txt \ "http://${QIP}:${QPORT}/container-station/api/v1/apps/joomla/start"
Example response
[ "web" ]
-
PUT
/api/v1/apps/
(string: name)/stop
¶ Stop running application without removing them.
Parameters: - name – Custom application name
Example request
$ curl -sq -XPUT -b cookies.txt \ "http://${QIP}:${QPORT}/container-station/api/v1/apps/joomla/stop"
Example response
[ "joomla_web_1" ]
-
DELETE
/api/v1/apps/
(string: name)¶ Remove stopped application containers.
Parameters: - name – Custom application name
Example request
$ curl -sq -XDELETE -b cookies.txt \ "http://${QIP}:${QPORT}/container-station/api/v1/apps/joomla"
Example response
[ "joomla_web_1" ]