{"_id":"588f722cbcace50f0052ba3c","__v":0,"parentDoc":null,"user":"565f3941ea46251700972783","version":{"_id":"588f722bbcace50f0052b9e1","project":"565f5fa26bafd40d0030a064","__v":1,"createdAt":"2017-01-30T17:04:43.410Z","releaseDate":"2017-01-30T17:04:43.410Z","categories":["588f722bbcace50f0052b9e2","588f722bbcace50f0052b9e3","588f722bbcace50f0052b9e4","588f722bbcace50f0052b9e5","588f722bbcace50f0052b9e6","588f722bbcace50f0052b9e7"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"5.3.0","version":"5.3.0"},"category":{"_id":"588f722bbcace50f0052b9e6","__v":0,"project":"565f5fa26bafd40d0030a064","version":"588f722bbcace50f0052b9e1","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2016-02-25T18:09:36.891Z","from_sync":false,"order":4,"slug":"dashboard-api","title":"Dashboard API"},"project":"565f5fa26bafd40d0030a064","updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-02-19T18:18:23.030Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"name":"","code":"{\n    \"host\": {\n        \"api_id\": 95,\n        \"id\": 88,\n        \"name\": \"silly-goose-7845\",\n        \"hostname\": \"silly-goose-7845.nanoscale.io\"\n    }\n}","language":"json","status":200}]},"settings":"","examples":{"codes":[{"code":"curl -b cookies.txt -c cookies.txt -H \"Content-Type: application/json\" -X POST -d '{\"host\":{\"name\":\"silly-goose-7845\",\"hostname\":\"silly-goose-7845.nanoscale.io\"}}' \"http://api.nanoscale.io/apis/95/hosts\"","language":"curl"}]},"method":"post","auth":"required","params":[],"url":"/hosts"},"isReference":true,"order":32,"body":"Creates a single host.\n\nHere is a list of fields that can be provided:\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"key\",\n    \"h-1\": \"type\",\n    \"h-2\": \"description\",\n    \"0-0\": \"name\",\n    \"1-0\": \"hostname\",\n    \"0-1\": \"`string`\",\n    \"1-1\": \"`string`\",\n    \"0-2\": \"The name of the host (internally for nanoscale.io).\",\n    \"1-2\": \"The host name or ip address of the server.\"\n  },\n  \"cols\": 3,\n  \"rows\": 2\n}\n[/block]\nHere is an example of the `JSON` used to create a host:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"host\\\": {\\n        \\\"name\\\": \\\"silly-goose-7845\\\",\\n        \\\"hostname\\\": \\\"silly-goose-7845.nanoscale.io\\\"\\n    }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"hosts-2","type":"endpoint","title":"/hosts"}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format


Documentation

Creates a single host. Here is a list of fields that can be provided: [block:parameters] { "data": { "h-0": "key", "h-1": "type", "h-2": "description", "0-0": "name", "1-0": "hostname", "0-1": "`string`", "1-1": "`string`", "0-2": "The name of the host (internally for nanoscale.io).", "1-2": "The host name or ip address of the server." }, "cols": 3, "rows": 2 } [/block] Here is an example of the `JSON` used to create a host: [block:code] { "codes": [ { "code": "{\n \"host\": {\n \"name\": \"silly-goose-7845\",\n \"hostname\": \"silly-goose-7845.nanoscale.io\"\n }\n}", "language": "json" } ] } [/block]