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

     1  ---
     2  layout: "http"
     3  page_title: "HTTP API: /v1/jobs"
     4  sidebar_current: "docs-http-jobs"
     5  description: |-
     6    The '/1/jobs' endpoint is used list jobs and register new ones.
     7  ---
     8  
     9  # /v1/jobs
    10  
    11  The `jobs` endpoint is used to query the status of existing jobs in Nomad
    12  and to to register new jobs. By default, the agent's local region is used;
    13  another region can be specified using the `?region=` query parameter.
    14  
    15  ## GET
    16  
    17  <dl>
    18    <dt>Description</dt>
    19    <dd>
    20      Lists all the jobs registered with Nomad.
    21    </dd>
    22  
    23    <dt>Method</dt>
    24    <dd>GET</dd>
    25  
    26    <dt>URL</dt>
    27    <dd>`/v1/jobs`</dd>
    28  
    29    <dt>Parameters</dt>
    30    <dd>
    31      None
    32    </dd>
    33  
    34    <dt>Returns</dt>
    35    <dd>
    36  
    37      ```javascript
    38      [
    39      {
    40          "ID": "binstore-storagelocker",
    41          "Name": "binstore-storagelocker",
    42          "Type": "service",
    43          "Priority": 50,
    44          "Status": "",
    45          "StatusDescription": "",
    46          "CreateIndex": 14,
    47          "ModifyIndex": 14
    48      },
    49      ...
    50      ]
    51      ```
    52  
    53    </dd>
    54  </dl>
    55  
    56  ## PUT / POST
    57  
    58  <dl>
    59    <dt>Description</dt>
    60    <dd>
    61      Registers a new job.
    62    </dd>
    63  
    64    <dt>Method</dt>
    65    <dd>PUT or POST</dd>
    66  
    67    <dt>URL</dt>
    68    <dd>`/v1/jobs`</dd>
    69  
    70    <dt>Parameters</dt>
    71    <dd>
    72      <ul>
    73        <li>
    74          <span class="param">Job</span>
    75          <span class="param-flags">required</span>
    76          The JSON definition of the job. The general structure is given
    77          by the [job specification](/docs/jobspec/index.html), and matches
    78          the return response of [GET against `/v1/job/<ID>`](/docs/http/job.html).
    79        </li>
    80      </ul>
    81    </dd>
    82  
    83    <dt>Returns</dt>
    84    <dd>
    85  
    86      ```javascript
    87      {
    88      "EvalID": "d092fdc0-e1fd-2536-67d8-43af8ca798ac",
    89      "EvalCreateIndex": 35,
    90      "JobModifyIndex": 34,
    91      }
    92      ```
    93  
    94    </dd>
    95  </dl>
    96