Need help with your APIs? I offer API discovery, governance & evangelism services. Explore services →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

HashiCorp Nomad Jobs API

Endpoints for listing, creating, reading, updating, and deleting jobs. Jobs are the primary unit of work in Nomad.

HashiCorp Nomad Jobs API is one of 22 APIs that HashiCorp Nomad publishes on the APIs.io network, described by a machine-readable OpenAPI specification and an AsyncAPI event-driven specification.

This API exposes 1 JSON Schema definition.

Tagged areas include Jobs. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, an AsyncAPI specification, and 1 JSON Schema.

This API exposes 16 operations across 14 paths, and defines 14 schemas. It is described by OpenAPI 3.1.0, at version 1.9.0.

Requests are made against a single base URL, http://localhost:4646/v1.

16 operations 14 paths 14 schemas 1 DELETE8 GET7 PUT

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.1.0
API Version
1.9.0
Base URL
http://localhost:4646
Authentication
API Key, HTTP Bearer
Terms of Service
Resource Areas
1

Authentication & Security 2

HashiCorp Nomad Jobs API declares 2 security schemes for authenticating requests. An API key is passed in the header as X-Nomad-Token (nomadToken). It accepts HTTP bearer tokens (bearerAuth). By default, every request must be authenticated.

  • nomadToken — ACL token passed via the X-Nomad-Token request header.
  • bearerAuth — ACL token passed via the Authorization header with Bearer scheme.

Paths & Operations 16

Across 14 paths, the API surfaces 16 operations — 1 DELETE, 8 GET, 7 PUT. Each is listed below with its method, path, parameters, and response codes.

Jobs 16

Endpoints for listing, creating, reading, updating, and deleting jobs. Jobs are the primary unit of work in Nomad.

GET
/jobs
List jobs
listJobs 5 params → 200401403500
PUT
/jobs
Register a new job
registerJob 1 param body → 200400401403500
PUT
/jobs/parse
Parse a job specification
parseJob body → 200400500
GET
/jobs/statuses
List job statuses
listJobStatuses 3 params → 200401500
GET
/job/{jobID}
Read a job
readJob 2 params → 200401404500
DELETE
/job/{jobID}
Deregister a job
deregisterJob 4 params → 200401500
PUT
/job/{jobID}/evaluate
Create a new evaluation for a job
evaluateJob 2 params body → 200401404500
PUT
/job/{jobID}/plan
Plan a job update
planJob 2 params body → 200400401500
GET
/job/{jobID}/allocations
List allocations for a job
listJobAllocations 3 params → 200401404500
GET
/job/{jobID}/evaluations
List evaluations for a job
listJobEvaluations 2 params → 200401404500
GET
/job/{jobID}/deployments
List deployments for a job
listJobDeployments 2 params → 200401404500
GET
/job/{jobID}/versions
List versions of a job
listJobVersions 3 params → 200401404500
PUT
/job/{jobID}/revert
Revert job to an older version
revertJob 2 params body → 200401500
PUT
/job/{jobID}/stable
Set job stability
setJobStability 2 params body → 200401500
GET
/job/{jobID}/summary
Read a job summary
readJobSummary 2 params → 200401404500
PUT
/job/{jobID}/dispatch
Dispatch a parameterized job
dispatchJob 2 params body → 200400401404500

Schemas 14

The contract defines 14 schemas that model the data the API accepts and returns. The most detailed are Job (23 properties), Evaluation (20 properties), AllocationListStub (16 properties), JobListStub (15 properties). Each schema is shown below with its type and property counts.

JobRegisterResponse
object
The response body for a successful job registration.
4 properties
JobRegisterRequest
object
The request body for registering a new job.
4 properties 1 required
Job
object
A Nomad job specification defining the workload to be scheduled.
23 properties
NetworkResource
object
Network resource configuration.
8 properties
JobListStub
object
A stub representation of a job returned in list operations.
15 properties
AllocationListStub
object
A stub representation of an allocation returned in list operations.
16 properties
Resources
object
Resource requirements for a task.
6 properties
JobSummary
object
Summary of a job showing allocation counts by task group.
5 properties
Deployment
object
A deployment tracks a rolling update of allocations between two versions of a job.
12 properties
Service
object
A service registration for Consul or Nomad service discovery.
6 properties
Task
object
A task is the smallest unit of work in Nomad, executed within a task group.
10 properties
TaskGroup
object
A task group is a set of tasks that must be co-located on the same node.
10 properties
UpdateStrategy
object
Update strategy configuration for rolling deployments.
9 properties
Evaluation
object
An evaluation represents a scheduling decision made by Nomad.
20 properties

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

nomad-jobs-api-openapi.yml Raw ↑

Other APIs HashiCorp Nomad publishes across the network.

HashiCorp Nomad Go SDK
HashiCorp Nomad Python SDK
HashiCorp Nomad Java SDK
HashiCorp Nomad ACL API
HashiCorp Nomad Agent API
HashiCorp Nomad Allocations API
HashiCorp Nomad Deployments API
HashiCorp Nomad Evaluations API
HashiCorp Nomad Namespaces API
HashiCorp Nomad Node Pools API
HashiCorp Nomad Nodes API
HashiCorp Nomad Operator API