# List a tenant's projects

Source: https://www.jawsdeploy.net/rest-api/tenants-projects-list | Section: Tenants

List the projects a tenant is connected to, with the environments it can use for each.

`GET /api/tenant/projects`

Lists the projects a tenant is connected to, sorted by name. For each project you get the environments the tenant can be deployed to.

`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; change it with `PUT /api/project`.

Deleted projects and deleted environments are left out.

## Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `tenantId` | query | string | yes | ID of the tenant. |

## Errors

| Status | Meaning |
|---|---|
| 400 | Invalid `tenantId`. |
| 401 | Missing or invalid Basic auth credentials, or the service account lacks permission to manage tenants in this workspace. |

Example request:

```
GET /api/tenant/projects?tenantId=tnt_acme HTTP/1.1
Authorization: Basic <base64(serviceAccountId:apiKey)>
```

Example response:

```
{
  "tenantId": "tnt_acme",
  "projects": [
    {
      "projectId": "prj_abc123",
      "name": "Acme web",
      "tenantedDeployments": "Allowed",
      "environments": [
        { "environmentId": "env_test", "name": "Test" },
        { "environmentId": "env_prod", "name": "Production" }
      ]
    }
  ]
}
```

