# Stream management (/en/api-reference/api-ref/broadcast-streaming/stream-management)

> For AI agents: see the complete documentation index at [llms.txt](/llms.txt).

## Ban a live stream [#ban-a-live-stream]

Bans a live stream, which rejects incoming streams from the live stream until it is unbanned or the specified time period is reached.

### HTTP request [#http-request]

```bash
PATCH https://api.agora.io/v1/projects/{appid}/fls/entry_points/{entry_point}/admin/banned_streams/{stream_name}
```

#### Path parameter [#path-parameter]

| Parameter     | Type   | Description                                        |
| :------------ | :----- | :------------------------------------------------- |
| `appid`       | String | Required. The App ID retrieved from Agora Console. |
| `entry_point` | String | Required. The entry point name.                    |
| `stream_name` | String | Required. The name of the live stream.             |

#### Request body [#request-body]

The request body is in the JSON Object type and contains the following fields:

* `resumeTime`: String. Optional. The time when incoming streams from the specified live stream can be accepted, in the RFC3339 format, for example, `2018-1129T19:00:00+08:00`. The default is 7 days after the live stream is banned.

### HTTP response [#http-response]

If the returned HTTP status code is 200, the request is successful.

If the returned HTTP status code is not 200, the request fails. You can refer to the [HTTP status code ](#http-code)for possible reasons.

### Example [#example]

**Request line**

```bash
PATCH https://api.agora.io/v1/projects/{your_appid}/fls/entry_points/live/admin/banned_streams/{your_stream_name} HTTP/1.1
```

**Request body**

```json
{
    "resumeTime": "2021-11-29T19:00:00+08:00"
}
```

**Response line**

```bash
HTTP/1.1 200 OK
```

## Unban a live stream [#unban-a-live-stream]

Unbans a live stream so that incoming streams from the live stream can be accepted again.

### HTTP request [#http-request-1]

```bash
DELETE https://api.agora.io/v1/projects/{appid}/fls/entry_points/{entry_point}/admin/banned_streams/{stream_name}
```

#### Path parameter [#path-parameter-1]

| Parameter     | Type   | Description                                        |
| :------------ | :----- | :------------------------------------------------- |
| `appid`       | String | Required. The App ID retrieved from Agora Console. |
| `entry_point` | String | Required. The entry point name.                    |
| `stream_name` | String | Required. The name of the live stream.             |

### HTTP response [#http-response-1]

If the returned HTTP status code is 200, the request is successful.

If the returned HTTP status code is not 200, the request fails. You can refer to the [HTTP status code ](#http-code)for possible reasons.

### Example [#example-1]

**Request line**

```bash
DELETE https://api.agora.io/v1/projects/{your_appid}/fls/entry_points/live/admin/banned_streams/{your_stream_name} HTTP/1.1
```

**Response line**

```bash
HTTP/1.1 200 OK
```

## List banned live streams [#list-banned-live-streams]

Lists all of the banned live streams under the specified entry point.

### HTTP request [#http-request-2]

```bash
GET https://api.agora.io/v1/projects/{appid}/fls/entry_points/{entry_point}/admin/banned_streams
```

#### Path parameter [#path-parameter-2]

| Parameter     | Type   | Description                                        |
| :------------ | :----- | :------------------------------------------------- |
| `appid`       | String | Required. The App ID retrieved from Agora Console. |
| `entry_point` | String | Required. The entry point name.                    |

### HTTP response [#http-response-2]

If the returned HTTP status code is 200, the request is successful. The response body contains the following fields:

`bannedStreamList`: JSON Array. The list of banned live streams. Each live stream corresponds to a JSON Object and contains the following fields:

| Field        | Type   | Description                                                                    |
| :----------- | :----- | :----------------------------------------------------------------------------- |
| `name`       | String | The stream name.                                                               |
| `resumeTime` | String | The time when incoming streams from the specified live stream can be accepted. |

If the returned HTTP status code is not 200, the request fails. You can refer to the [HTTP status code ](#http-code)for possible reasons.

### Example [#example-2]

**Request line**

```bash
GET https://api.agora.io/v1/projects/{appid}/fls/entry_points/live/admin/banned_streams HTTP/1.1
```

**Response line**

```bash
HTTP/1.1 200 OK
```

**Request body**

```json
{
    "bannedStreamList": [
        {
            "name": "{your_stream_namename1}",
            "resumeTime": "2021-11-29T19:00:00+08:00"
        },
        {
            "name": "{your_stream_name2}",
            "resumeTime": "2021-11-28T19:00:00+08:00"
        }
    ]
}
```

<a name="http-code" />

## HTTP status codes [#http-status-codes]

| Status code | Description                                                                                                                                              |
| :---------- | :------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 200         | The request succeeds.                                                                                                                                    |
| 400         | The parameter is invalid, for example the `appid` or the `entry_point` is empty, or the `region` parameter value is invalid.                             |
| 401         | Unauthorized (the customer ID and the customer secret do not match).                                                                                     |
| 404         | The server cannot find the resource according to the request, which means the requested entry point does not exist or the requested URI path is invalid. |
| 500         | An internal error occurs in the server, so the server is not able to complete the request.                                                               |
| 504         | An internal error occurs in the server. The gateway or the proxy server did not receive a timely request from the remote server.                         |
