github.com/kardianos/nomad@v0.1.3-0.20151022182107-b13df73ee850/website/source/docs/http/node.html.md (about)

     1  ---
     2  layout: "http"
     3  page_title: "HTTP API: /v1/node"
     4  sidebar_current: "docs-http-node-"
     5  description: |-
     6    The '/1/node-' endpoint is used to query a specific client node.
     7  ---
     8  
     9  # /v1/node
    10  
    11  The `node` endpoint is used to query the a specific client node.
    12  By default, the agent's local region is used; another region can
    13  be specified using the `?region=` query parameter.
    14  
    15  ## GET
    16  
    17  <dl>
    18    <dt>Description</dt>
    19    <dd>
    20      Query the status of a client node registered with Nomad.
    21    </dd>
    22  
    23    <dt>Method</dt>
    24    <dd>GET</dd>
    25  
    26    <dt>URL</dt>
    27    <dd>`/v1/node/<ID>`</dd>
    28  
    29    <dt>Parameters</dt>
    30    <dd>
    31      None
    32    </dd>
    33  
    34    <dt>Returns</dt>
    35    <dd>
    36  
    37      ```javascript
    38      {
    39      "ID": "c9972143-861d-46e6-df73-1d8287bc3e66",
    40      "Datacenter": "dc1",
    41      "Name": "Armons-MacBook-Air.local",
    42      "Attributes": {
    43          "arch": "amd64",
    44          "cpu.frequency": "1300.000000",
    45          "cpu.modelname": "Intel(R) Core(TM) i5-4250U CPU @ 1.30GHz",
    46          "cpu.numcores": "2",
    47          "cpu.totalcompute": "2600.000000",
    48          "driver.exec": "1",
    49          "driver.java": "1",
    50          "driver.java.runtime": "Java(TM) SE Runtime Environment (build 1.8.0_05-b13)",
    51          "driver.java.version": "1.8.0_05",
    52          "driver.java.vm": "Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)",
    53          "hostname": "Armons-MacBook-Air.local",
    54          "kernel.name": "darwin",
    55          "kernel.version": "14.4.0",
    56          "memory.totalbytes": "8589934592",
    57          "os.name": "darwin",
    58          "os.version": "14.4.0",
    59          "storage.bytesfree": "35888713728",
    60          "storage.bytestotal": "249821659136",
    61          "storage.volume": "/dev/disk1"
    62      },
    63      "Resources": {
    64          "CPU": 2600,
    65          "MemoryMB": 8192,
    66          "DiskMB": 34226,
    67          "IOPS": 0,
    68          "Networks": null
    69      },
    70      "Reserved": null,
    71      "Links": {},
    72      "Meta": {},
    73      "NodeClass": "",
    74      "Drain": false,
    75      "Status": "ready",
    76      "StatusDescription": "",
    77      "CreateIndex": 3,
    78      "ModifyIndex": 4
    79      }
    80      ```
    81  
    82    </dd>
    83  </dl>
    84  
    85  # /v1/node/\<ID\>/allocations
    86  ## GET
    87  
    88  <dl>
    89    <dt>Description</dt>
    90    <dd>
    91      Query the allocations belonging to a single node.
    92    </dd>
    93  
    94    <dt>Method</dt>
    95    <dd>GET</dd>
    96  
    97    <dt>URL</dt>
    98    <dd>`/v1/node/<id>/allocations`</dd>
    99  
   100    <dt>Parameters</dt>
   101    <dd>
   102      None
   103    </dd>
   104  
   105    <dt>Returns</dt>
   106    <dd>
   107  
   108      ```javascript
   109      [
   110      {
   111          "ID": "3575ba9d-7a12-0c96-7b28-add168c67984",
   112          "EvalID": "151accaa-1ac6-90fe-d427-313e70ccbb88",
   113          "Name": "binstore-storagelocker.binsl[0]",
   114          "NodeID": "a703c3ca-5ff8-11e5-9213-970ee8879d1b",
   115          "JobID": "binstore-storagelocker",
   116          "TaskGroup": "binsl",
   117          "DesiredStatus": "run",
   118          "DesiredDescription": "",
   119          "ClientStatus": "running",
   120          "ClientDescription": "",
   121          "CreateIndex": 16,
   122          "ModifyIndex": 16
   123      },
   124      ...
   125      ]
   126      ```
   127  
   128    </dd>
   129  </dl>
   130  
   131  # /v1/node/\<ID\>/evaluate
   132  ## PUT / POST
   133  
   134  <dl>
   135    <dt>Description</dt>
   136    <dd>
   137      Creates a new evaluation for the given node. This can be used to force
   138      run the scheduling logic if necessary.
   139    </dd>
   140  
   141    <dt>Method</dt>
   142    <dd>PUT or POST</dd>
   143  
   144    <dt>URL</dt>
   145    <dd>`/v1/node/<ID>/evaluate`</dd>
   146  
   147    <dt>Parameters</dt>
   148    <dd>
   149      None
   150    </dd>
   151  
   152    <dt>Returns</dt>
   153    <dd>
   154  
   155      ```javascript
   156      {
   157      "EvalIDs": ["d092fdc0-e1fd-2536-67d8-43af8ca798ac"],
   158      "EvalCreateIndex": 35,
   159      "NodeModifyIndex": 34,
   160      }
   161      ```
   162  
   163    </dd>
   164  </dl>
   165  
   166  # /v1/node/\<ID\>/drain
   167  ## PUT / POST
   168  
   169  <dl>
   170    <dt>Description</dt>
   171    <dd>
   172      Toggle the drain mode of the node. When enabled, no further
   173      allocations will be assigned and existing allocations will be
   174      migrated.
   175    </dd>
   176  
   177    <dt>Method</dt>
   178    <dd>PUT or POSt</dd>
   179  
   180    <dt>URL</dt>
   181    <dd>`/v1/node/<ID>/drain`</dd>
   182  
   183    <dt>Parameters</dt>
   184    <dd>
   185      <ul>
   186        <li>
   187          <span class="param">enable</span>
   188          <span class="param-flags">required</span>
   189          Boolean value provided as a query parameter to either set
   190          enabled to true or false.
   191        </li>
   192      </ul>
   193    </dd>
   194  
   195    <dt>Returns</dt>
   196    <dd>
   197  
   198      ```javascript
   199      {
   200      "EvalID": "d092fdc0-e1fd-2536-67d8-43af8ca798ac",
   201      "EvalCreateIndex": 35,
   202      "NodeModifyIndex": 34,
   203      }
   204      ```
   205  
   206    </dd>
   207  </dl>
   208