diff --git a/website/source/docs/http/node.html.md b/website/source/docs/http/node.html.md new file mode 100644 index 000000000..42d8e4075 --- /dev/null +++ b/website/source/docs/http/node.html.md @@ -0,0 +1,208 @@ +--- +layout: "http" +page_title: "HTTP API: /v1/node" +sidebar_current: "docs-http-node-" +description: |- + The '/1/node-' endpoint is used to query a specific client node. +--- + +# /v1/node + +The `node` endpoint is used to query the a specific client node. +By default, the agent's local region is used; another region can +be specified using the `?region=` query parameter. + +## GET + +
+
Description
+
+ Query the status of a client node registered with Nomad. +
+ +
Method
+
GET
+ +
URL
+
`/v1/node/`
+ +
Parameters
+
+ None +
+ +
Returns
+
+ + ```javascript + { + "ID": "c9972143-861d-46e6-df73-1d8287bc3e66", + "Datacenter": "dc1", + "Name": "Armons-MacBook-Air.local", + "Attributes": { + "arch": "amd64", + "cpu.frequency": "1300.000000", + "cpu.modelname": "Intel(R) Core(TM) i5-4250U CPU @ 1.30GHz", + "cpu.numcores": "2", + "cpu.totalcompute": "2600.000000", + "driver.exec": "1", + "driver.java": "1", + "driver.java.runtime": "Java(TM) SE Runtime Environment (build 1.8.0_05-b13)", + "driver.java.version": "1.8.0_05", + "driver.java.vm": "Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)", + "hostname": "Armons-MacBook-Air.local", + "kernel.name": "darwin", + "kernel.version": "14.4.0\n", + "memory.totalbytes": "8589934592", + "os.name": "darwin", + "os.version": "14.4.0", + "storage.bytesfree": "35888713728", + "storage.bytestotal": "249821659136", + "storage.volume": "/dev/disk1" + }, + "Resources": { + "CPU": 2600, + "MemoryMB": 8192, + "DiskMB": 34226, + "IOPS": 0, + "Networks": null + }, + "Reserved": null, + "Links": {}, + "Meta": {}, + "NodeClass": "", + "Drain": false, + "Status": "ready", + "StatusDescription": "", + "CreateIndex": 3, + "ModifyIndex": 4 + } + ``` + +
+
+ +# /v1/node/\/allocations +## GET + +
+
Description
+
+ Query the allocations belonging to a single node. +
+ +
Method
+
GET
+ +
URL
+
`/v1/node//allocations`
+ +
Parameters
+
+ None +
+ +
Returns
+
+ + ```javascript + [ + { + "ID": "3575ba9d-7a12-0c96-7b28-add168c67984", + "EvalID": "151accaa-1ac6-90fe-d427-313e70ccbb88", + "Name": "binstore-storagelocker.binsl[0]", + "NodeID": "a703c3ca-5ff8-11e5-9213-970ee8879d1b", + "JobID": "binstore-storagelocker", + "TaskGroup": "binsl", + "DesiredStatus": "run", + "DesiredDescription": "", + "ClientStatus": "running", + "ClientDescription": "", + "CreateIndex": 16, + "ModifyIndex": 16 + }, + ... + ] + ``` + +
+
+ +# /v1/node/\/evaluate +## PUT / POST + +
+
Description
+
+ Creates a new evaluation for the given node. This can be used to force + run the scheduling logic if necessary. +
+ +
Method
+
PUT or POST
+ +
URL
+
`/v1/node//evaluate`
+ +
Parameters
+
+ None +
+ +
Returns
+
+ + ```javascript + { + "EvalIDs": ["d092fdc0-e1fd-2536-67d8-43af8ca798ac"], + "EvalCreateIndex": 35, + "NodeModifyIndex": 34, + } + ``` + +
+
+ +# /v1/node/\/drain +## PUT / POST + +
+
Description
+
+ Toggle the drain mode of the node. When enabled, no further + allocations will be assigned and existing allocations will be + migrated. +
+ +
Method
+
PUT or POSt
+ +
URL
+
`/v1/node//drain`
+ +
Parameters
+
+
    +
  • + enable + required + Boolean value provided as a query parameter to either set + enabled to true or false. +
  • +
+
+ +
Returns
+
+ + ```javascript + { + "EvalID": "d092fdc0-e1fd-2536-67d8-43af8ca798ac", + "EvalCreateIndex": 35, + "NodeModifyIndex": 34, + } + ``` + +
+
+ diff --git a/website/source/docs/http/nodes.html.md b/website/source/docs/http/nodes.html.md new file mode 100644 index 000000000..36fa96fcd --- /dev/null +++ b/website/source/docs/http/nodes.html.md @@ -0,0 +1,57 @@ +--- +layout: "http" +page_title: "HTTP API: /v1/nodes" +sidebar_current: "docs-http-nodes" +description: |- + The '/1/nodes' endpoint is used to list the client nodes. +--- + +# /v1/nodes + +The `nodes` endpoint is used to query the status of client nodes. +By default, the agent's local region is used; another region can +be specified using the `?region=` query parameter. + +## GET + +
+
Description
+
+ Lists all the client nodes registered with Nomad. +
+ +
Method
+
GET
+ +
URL
+
`/v1/nodes`
+ +
Parameters
+
+ None +
+ +
Returns
+
+ + ```javascript + [ + { + "ID": "c9972143-861d-46e6-df73-1d8287bc3e66", + "Datacenter": "dc1", + "Name": "web-8e40e308", + "NodeClass": "", + "Drain": false, + "Status": "ready", + "StatusDescription": "", + "CreateIndex": 3, + "ModifyIndex": 4 + }, + ... + ] + ``` + +
+
+ + diff --git a/website/source/layouts/http.erb b/website/source/layouts/http.erb index e2de19061..1de0f8888 100644 --- a/website/source/layouts/http.erb +++ b/website/source/layouts/http.erb @@ -28,12 +28,12 @@ > Nodes