# REST Resource: sites.channels

## Resource: Channel

A `Channel` represents a stream of releases for a site. All sites have a default `live` channel that serves content to the Firebase-provided subdomains and any connected custom domains.

| JSON representation |
|---|
| ``` { "name": string, "url": string, "release": { object (`https://firebase.google.com/docs/reference/hosting/rest/v1beta1/sites.channels.releases#Release`) }, "createTime": string, "updateTime": string, "retainedReleaseCount": integer, "labels": { string: string, ... }, // Union field `expiration` can be only one of the following: "expireTime": string, "ttl": string // End of list of possible types for union field `expiration`. } ``` |

| Fields ||
|---|---|
| `name` | `string` The fully-qualified resource name for the channel, in the format: `sites/SITE_ID/channels/CHANNEL_ID` |
| `url` | `string` Output only. The URL at which the content of this channel's current release can be viewed. This URL is a Firebase-provided subdomain of `web.app`. The content of this channel's current release can also be viewed at the Firebase-provided subdomain of `firebaseapp.com`. If this channel is the `live` channel for the Hosting site, then the content of this channel's current release can also be viewed at any connected custom domains. |
| `release` | ``object (`https://firebase.google.com/docs/reference/hosting/rest/v1beta1/sites.channels.releases#Release`)`` Output only. The current release for the channel, if any. |
| `createTime` | ``string (`https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Timestamp` format)`` Output only. The time at which the channel was created. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: `"2014-10-02T15:01:23Z"` and `"2014-10-02T15:01:23.045123456Z"`. |
| `updateTime` | ``string (`https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Timestamp` format)`` Output only. The time at which the channel was last updated. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: `"2014-10-02T15:01:23Z"` and `"2014-10-02T15:01:23.045123456Z"`. |
| `retainedReleaseCount` | `integer` The number of previous releases to retain on the channel for rollback or other purposes. Must be a number between 1-100. Defaults to 10 for new channels. |
| `labels` | `map (key: string, value: string)` Text labels used for extra metadata and/or filtering. An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |
| Union field `expiration`. `expiration` can be only one of the following: ||
| `expireTime` | ``string (`https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Timestamp` format)`` The time at which the channel will be automatically deleted. If null, the channel will not be automatically deleted. This field is present in the output whether it's set directly or via the `ttl` field. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: `"2014-10-02T15:01:23Z"` and `"2014-10-02T15:01:23.045123456Z"`. |
| `ttl` | ``string (`https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Duration` format)`` Input only. A time-to-live for this channel. Sets `expireTime` to the provided duration past the time of the request. A duration in seconds with up to nine fractional digits, ending with '`s`'. Example: `"3.5s"`. |

| ## Methods ||
|---|---|
| ### `https://firebase.google.com/docs/reference/hosting/rest/v1beta1/sites.channels/create` | Creates a new channel in the specified site. |
| ### `https://firebase.google.com/docs/reference/hosting/rest/v1beta1/sites.channels/delete` | Deletes the specified channel of the specified site. |
| ### `https://firebase.google.com/docs/reference/hosting/rest/v1beta1/sites.channels/get` | Retrieves information for the specified channel of the specified site. |
| ### `https://firebase.google.com/docs/reference/hosting/rest/v1beta1/sites.channels/list` | Lists the channels for the specified site. |
| ### `https://firebase.google.com/docs/reference/hosting/rest/v1beta1/sites.channels/patch` | Updates information for the specified channel of the specified site. |