github.com/dkerwin/nomad@v0.3.3-0.20160525181927-74554135514b/website/source/docs/http/allocs.html.md (about)

     1  ---
     2  layout: "http"
     3  page_title: "HTTP API: /v1/allocations"
     4  sidebar_current: "docs-http-allocs"
     5  description: |-
     6    The '/1/allocations' endpoint is used to list the allocations.
     7  ---
     8  
     9  # /v1/allocations
    10  
    11  The `allocations` endpoint is used to query the status of allocations.
    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      Lists all the allocations.
    21    </dd>
    22  
    23    <dt>Method</dt>
    24    <dd>GET</dd>
    25  
    26    <dt>URL</dt>
    27    <dd>`/v1/allocations`</dd>
    28  
    29    <dt>Parameters</dt>
    30    <dd>
    31      <ul>
    32        <li>
    33          <span class="param">prefix</span>
    34          <span class="param-flags">optional</span>
    35          <span class="param-flags">even-length</span>
    36          Filter allocations based on an identifier prefix.
    37        </li>
    38      </ul>
    39    </dd>
    40  
    41    <dt>Blocking Queries</dt>
    42    <dd>
    43      [Supported](/docs/http/index.html#blocking-queries)
    44    </dd>
    45  
    46    <dt>Returns</dt>
    47    <dd>
    48  
    49      ```javascript
    50      [
    51      {
    52        "ID": "203266e5-e0d6-9486-5e05-397ed2b184af",
    53        "EvalID": "e68125ed-3fba-fb46-46cc-291addbc4455",
    54        "Name": "example.cache[0]",
    55        "NodeID": "e02b6169-83bd-9df6-69bd-832765f333eb",
    56        "JobID": "example",
    57        "TaskGroup": "cache",
    58        "DesiredStatus": "run",
    59        "DesiredDescription": ""
    60        "ClientDescription": "",
    61        "ClientStatus": "running",
    62        "TaskStates": {
    63          "redis": {
    64            "Events": [
    65              {
    66                "KillError": "",
    67                "Message": "",
    68                "Signal": 0,
    69                "ExitCode": 0,
    70                "DriverError": "",
    71                "Time": 1447806038427841000,
    72                "Type": "Started"
    73              }
    74            ],
    75            "State": "running"
    76          }
    77        },
    78        "CreateIndex": 7,
    79        "ModifyIndex": 9,
    80      }
    81      ...
    82      ]
    83      ```
    84  
    85    </dd>
    86  </dl>