Sets the custom recording configuration for all live streams under the specified entry point.
PATCH https://api.agora.io/v1/projects/{appid}/fls/entry_points/{entry_point}/settings/record/custom/regions/{region}
Parameter | Type | Description |
---|---|---|
appid |
String | Required. The App ID corresponding to the entry point. |
entry_point |
String | Required. The entry point name. |
region |
String | Required. The configured region when adding the domain. |
The request body is in the JSON Object type, and contains the following fields:
Field | Type | Description |
---|---|---|
mp4Config |
JSON Object | Optional. For the configuration of the MP4 recording files, see mp4Config. |
hlsConfig |
JSON Object | Optional. For the configuration of the HLS recording files, see HlsConfig. |
storageConfig |
JSON Object | Optional (required when setting recording options for the first time). For the storage configuration of the recording files, see StorageConfig. |
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 for possible reasons.
Request line
PATCH https://api.agora.io/v1/projects/{your_appid}/fls/entry_points/live/settings/record/custom/regions/cn HTTP/1.1
Request body
{
"hlsConfig": {
"enabled": true
},
"mp4Config": {
"enabled": true
},
"storageConfig": {
"accessKey": "{your access key}",
"bucket": "{your bucket}",
"region": 3,
"secretKey": "{your secret key}",
"vendor": 2
}
}
Response line
HTTP/1.1 200 OK
Gets the custom recording configuration for the specified entry point.
GET https://api.agora.io/v1/projects/{appid}/fls/entry_points/{entry_point}/settings/record/custom/regions/{region}
Parameter | Type | Description |
---|---|---|
appid |
String | Required. The App ID corresponding to the entry point. |
entry_point |
String | Required. The entry point name. |
region |
String | Required. The configured region when adding the domain. |
If the returned HTTP status code is 200, the request is successful, and the response body contains the following fields:
Field | Type | Description |
---|---|---|
mp4Config |
JSON Object | For the configuration of the MP4 recording files, see mp4Config. |
hlsConfig |
JSON Object | For the configuration of the HLS recording files, see HlsConfig. |
storageConfig |
JSON Object | For the storage configuration of the recording files, see StorageConfig. |
If the returned HTTP status code is not 200, the request fails. You can refer to the HTTP status code for possible reasons.
Request line
GET https://api.agora.io/v1/projects/{your_appid}/fls/entry_points/live/settings/record/custom/regions/cn HTTP/1.1
Response line
HTTP/1.1 200 OK
Request body
{
"hlsConfig": {
"enabled": true
},
"mp4Config": {
"enabled": true
},
"storageConfig": {
"accessKey": "{your accesskey}",
"region": 3,
"secretKey": "{your secretkey}",
"vendor": 2
}
}
The configuration of the MP4 recording files, including the following fields:
enabled
: Bool type, optional. Whether to enable recording in the MP4 format.
The configuration of the HLS recording files, including the following fields:
enabled
: Bool type, optional. Whether to enable recording in the HLS format.
The storage configuration of the recording files, including the following fields:
vendor
: Number. The third-party cloud storage vendor.
0
: Qiniu Cloud1
: Amazon S32
: Alibaba Cloud3
: Tencent Cloud4
: Kingsoft Cloud5
: Microsoft Azure6
: Google Cloud7
: Huawei Cloud8
: Baidu AI Cloudregion
: Number. The region information specified for the third-party cloud storage. The recording service only supports regions in the following lists: region
of the cloud recording service in the acquire
method, make sure that the region of the third-party cloud storage corresponds to the same geographical region. For example, if the region of the cloud recording service is set to NA
(North America), the third-party cloud storage needs to be set to a location within North America.vendor
= 0):0
: East China1
: North China 2
: South China3
: North America 4
: Southeast Asiavendor
= 1):0
:US_EAST_11
:US_EAST_22
:US_WEST_13
:US_WEST_24
:EU_WEST_15
:EU_WEST_26
:EU_WEST_37
:EU_CENTRAL_18
:AP_SOUTHEAST_19
:AP_SOUTHEAST_210
:AP_NORTHEAST_111
:AP_NORTHEAST_212
:SA_EAST_113
:CA_CENTRAL_114
:AP_SOUTH_115
:CN_NORTH_116
:CN_NORTHWEST_118
:AF_SOUTH_119
:AP_EAST_120
:AP_NORTHEAST_321
:EU_NORTH_122
:ME_SOUTH_124
:AP_SOUTHEAST_325
:EU_SOUTH_126
:AWS_REGION_NUMvendor
= 2):0
: CN_Hangzhou 1
: CN_Shanghai 2
: CN_Qingdao 3
: CN_Beijing4
: CN_Zhangjiakou 5
: CN_Huhehaote 6
: CN_Shenzhen 7
: CN_Hongkong 8
: US_West_1 9
: US_East_1 10
: AP_Southeast_1 11
: AP_Southeast_2 12
: AP_Southeast_3 13
: AP_Southeast_5 14
: AP_Northeast_1 15
: AP_South_1 16
: EU_Central_1 17
: EU_West_1 18
: EU_East_119
:AP_Southeast_620
:CN_Heyuan21
:CN_Guangzhou22
:CN_Chengduvendor
= 3):0
:AP_Beijing_11
:AP_Beijing2
:AP_Shanghai3
:AP_Guangzhou4
:AP_Chengdu 5
:AP_Chongqing 6
:AP_Shenzhen_FSI 7
:AP_Shanghai_FSI 8
:AP_Beijing_FSI 9
:AP_Hongkong 10
:AP_Singapore 11
:AP_Mumbai 12
:AP_Seoul 13
:AP_Bangkok 14
:AP_Tokyo 15
:NA_Siliconvalley 16
:NA_Ashburn 17
:NA_Toronto 18
:EU_Frankfurt 19
:EU_Moscowvendor
= 4):0
:CN_Hangzhou1
:CN_Shanghai2
:CN_Qingdao3
:CN_Beijing4
:CN_Guangzhou5
:CN_Hongkong6
:JR_Beijing7
:JR_Shanghai8
:NA_Russia_19
:NA_Singapore_1vendor
= 5): region
parameter has no effect, whether or not it is set.
vendor
= 6): region
parameter has no effect, whether or not it is set.
vendor
= 7):0
:CN_North_11
:CN_North_42
:CN_East_23
:CN_East_34
:CN_South_15
:CN_Southwest_26
:AP_Southeast_17
:AP_Southeast_28
:AP_Southeast_39
:AF_South_110
:SA_Argentina_111
:SA_Peru_112
:NA_Mexico_113
:SA_Brazil_114
:LA_South_215
:SA_Chile_1vendor
= 8):0
:Beijing1
:Baoding2
:Suzhou3
:Guangzhou4
:Hongkong5
:Singapore6
:Wuhan7
:Shanghaibucket
: String. The bucket name of the third-party cloud storage.
accessKey
: String. The access key of the third-party cloud storage. Agora suggests that you use a write-only access key.
secretKey
: String. The secret key of the third-party cloud storage.
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. |