# List deployments for a version

List Harness CD deployments for a specific version. Returns the environments and services that are actively running this version, together with aggregate prod/non-prod counts in meta. For OCI-based package types (DOCKER, HELM) the artifact is identified by image:tag — supply package_tag or an empty response is returned. For all other package types the artifact is identified by package_name/version_name.

Endpoint: GET /har/api/v3/versions/{id}/deployments
Version: 1.0
Security: x-api-key

## Query parameters:

  - `account_identifier` (string, required)
    Unique identifier for the Harness account.

  - `env_type` (string)
    Filter by environment type. Allowed values: PRODUCTION, PRE_PRODUCTION.
    Enum: "PRODUCTION", "PRE_PRODUCTION"

  - `page` (integer)
    The page number for pagination (0-indexed).

Used to navigate through large result sets. Combined with size parameter
to control which subset of results to return.

Example: page=0 returns the first page, page=1 returns the second page

  - `size` (integer)
    The number of items to return per page.

Controls the page size for paginated results. 

Example: size=50 returns up to 50 items per page

  - `sort` (string)
    The sort for the results.
Accepted pattern: sort_field:sort_order where sort_field is the field name
and sort_order is either asc or desc.

Examples: name:asc, modifiedAt:desc

  - `search_term` (string)
    Search term for filtering results.

Example: search_term=prod might match keys like "production", "prod-env", etc.

  - `package_tag` (string)
    Tag to use when identifying the artifact in CD. Currently used for Docker images: provide the tag (e.g. latest) so the artifact is resolved as image:tag. For OCI-based package types (DOCKER, HELM), if this parameter is omitted no deployment data is returned.

## Path parameters:

  - `id` (string, required)

## Response 200 fields (application/json):

  - `hasMore` (boolean, required)
    True if more results exist after this page.
    Example: true

  - `page` (integer, required)
    The current page (0-indexed)

  - `size` (integer, required)
    Number of items per page
    Example: 20

  - `items` (array, required)
    List of deployment records.

  - `items.envIdentifier` (string, required)

  - `items.envName` (string, required)

  - `items.envType` (string, required)
    Environment type. Allowed values: PRODUCTION, PRE_PRODUCTION.
    Enum: "PRODUCTION", "PRE_PRODUCTION"

  - `items.infraIdentifier` (string)

  - `items.infraName` (string)

  - `items.instanceCount` (integer, required)
    Number of running instances for this service + environment combination.

  - `items.lastDeployedAt` (integer,null)
    Unix timestamp in milliseconds of the last deployment.

  - `items.lastDeployedBy` (object)
    Structured user information for a principal

  - `items.lastDeployedBy.display_name` (string)
    Human-readable display name

  - `items.lastDeployedBy.email` (string)
    Email address

  - `items.lastDeployedBy.type` (string)
    Principal type (user, service, service_account)

  - `items.lastDeployedBy.uid` (string)
    Principal unique identifier (username)

  - `items.orgIdentifier` (string, required)

  - `items.pipelineExecutionId` (string)

  - `items.pipelineExecutionName` (string)

  - `items.projectIdentifier` (string, required)

  - `items.serviceIdentifier` (string, required)

  - `items.serviceName` (string, required)

  - `meta` (object)

  - `meta.nonProdEnvCount` (integer, required)

  - `meta.prodEnvCount` (integer, required)

## Response default fields (application/json):

  - `error` (object, required)

  - `error.code` (string)
    For some errors that could be handled programmatically, a short string indicating the [error code](https://docs.stripe.com/error-codes) reported.

  - `error.message` (string)
    A human-readable message providing more details about the error. These messages can be shown to users.

  - `error.param` (string)
    If the error is parameter-specific, the parameter related to the error. For example, we can use this to display a message near the correct form field.

  - `error.type` (string, required)
    The type of error returned.
    Enum: "INVALID_REQUEST_ERROR", "AUTHENTICATION_ERROR", "PERMISSION_ERROR", "API_ERROR"


