HashiCorp Nomad HTTP API

The HashiCorp Nomad HTTP API provides programmatic access to all Nomad functionality including job scheduling, allocation management, node operations, deployments, services, evaluations, namespaces, ACL policies, and cluster status. All API routes are prefixed with /v1/ and the default port is 4646. The API is RESTful, responds to standard HTTP verbs, and supports ACL token authentication via the X-Nomad-Token header or Bearer scheme. Developers can use this API to submit and manage workloads, monitor cluster health, query allocation status, and integrate Nomad orchestration into their infrastructure automation workflows.

OpenAPI Specification

nomad-http-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: HashiCorp Nomad HTTP API
  description: >-
    The HashiCorp Nomad HTTP API provides programmatic access to all Nomad
    functionality including job scheduling, allocation management, node
    operations, deployments, services, evaluations, namespaces, ACL policies,
    and cluster status. All API routes are prefixed with /v1/ and the default
    port is 4646. The API is RESTful, responds to standard HTTP verbs, and
    supports ACL token authentication via the X-Nomad-Token header or Bearer
    scheme.
  version: '1.9.0'
  contact:
    name: HashiCorp Support
    url: https://support.hashicorp.com
  termsOfService: https://www.hashicorp.com/terms-of-service
  license:
    name: Business Source License 1.1
    url: https://github.com/hashicorp/nomad/blob/main/LICENSE
externalDocs:
  description: Nomad HTTP API Documentation
  url: https://developer.hashicorp.com/nomad/api-docs
servers:
  - url: http://localhost:4646/v1
    description: Local Nomad Agent
tags:
  - name: ACL
    description: >-
      Endpoints for managing Access Control List policies, tokens, and
      authentication methods.
  - name: Agent
    description: >-
      Endpoints for interacting with the local Nomad agent, including health
      checks, member listing, and server management.
  - name: Allocations
    description: >-
      Endpoints for querying allocations. An allocation declares that a set of
      tasks in a job should be run on a particular node.
  - name: Deployments
    description: >-
      Endpoints for querying and managing deployments. Deployments track the
      rolling update of allocations between two versions of a job.
  - name: Evaluations
    description: >-
      Endpoints for querying evaluations. Evaluations are the mechanism by
      which Nomad makes scheduling decisions.
  - name: Jobs
    description: >-
      Endpoints for listing, creating, reading, updating, and deleting jobs.
      Jobs are the primary unit of work in Nomad.
  - name: Namespaces
    description: >-
      Endpoints for managing namespaces, which segment jobs and their
      associated objects.
  - name: Node Pools
    description: >-
      Endpoints for managing node pools, which group nodes for scheduling
      constraints.
  - name: Nodes
    description: >-
      Endpoints for querying and managing client nodes registered with the
      Nomad cluster.
  - name: Operator
    description: >-
      Endpoints for cluster-level operations such as Raft peer management
      and autopilot configuration.
  - name: Regions
    description: >-
      Endpoints for listing known regions in the Nomad cluster.
  - name: Scaling
    description: >-
      Endpoints for querying scaling policies and their status.
  - name: Search
    description: >-
      Endpoints for searching across Nomad objects by prefix or fuzzy match.
  - name: Status
    description: >-
      Endpoints for querying the status of the Nomad cluster including
      leader and peer information.
  - name: System
    description: >-
      Endpoints for system maintenance operations such as garbage collection
      and reconciliation.
  - name: Variables
    description: >-
      Endpoints for managing Nomad variables, which store encrypted
      key-value data.
  - name: Volumes
    description: >-
      Endpoints for managing CSI and host volumes attached to Nomad
      allocations.
security:
  - nomadToken: []
  - bearerAuth: []
