# List project channels

Source: https://www.jawsdeploy.net/rest-api/project-channels-list | Section: Project Channels

List the channels (release tracks) defined on a project, including their version rules.

`GET /api/project/channels`

Returns every channel for a project: name, description, attached lifecycle, default flag, and the channel's version rules.

### How the rules are evaluated

A channel gates two things, and each is optional - a blank field means *no constraint*.

- The **release version rule** (`versionRange`, `versionTagRegex`) gates which release versions may be created in the channel.
- The **package rules** (`packageRules`) gate which package versions may be pinned into those releases.

`versionRange` bounds the version **number** and takes no account of the prerelease tag; `versionTagRegex` decides whether tagged versions are allowed at all. The endpoints of a range therefore compare on the number alone, so `[2.0,4.0)` accepts `2.0.0-beta` and rejects `4.0.0-beta`. This differs from raw NuGet range semantics, which sort a prerelease below its own release.

`versionTagRegex` is matched against the prerelease label **without** the leading `-`, and against an empty string for a stable version. So `^$` accepts stable versions only, `^.+$` accepts prereleases only, and `^beta.*$` accepts `2.1.0-beta3` but not `2.1.0` or `2.1.0-rc1`. The app's channel editor shows `^$` as *Stable only* and `^.+$` as *Prereleases only*; any other expression shows as a custom pattern. There is no separate mode field to set.

`packageRules` are evaluated **in order and the first rule whose `packageFilter` matches a package wins**; a package matched by no rule is unconstrained. Each filter may only be used once per channel.

## Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `projectId` | query | string | yes | ID of the project. |

## Errors

| Status | Meaning |
|---|---|
| 400 | Invalid `projectId`. |
| 401 | Missing or invalid Basic auth credentials, or the service account lacks the required role. |

Example request:

```
GET /api/project/channels?projectId=prj_abc123
Authorization: Basic <base64(serviceAccountId:apiKey)>
```

Example response:

```
{
  "projectId": "prj_abc123",
  "channels": [
    {
      "channelId": "ch_1",
      "name": "Stable",
      "description": "Production releases",
      "lifecycleId": "lc_default",
      "isDefault": true,
      "versionRange": null,
      "versionTagRegex": "^$",
      "versionDefaultTag": null,
      "packageRules": []
    },
    {
      "channelId": "ch_2",
      "name": "Beta",
      "description": null,
      "lifecycleId": "lc_preview",
      "isDefault": false,
      "versionRange": "[2.0,4.0)",
      "versionTagRegex": "^beta.*$",
      "versionDefaultTag": "beta",
      "packageRules": [
        {
          "packageFilter": "MyApp.Frontend",
          "versionRange": "[2.0,3.0)",
          "versionTagRegex": null
        },
        {
          "packageFilter": "*",
          "versionRange": null,
          "versionTagRegex": "^$"
        }
      ]
    }
  ]
}
```

