List of all added machines for this backend
Example request:
GET /backends/2tK74h4mXbjjLlkjjO4SHn3/machines
Host: mist.io
Accept: application/json; charset=UTF-8
Example response:
[
{
"can_start": false,
"can_reboot": true,
"uuid": "447c23edbe944911f23145538915865ebddec230",
"name": "i-5ebfdc59",
"tags":
[
"ap-northeast-1a"
],
"can_stop": true,
"can_destroy": true,
"extra":
{
"status": "running",
"productcode":
[
],
"groups":
[
null
],
"tags":
{
},
"instanceId": "i-5ebfdc59",
"dns_name": "ec2-173-21-215-201.ap-northeast-1.compute.amazonaws.com",
"launchdatetime": "2014-01-13T13:58:03.000Z",
"iam_profile": null,
"imageId": "ami-2f61fe2e",
"kernelid": "aki-42992843",
"keyname": "Mykey",
"availability": "ap-northeast-1a",
"clienttoken": "",
"launchindex": "0",
"ramdiskid": null,
"private_dns": "ip-10-153-6-20.ap-northeast-1.compute.internal",
"instancetype": "t1.micro"
},
"public_ips":
[
"170.21.215.111"
],
"private_ips":
[
"10.153.6.20"
],
"imageId": "ami-2f61fe2e",
"state": "running",
"can_tag": true,
"id": "i-5ebfdc59",
"size": "t1.micro"
}
]
Create machine
Example request:
POST /backends/2tK74h4mXbjjLlkjjO4SHn3/machines
Host: mist.io
Accept: application/json; charset=UTF-8
{
"name":"WebServer 3",
"key":"MyKey2",
"image":"ami-2f61fe2e",
"location":"0",
"size":"t1.micro",
"script":"echo `uptime` > new_file.txt",
"image_extra":"",
"disk":""
}
Json Parameters: | |
---|---|
|
Example response:
{
"public_ips":
[
"50.253.51.216"
],
"extra":
{
"status": "running",
"productcode":
[
],
"groups":
[
null
],
"tags":
{
"Name": "WebServer 3"
},
"instanceId": "i-50dd7257",
"dns_name": "ec2-50-253-51-216.ap-northeast-1.compute.amazonaws.com",
"launchdatetime": "2014-01-15T05:37:50.000Z",
"iam_profile": null,
"imageId": "ami-2f61fe2e",
"kernelid": "aki-42992843",
"keyname": "MyKey2",
"availability": "ap-northeast-1a",
"clienttoken": "",
"launchindex": "0",
"ramdiskid": null,
"private_dns": "ip-10-160-226-156.ap-northeast-1.compute.internal",
"instancetype": "t1.micro"
},
"id": "i-50dd7257",
"private_ips":
[
"10.160.226.156"
],
"name": "WebServer 3"
}
Machine actions like reboot, destroy, shutdown and start
Example request:
POST /backends/2tK74h4mXbjjLlkjjO4SHn3/machines/i-50aa7257
Host: mist.io
Accept: application/json; charset=UTF-8
{
"action":"reboot"
}
Json Parameters: | |
---|---|
|
Add tags/metadata for machine
Example request:
POST /backends/2tK74h4mXbjjLlkjjO4SHn3/machines/i-50aa7257/metadata
Host: mist.io
Accept: application/json; charset=UTF-8
{
"tag":"Backup Machine"
}
Json Parameters: | |
---|---|
|