paths:
  /jobs:
    get:
      operationId: listJobs
      summary: List jobs
      description: >-
        Lists all known jobs in the system registered with Nomad. Supports
        prefix-based filtering and pagination via next_token and per_page
        query parameters.
      tags:
        - Jobs
      parameters:
        - $ref: '#/components/parameters/PrefixParam'
        - $ref: '#/components/parameters/NamespaceParam'
        - $ref: '#/components/parameters/NextTokenParam'
        - $ref: '#/components/parameters/PerPageParam'
        - $ref: '#/components/parameters/FilterParam'
      responses:
        '200':
          description: A list of job stubs
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/JobListStub'
          headers:
            X-Nomad-Index:
              $ref: '#/components/headers/NomadIndex'
            X-Nomad-KnownLeader:
              $ref: '#/components/headers/NomadKnownLeader'
            X-Nomad-LastContact:
              $ref: '#/components/headers/NomadLastContact'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
    put:
      operationId: registerJob
      summary: Register a new job
      description: >-
        Registers a new job or updates an existing job. The job must be
        provided as a JSON payload in the request body.
      tags:
        - Jobs
      parameters:
        - $ref: '#/components/parameters/NamespaceParam'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/JobRegisterRequest'
      responses:
        '200':
          description: Job registered successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobRegisterResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
  /jobs/parse:
    put:
      operationId: parseJob
      summary: Parse a job specification
      description: >-
        Parses a HCL or JSON job specification and returns the equivalent
        JSON job structure. This endpoint can be used to validate job
        specifications without registering them.
      tags:
        - Jobs
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                JobHCL:
                  type: string
                  description: >-
                    The HCL definition of the job encoded as a JSON string.
                Canonicalize:
                  type: boolean
                  description: >-
                    If true, sets any unset fields to their default values.
      responses:
        '200':
          description: Parsed job specification
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Job'
        '400':
          $ref: '#/components/responses/BadRequest'
        '500':
          $ref: '#/components/responses/InternalError'
  /jobs/statuses:
    get:
      operationId: listJobStatuses
      summary: List job statuses
      description: >-
        Returns a list of jobs with their current status information
        including allocation summaries and deployment status.
      tags:
        - Jobs
      parameters:
        - $ref: '#/components/parameters/NamespaceParam'
        - $ref: '#/components/parameters/NextTokenParam'
        - $ref: '#/components/parameters/PerPageParam'
      responses:
        '200':
          description: A list of job statuses
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalError'
  /job/{jobID}:
    get:
      operationId: readJob
      summary: Read a job
      description: >-
        Returns the full specification and status of the specified job.
      tags:
        - Jobs
      parameters:
        - $ref: '#/components/parameters/JobIDParam'
        - $ref: '#/components/parameters/NamespaceParam'
      responses:
        '200':
          description: The job details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Job'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
    delete:
      operationId: deregisterJob
      summary: Deregister a job
      description: >-
        Deregisters a job and stops all allocations associated with it.
        Optionally purges the job from the system entirely.
      tags:
        - Jobs
      parameters:
        - $ref: '#/components/parameters/JobIDParam'
        - $ref: '#/components/parameters/NamespaceParam'
        - name: purge
          in: query
          description: >-
            If true, the job is purged from the system and cannot be
            recovered. Defaults to false.
          schema:
            type: boolean
        - name: global
          in: query
          description: >-
            If true, deregisters the job in all federated regions.
          schema:
            type: boolean
      responses:
        '200':
          description: Job deregistered
          content:
            application/json:
              schema:
                type: object
                properties:
                  EvalID:
                    type: string
                    description: >-
                      The ID of the evaluation created as a result of
                      deregistering the job.
                  EvalCreateIndex:
                    type: integer
                  JobModifyIndex:
                    type: integer
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalError'
  /job/{jobID}/evaluate:
    put:
      operationId: evaluateJob
      summary: Create a new evaluation for a job
      description: >-
        Creates a new evaluation for the given job. This can be used to
        force run the scheduling logic if necessary.
      tags:
        - Jobs
      parameters:
        - $ref: '#/components/parameters/JobIDParam'
        - $ref: '#/components/parameters/NamespaceParam'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                ForceReschedule:
                  type: boolean
                  description: >-
                    If true, forces rescheduling of failed allocations.
      responses:
        '200':
          description: Evaluation created
          content:
            application/json:
              schema:
                type: object
                properties:
                  EvalID:
                    type: string
                  EvalCreateIndex:
                    type: integer
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
  /job/{jobID}/plan:
    put:
      operationId: planJob
      summary: Plan a job update
      description: >-
        Invokes a dry-run of the scheduler for the job which will determine
        the effects of an update. The plan will not result in any changes
        to the cluster.
      tags:
        - Jobs
      parameters:
        - $ref: '#/components/parameters/JobIDParam'
        - $ref: '#/components/parameters/NamespaceParam'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                Job:
                  $ref: '#/components/schemas/Job'
                Diff:
                  type: boolean
                  description: >-
                    If true, returns a diff between the current and planned
                    job.
                PolicyOverride:
                  type: boolean
                  description: >-
                    If true, overrides any soft mandatory Sentinel policies.
      responses:
        '200':
          description: Job plan result
          content:
            application/json:
              schema:
                type: object
                properties:
                  JobModifyIndex:
                    type: integer
                  Diff:
                    type: object
                  Annotations:
                    type: object
                  FailedTGAllocs:
                    type: object
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalError'
  /job/{jobID}/allocations:
    get:
      operationId: listJobAllocations
      summary: List allocations for a job
      description: >-
        Returns a list of allocations belonging to the specified job.
      tags:
        - Jobs
      parameters:
        - $ref: '#/components/parameters/JobIDParam'
        - $ref: '#/components/parameters/NamespaceParam'
        - name: all
          in: query
          description: >-
            If true, includes allocations from all namespaces.
          schema:
            type: boolean
      responses:
        '200':
          description: A list of allocation stubs
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AllocationListStub'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
  /job/{jobID}/evaluations:
    get:
      operationId: listJobEvaluations
      summary: List evaluations for a job
      description: >-
        Returns a list of evaluations belonging to the specified job.
      tags:
        - Jobs
      parameters:
        - $ref: '#/components/parameters/JobIDParam'
        - $ref: '#/components/parameters/NamespaceParam'
      responses:
        '200':
          description: A list of evaluations
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Evaluation'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
  /job/{jobID}/deployments:
    get:
      operationId: listJobDeployments
      summary: List deployments for a job
      description: >-
        Returns a list of deployments belonging to the specified job.
      tags:
        - Jobs
      parameters:
        - $ref: '#/components/parameters/JobIDParam'
        - $ref: '#/components/parameters/NamespaceParam'
      responses:
        '200':
          description: A list of deployments
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Deployment'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
  /job/{jobID}/versions:
    get:
      operationId: listJobVersions
      summary: List versions of a job
      description: >-
        Returns a list of versions for the specified job, with the most
        recent version first.
      tags:
        - Jobs
      parameters:
        - $ref: '#/components/parameters/JobIDParam'
        - $ref: '#/components/parameters/NamespaceParam'
        - name: diffs
          in: query
          description: >-
            If true, includes the diff between consecutive job versions.
          schema:
            type: boolean
      responses:
        '200':
          description: A list of job versions
          content:
            application/json:
              schema:
                type: object
                properties:
                  Versions:
                    type: array
                    items:
                      $ref: '#/components/schemas/Job'
                  Diffs:
                    type: array
                    items:
                      type: object
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
  /job/{jobID}/revert:
    put:
      operationId: revertJob
      summary: Revert job to an older version
      description: >-
        Reverts the job to an older version by creating a new version with
        the specification of the older version.
      tags:
        - Jobs
      parameters:
        - $ref: '#/components/parameters/JobIDParam'
        - $ref: '#/components/parameters/NamespaceParam'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - JobID
                - JobVersion
              properties:
                JobID:
                  type: string
                  description: >-
                    The ID of the job to revert.
                JobVersion:
                  type: integer
                  description: >-
                    The version number to revert to.
                EnforcePriorVersion:
                  type: integer
                  description: >-
                    If set, the job is only reverted if the current version
                    matches this value.
      responses:
        '200':
          description: Job reverted
          content:
            application/json:
              schema:
                type: object
                properties:
                  EvalID:
                    type: string
                  EvalCreateIndex:
                    type: integer
                  JobModifyIndex:
                    type: integer
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalError'
  /job/{jobID}/stable:
    put:
      operationId: setJobStability
      summary: Set job stability
      description: >-
        Sets the stability of a job version, marking it as stable or
        unstable. Stable versions are not eligible for automatic garbage
        collection.
      tags:
        - Jobs
      parameters:
        - $ref: '#/components/parameters/JobIDParam'
        - $ref: '#/components/parameters/NamespaceParam'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - JobID
                - JobVersion
                - Stable
              properties:
                JobID:
                  type: string
                JobVersion:
                  type: integer
                Stable:
                  type: boolean
      responses:
        '200':
          description: Stability set
          content:
            application/json:
              schema:
                type: object
                properties:
                  JobModifyIndex:
                    type: integer
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalError'
  /job/{jobID}/summary:
    get:
      operationId: readJobSummary
      summary: Read a job summary
      description: >-
        Returns a summary of the specified job including the number of
        allocations in each state per task group.
      tags:
        - Jobs
      parameters:
        - $ref: '#/components/parameters/JobIDParam'
        - $ref: '#/components/parameters/NamespaceParam'
      responses:
        '200':
          description: Job summary
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobSummary'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
  /job/{jobID}/dispatch:
    put:
      operationId: dispatchJob
      summary: Dispatch a parameterized job
      description: >-
        Dispatches a new instance of a parameterized job. The job must be
        of type parameterized.
      tags:
        - Jobs
      parameters:
        - $ref: '#/components/parameters/JobIDParam'
        - $ref: '#/components/parameters/NamespaceParam'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                Payload:
                  type: string
                  description: >-
                    Base64-encoded payload for the dispatched job.
                Meta:
                  type: object
                  additionalProperties:
                    type: string
                  description: >-
                    Metadata key-value pairs for the dispatched job.
      responses:
        '200':
          description: Job dispatched
          content:
            application/json:
              schema:
                type: object
                properties:
                  DispatchedJobID:
                    type: string
                  EvalID:
                    type: string
                  EvalCreateIndex:
                    type: integer
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
  /allocations:
    get:
      operationId: listAllocations
      summary: List allocations
      description: >-
        Lists all allocations in the system. Supports prefix-based
        filtering and pagination.
      tags:
        - Allocations
      parameters:
        - $ref: '#/components/parameters/PrefixParam'
        - $ref: '#/components/parameters/NamespaceParam'
        - $ref: '#/components/parameters/NextTokenParam'
        - $ref: '#/components/parameters/PerPageParam'
        - $ref: '#/components/parameters/FilterParam'
      responses:
        '200':
          description: A list of allocation stubs
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AllocationListStub'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalError'
  /allocation/{allocID}:
    get:
      operationId: readAllocation
      summary: Read an allocation
      description: >-
        Returns the full details of the specified allocation.
      tags:
        - Allocations
      parameters:
        - $ref: '#/components/parameters/AllocIDParam'
      responses:
        '200':
          description: Allocation details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Allocation'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
  /allocation/{allocID}/services:
    get:
      operationId: listAllocationServices
      summary: List allocation services
      description: >-
        Returns the services registered by the specified allocation
        including address, port, and service name.
      tags:
        - Allocations
      parameters:
        - $ref: '#/components/parameters/AllocIDParam'
      responses:
        '200':
          description: Allocation services
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ServiceRegistration'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
  /allocation/{allocID}/checks:
    get:
      operationId: listAllocationChecks
      summary: List allocation health checks
      description: >-
        Returns the health check results for the specified allocation.
      tags:
        - Allocations
      parameters:
        - $ref: '#/components/parameters/AllocIDParam'
      responses:
        '200':
          description: Allocation health checks
          content:
            application/json:
              schema:
                type: object
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
  /evaluations:
    get:
      operationId: listEvaluations
      summary: List evaluations
      description: >-
        Lists all evaluations in the system. Supports filtering by job ID
        and evaluation status (blocked, pending, complete, failed,
        or canceled).
      tags:
        - Evaluations
      parameters:
        - $ref: '#/components/parameters/PrefixParam'
        - $ref: '#/components/parameters/NamespaceParam'
        - $ref: '#/components/parameters/NextTokenParam'
        - $ref: '#/components/parameters/PerPageParam'
        - $ref: '#/components/parameters/FilterParam'
        - name: status
          in: query
          description: >-
            Filter evaluations by status.
          schema:
            type: string
            enum:
              - blocked
              - pending
              - complete
              - failed
              - canceled
        - name: job
          in: query
          description: >-
            Filter evaluations by job ID.
          schema:
            type: string
      responses:
        '200':
          description: A list of evaluations
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Evaluation'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalError'
  /evaluations/count:
    get:
      operationId: countEvaluations
      summary: Count evaluations
      description: >-
        Returns a count of evaluations in the system, optionally filtered
        by status.
      tags:
        - Evaluations
      parameters:
        - name: status
          in: query
          description: >-
            Filter the count by evaluation status.
          schema:
            type: string
            enum:
              - blocked
              - pending
              - complete
              - failed
              - canceled
      responses:
        '200':
          description: Evaluation count
          content:
            application/json:
              schema:
                type: object
                properties:
                  Count:
                    type: integer
                    description: >-
                      The number of evaluations matching the filter.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalError'
  /evaluation/{evalID}:
    get:
      operationId: readEvaluation
      summary: Read an evaluation
      description: >-
        Returns the full details of the specified evaluation.
      tags:
        - Evaluations
      parameters:
        - $ref: '#/components/parameters/EvalIDParam'
      responses:
        '200':
          description: Evaluation details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Evaluation'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
  /evaluation/{evalID}/allocations:
    get:
      operationId: listEvaluationAllocations
      summary: List allocations for an evaluation
      description: >-
        Returns a list of allocations created or modified by the
        specified evaluation.
      tags:
        - Evaluations
      parameters:
        - $ref: '#/components/parameters/EvalIDParam'
      responses:
        '200':
          description: A list of allocation stubs
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AllocationListStub'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
  /deployments:
    get:
      operationId: listDeployments
      summary: List deployments
      description: >-
        Lists all deployments in the system. Supports pagination via
        next_token.
      tags:
        - Deployments
      parameters:
        - $ref: '#/components/parameters/PrefixParam'
        - $ref: '#/components/parameters/NamespaceParam'
        - $ref: '#/components/parameters/NextTokenParam'
        - $ref: '#/components/parameters/PerPageParam'
        - $ref: '#/components/parameters/FilterParam'
      responses:
        '200':
          description: A list of deployments
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Deployment'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalError'
  /deployment/{deploymentID}:
    get:
      operationId: readDeployment
      summary: Read a deployment
      description: >-
        Returns the full details of the specified deployment.
      tags:
        - Deployments
      parameters:
        - $ref: '#/components/parameters/DeploymentIDParam'
      responses:
        '200':
          description: Deployment details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Deployment'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
  /deployment/allocations/{deploymentID}:
    get:
      operationId: listDeploymentAllocations
      summary: List deployment allocations
      description: >-
        Returns a list of allocations associated with the specified
        deployment.
      tags:
        - Deployments
      parameters:
        - $ref: '#/components/parameters/DeploymentIDParam'
      responses:
        '200':
          description: A list of allocation stubs
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AllocationListStub'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
  /deployment/fail/{deploymentID}:
    put:
      operationId: failDeployment
      summary: Fail a deployment
      description: >-
        Marks the specified deployment as failed. This causes Nomad to
        stop the deployment and revert to the previous stable version
        of the job if configured to do so.
      tags:
        - Deployments
      parameters:
        - $ref: '#/components/parameters/DeploymentIDParam'
      responses:
        '200':
          description: Deployment failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeploymentUpdateResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
  /deploy

# --- truncated at 32 KB (108 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/nomad/refs/heads/main/openapi/nomad-http-api-openapi.yml