Packer PackerService API

The PackerService API from Packer — 13 operation(s) for packerservice.

OpenAPI Specification

packer-packerservice-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: HashiCorp Cloud Platform Packer Artifact Registry PackerService API
  description: API for managing Packer images.
  version: '2021-04-30'
servers:
- url: //api.cloud.hashicorp.com
security:
- bearer: []
tags:
- name: PackerService
paths:
  /packer/2021-04-30/organizations/{location.organization_id}/projects/{location.project_id}/builds/{build_id}:
    get:
      operationId: GetBuild
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/hashicorp.cloud.packer.GetBuildResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      parameters:
      - name: location.organization_id
        description: organization_id is the id of the organization.
        in: path
        required: true
        schema:
          type: string
      - name: location.project_id
        description: project_id is the projects id.
        in: path
        required: true
        schema:
          type: string
      - name: build_id
        description: 'Unique identifier of the build that should be retrieved; this ID was

          created and set by the HCP Packer registry when the build was created.'
        in: path
        required: true
        schema:
          type: string
      - name: location.region.provider
        description: provider is the named cloud provider ("aws", "gcp", "azure").
        in: query
        required: false
        schema:
          type: string
      - name: location.region.region
        description: region is the cloud region ("us-west1", "us-east1").
        in: query
        required: false
        schema:
          type: string
      tags:
      - PackerService
    delete:
      operationId: DeleteBuild
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/hashicorp.cloud.packer.DeleteBuildResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      parameters:
      - name: location.organization_id
        description: organization_id is the id of the organization.
        in: path
        required: true
        schema:
          type: string
      - name: location.project_id
        description: project_id is the projects id.
        in: path
        required: true
        schema:
          type: string
      - name: build_id
        description: 'Unique identifier of the build that should be deleted; this ID was

          created and set by the HCP Packer registry when the build was created.'
        in: path
        required: true
        schema:
          type: string
      - name: location.region.provider
        description: provider is the named cloud provider ("aws", "gcp", "azure").
        in: query
        required: false
        schema:
          type: string
      - name: location.region.region
        description: region is the cloud region ("us-west1", "us-east1").
        in: query
        required: false
        schema:
          type: string
      tags:
      - PackerService
    patch:
      operationId: UpdateBuild
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/hashicorp.cloud.packer.UpdateBuildResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      parameters:
      - name: location.organization_id
        description: organization_id is the id of the organization.
        in: path
        required: true
        schema:
          type: string
      - name: location.project_id
        description: project_id is the projects id.
        in: path
        required: true
        schema:
          type: string
      - name: build_id
        description: 'Unique identifier of the build that should be updated; this ID was

          created and set by the HCP Packer registry when the build was created.'
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/hashicorp.cloud.packer.UpdateBuildRequest'
        required: true
      tags:
      - PackerService
  /packer/2021-04-30/organizations/{location.organization_id}/projects/{location.project_id}/images:
    get:
      operationId: ListBuckets
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/hashicorp.cloud.packer.ListBucketsResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      parameters:
      - name: location.organization_id
        description: organization_id is the id of the organization.
        in: path
        required: true
        schema:
          type: string
      - name: location.project_id
        description: project_id is the projects id.
        in: path
        required: true
        schema:
          type: string
      - name: location.region.provider
        description: provider is the named cloud provider ("aws", "gcp", "azure").
        in: query
        required: false
        schema:
          type: string
      - name: location.region.region
        description: region is the cloud region ("us-west1", "us-east1").
        in: query
        required: false
        schema:
          type: string
      - name: pagination.page_size
        description: 'The max number of results per page that should be returned. If the number

          of available results is larger than `page_size`, a `next_page_token` is

          returned which can be used to get the next page of results in subsequent

          requests. A value of zero will cause `page_size` to be defaulted.'
        in: query
        required: false
        schema:
          type: integer
          format: int64
      - name: pagination.next_page_token
        description: 'Specifies a page token to use to retrieve the next page. Set this to the

          `next_page_token` returned by previous list requests to get the next page of

          results. If set, `previous_page_token` must not be set.'
        in: query
        required: false
        schema:
          type: string
      - name: pagination.previous_page_token
        description: 'Specifies a page token to use to retrieve the previous page. Set this to

          the `previous_page_token` returned by previous list requests to get the

          previous page of results. If set, `next_page_token` must not be set.'
        in: query
        required: false
        schema:
          type: string
      - name: sorting.order_by
        description: "Specifies the list of per field ordering that should be used for sorting. \nThe order matters as rows are sorted in order by fields and when the field\nmatches, the next field is used to tie break the ordering.\nThe per field default ordering is ascending.  \n\nThe fields should be immutabile, unique, and orderable. If the field is\nnot unique, more than one sort fields should be passed.\n\nExample: oder_by=name,age desc,created_at asc\nIn that case, 'name' will get the default 'ascending' order."
        in: query
        required: false
        explode: true
        schema:
          type: array
          items:
            type: string
      tags:
      - PackerService
    put:
      operationId: CreateBucket
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/hashicorp.cloud.packer.CreateBucketResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      parameters:
      - name: location.organization_id
        description: organization_id is the id of the organization.
        in: path
        required: true
        schema:
          type: string
      - name: location.project_id
        description: project_id is the projects id.
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/hashicorp.cloud.packer.CreateBucketRequest'
        required: true
      tags:
      - PackerService
  /packer/2021-04-30/organizations/{location.organization_id}/projects/{location.project_id}/images/{bucket_slug}:
    get:
      operationId: GetBucket
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/hashicorp.cloud.packer.GetBucketResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      parameters:
      - name: location.organization_id
        description: organization_id is the id of the organization.
        in: path
        required: true
        schema:
          type: string
      - name: location.project_id
        description: project_id is the projects id.
        in: path
        required: true
        schema:
          type: string
      - name: bucket_slug
        description: Human-readable name for the bucket.
        in: path
        required: true
        schema:
          type: string
      - name: location.region.provider
        description: provider is the named cloud provider ("aws", "gcp", "azure").
        in: query
        required: false
        schema:
          type: string
      - name: location.region.region
        description: region is the cloud region ("us-west1", "us-east1").
        in: query
        required: false
        schema:
          type: string
      - name: bucket_id
        description: 'Unique identifier of the bucket; created and set by the HCP Packer

          registry when the bucket is created.'
        in: query
        required: false
        schema:
          type: string
      tags:
      - PackerService
    delete:
      operationId: DeleteBucket
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/hashicorp.cloud.packer.DeleteBucketResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      parameters:
      - name: location.organization_id
        description: organization_id is the id of the organization.
        in: path
        required: true
        schema:
          type: string
      - name: location.project_id
        description: project_id is the projects id.
        in: path
        required: true
        schema:
          type: string
      - name: bucket_slug
        description: Human-readable name for the bucket.
        in: path
        required: true
        schema:
          type: string
      - name: location.region.provider
        description: provider is the named cloud provider ("aws", "gcp", "azure").
        in: query
        required: false
        schema:
          type: string
      - name: location.region.region
        description: region is the cloud region ("us-west1", "us-east1").
        in: query
        required: false
        schema:
          type: string
      tags:
      - PackerService
    patch:
      operationId: UpdateBucket
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/hashicorp.cloud.packer.UpdateBucketResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      parameters:
      - name: location.organization_id
        description: organization_id is the id of the organization.
        in: path
        required: true
        schema:
          type: string
      - name: location.project_id
        description: project_id is the projects id.
        in: path
        required: true
        schema:
          type: string
      - name: bucket_slug
        description: Human-readable name for the bucket.
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/hashicorp.cloud.packer.UpdateBucketRequest'
        required: true
      tags:
      - PackerService
  /packer/2021-04-30/organizations/{location.organization_id}/projects/{location.project_id}/images/{bucket_slug}/channels:
    get:
      operationId: ListChannels
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/hashicorp.cloud.packer.ListChannelsResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      parameters:
      - name: location.organization_id
        description: organization_id is the id of the organization.
        in: path
        required: true
        schema:
          type: string
      - name: location.project_id
        description: project_id is the projects id.
        in: path
        required: true
        schema:
          type: string
      - name: bucket_slug
        description: Human-readable name for the bucket you want to list channels for.
        in: path
        required: true
        schema:
          type: string
      - name: location.region.provider
        description: provider is the named cloud provider ("aws", "gcp", "azure").
        in: query
        required: false
        schema:
          type: string
      - name: location.region.region
        description: region is the cloud region ("us-west1", "us-east1").
        in: query
        required: false
        schema:
          type: string
      tags:
      - PackerService
    post:
      operationId: CreateChannel
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/hashicorp.cloud.packer.CreateChannelResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      parameters:
      - name: location.organization_id
        description: organization_id is the id of the organization.
        in: path
        required: true
        schema:
          type: string
      - name: location.project_id
        description: project_id is the projects id.
        in: path
        required: true
        schema:
          type: string
      - name: bucket_slug
        description: Human-readable name for the bucket to associate the channel with.
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/hashicorp.cloud.packer.CreateChannelRequest'
        required: true
      tags:
      - PackerService
  ? /packer/2021-04-30/organizations/{location.organization_id}/projects/{location.project_id}/images/{bucket_slug}/channels/{slug}
  : get:
      operationId: GetChannel
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/hashicorp.cloud.packer.GetChannelResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      parameters:
      - name: location.organization_id
        description: organization_id is the id of the organization.
        in: path
        required: true
        schema:
          type: string
      - name: location.project_id
        description: project_id is the projects id.
        in: path
        required: true
        schema:
          type: string
      - name: bucket_slug
        description: Human-readable name for the bucket that the channel is associated with.
        in: path
        required: true
        schema:
          type: string
      - name: slug
        description: Human-readable name for the channel.
        in: path
        required: true
        schema:
          type: string
      - name: location.region.provider
        description: provider is the named cloud provider ("aws", "gcp", "azure").
        in: query
        required: false
        schema:
          type: string
      - name: location.region.region
        description: region is the cloud region ("us-west1", "us-east1").
        in: query
        required: false
        schema:
          type: string
      tags:
      - PackerService
    delete:
      operationId: DeleteChannel
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/hashicorp.cloud.packer.DeleteChannelResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      parameters:
      - name: location.organization_id
        description: organization_id is the id of the organization.
        in: path
        required: true
        schema:
          type: string
      - name: location.project_id
        description: project_id is the projects id.
        in: path
        required: true
        schema:
          type: string
      - name: bucket_slug
        description: Human-readable name for the bucket that the channel is associated with.
        in: path
        required: true
        schema:
          type: string
      - name: slug
        description: Human-readable name for the channel.
        in: path
        required: true
        schema:
          type: string
      - name: location.region.provider
        description: provider is the named cloud provider ("aws", "gcp", "azure").
        in: query
        required: false
        schema:
          type: string
      - name: location.region.region
        description: region is the cloud region ("us-west1", "us-east1").
        in: query
        required: false
        schema:
          type: string
      - name: revocation_message
        description: 'Optional field to provide the reason for why this channel is being revoked.

          Only useful for a channel that is assigned to an iteration.'
        in: query
        required: false
        schema:
          type: string
      tags:
      - PackerService
    patch:
      operationId: UpdateChannel
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/hashicorp.cloud.packer.UpdateChannelResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      parameters:
      - name: location.organization_id
        description: organization_id is the id of the organization.
        in: path
        required: true
        schema:
          type: string
      - name: location.project_id
        description: project_id is the projects id.
        in: path
        required: true
        schema:
          type: string
      - name: bucket_slug
        description: Human-readable name for the bucket that the channel is associated with.
        in: path
        required: true
        schema:
          type: string
      - name: slug
        description: Human-readable name for the channel.
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/hashicorp.cloud.packer.UpdateChannelRequest'
        required: true
      tags:
      - PackerService
  /packer/2021-04-30/organizations/{location.organization_id}/projects/{location.project_id}/images/{bucket_slug}/iteration:
    get:
      summary: "GetIteration allows the user to retrieve an iteration using one of the following identifiers:\n * iteration_id\n * incremental_version\n * fingerprint"
      description: 'These are supplied as a query parameter. For example:

        images/{bucket_slug}/iteration?fingerprint={fingerprint}


        bucket_slug must always be set because it is possible for iterations to

        have the same incremental_version or fingerprint across buckets'
      operationId: GetIteration
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/hashicorp.cloud.packer.GetIterationResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      parameters:
      - name: location.organization_id
        description: organization_id is the id of the organization.
        in: path
        required: true
        schema:
          type: string
      - name: location.project_id
        description: project_id is the projects id.
        in: path
        required: true
        schema:
          type: string
      - name: bucket_slug
        description: Human-readable name for the bucket.
        in: path
        required: true
        schema:
          type: string
      - name: location.region.provider
        description: provider is the named cloud provider ("aws", "gcp", "azure").
        in: query
        required: false
        schema:
          type: string
      - name: location.region.region
        description: region is the cloud region ("us-west1", "us-east1").
        in: query
        required: false
        schema:
          type: string
      - name: incremental_version
        description: The human-readable version number assigned to this iteration.
        in: query
        required: false
        schema:
          type: integer
          format: int32
      - name: iteration_id
        description: 'Unique identifier of the iteration. This was created and set by the

          HCP Packer registry when the iteration was created.'
        in: query
        required: false
        schema:
          type: string
      - name: fingerprint
        description: 'Fingerprint of the iteration. The fingerprint is set by Packer when you

          call `packer build`. It will most often correspond to a git commit sha,

          but can be manually overridden by setting the environment variable

          `HCP_PACKER_BUILD_FINGERPRINT`.'
        in: query
        required: false
        schema:
          type: string
      tags:
      - PackerService
  /packer/2021-04-30/organizations/{location.organization_id}/projects/{location.project_id}/images/{bucket_slug}/iterations:
    get:
      operationId: ListIterations
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/hashicorp.cloud.packer.ListIterationsResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      parameters:
      - name: location.organization_id
        description: organization_id is the id of the organization.
        in: path
        required: true
        schema:
          type: string
      - name: location.project_id
        description: project_id is the projects id.
        in: path
        required: true
        schema:
          type: string
      - name: bucket_slug
        description: Human-readable name for the bucket.
        in: path
        required: true
        schema:
          type: string
      - name: location.region.provider
        description: provider is the named cloud provider ("aws", "gcp", "azure").
        in: query
        required: false
        schema:
          type: string
      - name: location.region.region
        description: region is the cloud region ("us-west1", "us-east1").
        in: query
        required: false
        schema:
          type: string
      - name: include_incomplete
        description: 'If true, the request will return information about iterations that have

          not been marked "complete". By default, this is false and the list

          request will only return information about "complete" iterations that are

          ready for use.'
        in: query
        required: false
        schema:
          type: boolean
      - name: pagination.page_size
        description: 'The max number of results per page that should be returned. If the number

          of available results is larger than `page_size`, a `next_page_token` is

          returned which can be used to get the next page of results in subsequent

          requests. A value of zero will cause `page_size` to be defaulted.'
        in: query
        required: false
        schema:
          type: integer
          format: int64
      - name: pagination.next_page_token
        description: 'Specifies a page token to use to retrieve the next page. Set this to the

          `next_page_token` returned by previous list requests to get the next page of

          results. If set, `previous_page_token` must not be set.'
        in: query
        required: false
        schema:
          type: string
      - name: pagination.previous_page_token
        description: 'Specifies a page token to use to retrieve the previous page. Set this to

          the `previous_page_token` returned by previous list requests to get the

          previous page of results. If set, `next_page_token` must not be set.'
        in: query
        required: false
        schema:
          type: string
      - name: sorting.order_by
        description: "Specifies the list of per field ordering that should be used for sorting. \nThe order matters as rows are sorted in order by fields and when the field\nmatches, the next field is used to tie break the ordering.\nThe per field default ordering is ascending.  \n\nThe fields should be immutabile, unique, and orderable. If the field is\nnot unique, more than one sort fields should be passed.\n\nExample: oder_by=name,age desc,created_at asc\nIn that case, 'name' will get the default 'ascending' order."
        in: query
        required: false
        explode: true
        schema:
          type: array
          items:
            type: string
      tags:
      - PackerService
    post:
      operationId: CreateIteration
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/hashicorp.cloud.packer.CreateIterationResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      parameters:
      - name: location.organization_id
        description: organization_id is the id of the organization.
        in: path
        required: true
        schema:
          type: string
      - name: location.project_id
        description: project_id is the projects id.
        in: path
        required: true
        schema:
          type: string
      - name: bucket_slug
        description: Human-readable name for the bucket.
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/hashicorp.cloud.packer.CreateIterationRequest'
        required: true
      tags:
      - PackerService
  ? /packer/2021-04-30/organizations/{location.organization_id}/projects/{location.project_id}/images/{bucket_slug}/iterations/{incremental_version}/ancestors
  : get:
      summary: API Endpoints to ease UI implementation
      operationId: GetAncestorImages
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/hashicorp.cloud.packer.GetAncestorImagesResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      parameters:
      - name: location.organization_id
        description: organization_id is the id of the organization.
        in: path
        required: true
        schema:
          type: string
      - name: location.project_id
        description: project_id is the projects id.
        in: path
        required: true
        schema:
          type: string
      - name: bucket_slug
        description: Human-readable name for the bucket.
        in: path
        required: true
        schema:
          type: string
      - name: incremental_version
        description: The human-readable version number assigned to this iteration.
        in: path
        required: true
        schema:
          type: integer
          format: int32
      - name: location.region.provider
        description: provider is the named cloud provider ("aws", "gcp", "azure").
        in: query
        required: false
        schema:
          type: string
      - name: location.region.region
        description: region is the cloud region ("us-west1", "us-east1").
        in: query
        required: false
        schema:
          type: string
      tags:
      - PackerService
  ? /packer/2021-04-30/organizations/{location.organization_id}/projects/{location.project_id}/images/{bucket_slug}/iterations/{incremental_version}/children
  : get:
      operationId: GetChildImages
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/hashicorp.cloud.packer.GetChildImagesResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      parameters:
      - name: location.organization_id
        description: organization_id is the id of the organization.
        in: path
        required: true
        schema:
          type: string
      - name: location.project_id
        description: project_id

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