# Show where each name a deployment's pack declares is set

GET

/v1/deployments/{deploymentId}/pack-env

```sh
curl --request GET \
  --url https://example.com/v1/deployments/example/pack-env \
  --header 'Authorization: Bearer <token>'
```

On a server that runs a pack service per deployment and gives it the env its pack declares: each declared name, where it’s set (the deployment’s project, then its org, then the workspace, at the env the server serves) and why it can’t be given, if it can’t. Never a value. A name set only as a secret can’t be given into the pack service’s environment yet: a tool reads it per call (`ctx.secrets`).

## Authorizations

- **[bearerAuth](https://docs.kindgi.com/v0.5.0/reference/api.md#bearerauth)**

## Parameters

### Path Parameters

**deploymentId**

required

string

\>= 1 characters

Deployment id assigned by the ledger at register time.

## Responses

### 200

Where each declared name is set.

application/json

Where each name the deployment’s pack declares is set, at the env the server serves. Never a value.

object

**envName**

required

The env the values are read at (`KINDGI_ENV`).

string

**data**

required

Every declared name, required ones first, each list in name order.

Array\<object>

One name the deployment’s pack declares: where it’s set, and why it can’t be given to the pack service, if it can’t (for `ambiguous` only, `secretScope` names the secret’s scope and `cloudSecretScope` the cloud secret’s). Each name is looked for at the deployment’s project, then its org, then the workspace (most specific wins); a workspace-wide deployment’s, at the workspace’s default project. Never a value.

object

**name**

required

string

**required**

required

boolean

**kind**

required

One of:

- **string**

  string

  Allowed values: env secret cloud-secret

- **null**

  null

**scope**

required

One of:

- **object**

  Where a value is set: the deployment’s project, the project’s org, or the workspace (`tenant`).

  object

  **kind**

  required

  string

  Allowed values: project org tenant

  **id**

  The project’s or the org’s id. Absent for the workspace (`tenant`).

  string

- **null**

  null

**missing**

required

Set nowhere, as a plain value, a secret or a cloud secret (optional names too).

boolean

**problem**

Why it can’t be given to the pack service. `ambiguous`: set two ways, as two of a plain value, a secret and a cloud secret (`kind` and `scope` are the first of those; `secretScope` names the secret’s scope when `kind` is `env`, and `cloudSecretScope` the cloud secret’s). `secret-not-yet`: set only as a secret, and the orchestrator didn’t ask for secret values (`secrets=values`); a tool reads it per call (`ctx.secrets`). `missing`: a required name set nowhere. `unreadable`: set as a secret, and it can’t be read for a reason the platform fixes, not the owner. Absent when it can be given, and for an optional name set nowhere. The owner’s check (`GET /v1/deployments/{deploymentId}/pack-env`) lists a name set only as a secret as `kind: 'secret'`, with no problem.

string

Allowed values: ambiguous secret-not-yet missing unreadable

**secretScope**

Where a value is set: the deployment’s project, the project’s org, or the workspace (`tenant`).

object

**kind**

required

string

Allowed values: project org tenant

**id**

The project’s or the org’s id. Absent for the workspace (`tenant`).

string

**cloudSecretScope**

Where a value is set: the deployment’s project, the project’s org, or the workspace (`tenant`).

object

**kind**

required

string

Allowed values: project org tenant

**id**

The project’s or the org’s id. Absent for the workspace (`tenant`).

string

**problem**

Why a deployment’s pack service can’t be given its declared environment, the first in this order: `pack-env-ambiguous` (a name is set two ways: two of a plain value, a secret and a cloud secret), `pack-env-secret-not-yet` (a name is set only as a secret, and its value wasn’t asked for), `pack-env-missing` (a required name is set nowhere), `pack-env-secret-unreadable` (a name’s secret is set, but it can’t be read for a reason the platform fixes, not the owner; only a read with `secrets=values` finds it, and only when there’s no other problem). A later runtime may add codes, so treat an unknown one as a reason not yet named.

string

Allowed values: pack-env-ambiguous pack-env-secret-not-yet pack-env-missing pack-env-secret-unreadable

##### Example

```json
{
  "data": [
    {
      "kind": "env",
      "scope": {
        "kind": "project"
      },
      "problem": "ambiguous",
      "secretScope": {
        "kind": "project"
      },
      "cloudSecretScope": {
        "kind": "project"
      }
    }
  ],
  "problem": "pack-env-ambiguous"
}
```

### 401

Missing / malformed / expired / revoked bearer token.

application/json

object

**error**

required

object

**code**

required

Stable machine-readable discriminant. Values match domain error codes (see `docs/API-ROUTE-CONVENTIONS.md` §4.3).

string

**message**

required

string

**details**

Optional, kind-specific.

object

**_key_**

additional properties

any

**requestId**

required

Server-assigned request id; also echoed via `X-Request-Id` header.

string

##### Examplegenerated

```json
{
  "error": {
    "code": "example",
    "message": "example",
    "details": {},
    "requestId": "example"
  }
}
```

### 404

No deployment with that id under this workspace, or one in a project the caller doesn’t read (`deployment-not-found`).

application/json

object

**error**

required

object

**code**

required

Stable machine-readable discriminant. Values match domain error codes (see `docs/API-ROUTE-CONVENTIONS.md` §4.3).

string

**message**

required

string

**details**

Optional, kind-specific.

object

**_key_**

additional properties

any

**requestId**

required

Server-assigned request id; also echoed via `X-Request-Id` header.

string

##### Examplegenerated

```json
{
  "error": {
    "code": "example",
    "message": "example",
    "details": {},
    "requestId": "example"
  }
}
```

### 501

The server’s pack services take their env from how they’re run, not from the env store (`pack-env-not-served`).

application/json

object

**error**

required

object

**code**

required

Stable machine-readable discriminant. Values match domain error codes (see `docs/API-ROUTE-CONVENTIONS.md` §4.3).

string

**message**

required

string

**details**

Optional, kind-specific.

object

**_key_**

additional properties

any

**requestId**

required

Server-assigned request id; also echoed via `X-Request-Id` header.

string

##### Examplegenerated

```json
{
  "error": {
    "code": "example",
    "message": "example",
    "details": {},
    "requestId": "example"
  }
}
```

### 503

The database was too busy to answer in time (`database-busy`); `Retry-After` (whole seconds) says when to try again.

application/json

object

**error**

required

object

**code**

required

Stable machine-readable discriminant. Values match domain error codes (see `docs/API-ROUTE-CONVENTIONS.md` §4.3).

string

**message**

required

string

**details**

Optional, kind-specific.

object

**_key_**

additional properties

any

**requestId**

required

Server-assigned request id; also echoed via `X-Request-Id` header.

string

##### Examplegenerated

```json
{
  "error": {
    "code": "example",
    "message": "example",
    "details": {},
    "requestId": "example"
  }
}
```

## See also

- [`GET /v1/deployments/{deploymentId}`: Fetch a signed deployment record](https://docs.kindgi.com/v0.5.0/reference/api/operations/deploymentsget.md)
- [`POST /v1/deployments/{deploymentId}/secrets`: Sync secrets against a deployment](https://docs.kindgi.com/v0.5.0/reference/api/operations/deploymentssyncsecrets.md)
- [`GET /v1/deployments/{deploymentId}/values`: List the values a deployment needs in a project](https://docs.kindgi.com/v0.5.0/reference/api/operations/deploymentsvalueslist.md)
- [`POST /v1/deployments/{deploymentId}/promotions`: Promote a deployment to the next environment](https://docs.kindgi.com/v0.5.0/reference/api/operations/deploymentspromote.md)
- [Kindgi 0.1.9](https://docs.kindgi.com/v0.5.0/releases/0.1.9.md)
- [Error code `database-busy`](https://docs.kindgi.com/v0.5.0/reference/errors.md#database-busy)
- [Error code `deployment-not-found`](https://docs.kindgi.com/v0.5.0/reference/errors.md#deployment-not-found)
- [Error code `pack-env-not-served`](https://docs.kindgi.com/v0.5.0/reference/errors.md#pack-env-not-served)
- [Every error code](https://docs.kindgi.com/v0.5.0/reference/errors.md)
