# List a project's tenants

Source: https://www.jawsdeploy.net/rest-api/project-tenants-list | Section: Tenants

List the tenants connected to a project, with their environments and missing values.

`GET /api/project/tenants`

Lists the tenants connected to a project, sorted by name - the same connections `GET /api/tenant/projects` shows from the tenant's side. Archived tenants are included and marked with `isArchived`.

`missingValues` counts the required tenant variables that have no value and no default, once for every environment the tenant uses. Fill them in with `PUT /api/tenant/variables`.

`tenantedDeployments` is the project's own setting - `Off`, `Allowed` or `Required`. A project that is `Off` doesn't deploy to tenants yet, even when tenants are connected to it.

Deleted tenants and deleted environments are left out.

## Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `projectId` | query | string | yes | ID of the project. |

## Errors

| Status | Meaning |
|---|---|
| 400 | Invalid `projectId`. A project that belongs to another organization is reported the same way as one that does not exist. |
| 401 | Missing or invalid Basic auth credentials, or the service account lacks permission to manage tenants in this workspace. |

Example request:

```
GET /api/project/tenants?projectId=prj_abc123 HTTP/1.1
Authorization: Basic <base64(serviceAccountId:apiKey)>
```

Example response:

```
{
  "projectId": "prj_abc123",
  "tenantedDeployments": "Allowed",
  "tenants": [
    {
      "tenantId": "tnt_acme",
      "name": "Acme",
      "isArchived": false,
      "tags": [
        { "tagId": "tag_eu", "name": "Region/EU" }
      ],
      "environments": [
        { "environmentId": "env_test", "name": "Test" },
        { "environmentId": "env_prod", "name": "Production" }
      ],
      "missingValues": 1
    }
  ]
}
```

