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 Deployments API

Endpoints for querying and managing deployments. Deployments track the rolling update of allocations between two versions of a job.

HashiCorp Nomad Deployments 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 Deployments. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, an AsyncAPI specification, and 1 JSON Schema.

This API exposes 6 operations across 6 paths, and defines 3 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.

6 operations 6 paths 3 schemas 3 GET3 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 Deployments 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 6

Across 6 paths, the API surfaces 6 operations — 3 GET, 3 PUT. Each is listed below with its method, path, parameters, and response codes.

Deployments 6

Endpoints for querying and managing deployments. Deployments track the rolling update of allocations between two versions of a job.

GET
/deployments
List deployments
listDeployments 5 params → 200401500
GET
/deployment/{deploymentID}
Read a deployment
readDeployment 1 param → 200401404500
GET
/deployment/allocations/{deploymentID}
List deployment allocations
listDeploymentAllocations 1 param → 200401404500
PUT
/deployment/fail/{deploymentID}
Fail a deployment
failDeployment 1 param → 200401404500
PUT
/deployment/pause/{deploymentID}
Pause or resume a deployment
pauseDeployment 1 param body → 200401500
PUT
/deployment/promote/{deploymentID}
Promote a deployment
promoteDeployment 1 param body → 200401500

Schemas 3

The contract defines 3 schemas that model the data the API accepts and returns. The most detailed are AllocationListStub (16 properties), Deployment (12 properties), DeploymentUpdateResponse (3 properties). Each schema is shown below with its type and property counts.

DeploymentUpdateResponse
object
Response from a deployment update operation.
3 properties
Deployment
object
A deployment tracks a rolling update of allocations between two versions of a job.
12 properties
AllocationListStub
object
A stub representation of an allocation returned in list operations.
16 properties

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

nomad-deployments-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 Evaluations API
HashiCorp Nomad Jobs API
HashiCorp Nomad Namespaces API
HashiCorp Nomad Node Pools API
HashiCorp Nomad Nodes API
HashiCorp Nomad Operator API