# What a service's containers get

Source: https://openpanel.sh/docs/api/variables/what-a-service-s-containers-get

The variables of the project, its environment and the service, merged with the narrowest winning, as the next deployment will use them. Secrets come without their value.

`GET https://openpanel.sh/api/v1/services/{serviceId}/env`

## Parameters

| Name | In | Required | Description |
|---|---|---|---|
| `serviceId` | path | yes | The service's id. |

## Responses

| Status | Meaning | Body |
|---|---|---|
| 200 | What a service's containers get | `application/json`, `EnvList` |
| 401 | No valid credential was sent. | `application/problem+json`, `Problem` |
| 403 | The credential may not do this. | `application/problem+json`, `Problem` |
| 404 | Not found, or not visible to this credential. | `application/problem+json`, `Problem` |
| 422 | The input was refused; detail says why. | `application/problem+json`, `Problem` |
| 429 | Too many requests; wait for Retry-After seconds. | `application/problem+json`, `Problem` |

## Schemas

### EnvEntry

```json
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string"
    },
    "value": {
      "description": "Null for a secret.",
      "type": [
        "string",
        "null"
      ]
    },
    "secret": {
      "type": "boolean"
    },
    "scope": {
      "type": "string",
      "enum": [
        "project",
        "environment",
        "service"
      ],
      "description": "Where the value that wins is set."
    },
    "variableId": {
      "type": "string",
      "format": "uuid"
    }
  },
  "required": [
    "name",
    "value",
    "secret",
    "scope",
    "variableId"
  ]
}
```

### EnvList

```json
{
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/EnvEntry"
      }
    }
  },
  "required": [
    "data"
  ]
}
```

### Problem

```json
{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "description": "A link to the error's explanation in the docs."
    },
    "title": {
      "type": "string"
    },
    "status": {
      "type": "integer"
    },
    "code": {
      "type": "string",
      "description": "Stable machine-readable code: not_found, forbidden, invalid, conflict, rate_limited, not_implemented, …"
    },
    "detail": {
      "type": "string",
      "description": "What went wrong, in a sentence written for a person."
    }
  },
  "required": [
    "type",
    "title",
    "status",
    "code",
    "detail"
  ]
}
```