查詢域名配置信息
更新時間 2023-11-10 10:42:06
最近更新時間: 2023-11-10 10:42:06
分享文章
接口功能介紹
調用本接口可查詢視頻直播產品指定域名配置信息
使用說明
- 單個用戶一分鐘限制調用10000次,并發不超過100
- 各功能默認為關閉,若無返回值,則代表關閉
接口詳情
請求方式:POST
請求路徑:/live/domain/query-domain-detail
請求參數
| 參數 | 類型 | 名稱 | 是否必填 | 說明 |
|---|---|---|---|---|
| product_code | string | 產品類型 | 是 | 取值:“005”(即視頻直播) |
| domain | string | 域名 | 是 | 支持單個域名 |
響應參數
| 參數 | 類型 | 名稱 | 說明 |
|---|---|---|---|
| code | int | 狀態碼 | 成功100000 |
| message | string | 信息描述 | 成功返回success,其他返回異常信息描述 |
| domain | string | 域名 | |
| product_code | string | 產品類型 | |
| insert_date | string | 創建時間 | 毫秒 |
| status_date | string | 修改時間 | 毫秒 |
| status | int | 域名狀態 | 4-已啟用;6-已停止。域名詳情只返回域名的確定狀態,過程中的狀態不會返回。 |
| area_scope | int | 服務區域 | 1-中國內地;2-全球(不含中國內地); 3-全球 |
| conf_type | int | 域名配置類型 | 1(直播拉流);2(直播推流) |
| pull_stream_mode | int | 拉流模式 | 取值:0:推拉流,1:回源拉流,默認取值為0 此參數只能在conf_type=1時起作用 |
| push_stream_domain | string | 關聯推流域名 | |
| https_switch | int | 開關 | 取值:0:關,1:開;默認取值為0 |
| cert_name | string | 證書名 | 僅https_switch為1時生效 |
| rtmp_origin | list | rtmp協議回源參數 | 元素為字典 |
| rtmp_origin[*].origin | string | rtmp協議地址 | |
| flv_origin | list | flv協議http回源參數 | 元素為字典 |
| flv_origin[*].origin | string | flv協議地址 | |
| flv_https_origin | list | flv協議https回源參數 | 元素為字典 |
| flv_https_origin[*].origin | string | flv協議地址 | |
| hls_http_origin | list | hls協議回源參數 | 元素為字典 |
| hls_http_origin[*].origin | string | 源站 | |
| hls_https_origin | list | hls協議回源參數 | 元素為字典 |
| hls_https_origin[*].origin | string | 源站 | |
| distribution_protocol | string | 分發協議 | flv,rtmp,hls, 多個以逗號間隔 |
| ip_access_control | dict | ip黑白名單 | |
| ip_access_control.list | list | ip名單 | 示例:["1.1.1.1", "2.2.2.2"] |
| ip_access_control.type | int | 黑白名單 | 取值:0:黑名單,1:白名單;默認取值為0 |
| ip_access_control.switch | string | 開關 | 取值:on(開啟)、off(關閉) |
| referer_control | dict | referfer黑白名單 | |
| referer_control.switch | string | 開關 | 取值:on(開啟)、off(關閉) |
| referer_control.list | list | referfer名單 | 示例:["daliqc.cn","daliqc.cn1"] |
| referer_control.type | int | 黑白名單 | 取值:0:黑名單,1:白名單;默認取值為0 |
| referer_control.allow_empty | string | 空referfer | 取值"on", "off",取值"on", "off",默認"off" |
| self_notice | object | 推流回調 | 不傳字段或者傳值為null代表不做修改,否則默認整體替換 若self_notice.switch=off,本參數不會返回 |
| self_notice.switch | int | 推流回調開關 | 取值:on(開啟)、off(關閉); 開啟時,推流回調地址、推流回調host、開播通知uri和關播通知uri均必填 |
| self_notice.notify_address | string | 推流回調地址 | 支持ipv4、ipv6和域名 |
| self_notice.notify_port | int | 開關播通知的端口 | 若開關播通知的端口為默認值為80,不會返回 |
| self_notice.notify_host | string | 開關播請求使用的host頭 | 支持ipv4、ipv6和域名 |
| self_notice.notify_start_url_path | string | 開播通知uri | 示例:”/pushstart“ |
| self_notice.notify_stop_url_path | string | 關播通知uri | 示例:”/pushend“ |
| time_shift | object | 時移任務 | 不傳字段代表不做修改,否則默認整體替換,只支持配置一個時移任務; 當前只支持綁定推流域名,若time_shift.switch=off,本參數不會返回 |
| time_shift.switch | string | 時移開關 | 取值:on(開啟)、off(關閉); |
| time_shift.max_playback_time | string | 時移任務回看時長 | 30s~30d(time格式,30s到30天); 默認一小時,支持的單位: s、m、 h、d |
| time_shift.module_id | string | 錄制模板id | 時移需要綁定的錄制模板id |
| third_push | object | 轉推 | 若third_push.switch,本參數不會返回 |
| third_push.switch | int | 轉推開關,on(開啟)、off(關閉) | |
| third_push.push_list | list | 轉推列表 | |
| third_push.push_list[*].origin | string | 支持ipv4、ipv6和域名 | |
| third_push.push_list[*].port | string | 轉推目標端口 默認1935 | 若轉推目標端口為默認值為1935,不會返回 |
| third_push.push_list[*].host | string | 轉推使用的請求頭host |
示例
請求路徑://cdnapi-global.ctapi.daliqc.cn/live/domain/query-domain-detail
請求示例
{
"product_code": "005",
"domain": "daliqc.cn"
}
正常響應示例
{
"code": 100000,
"message": "success",
"domain": "pull.daliqc.cn",
"product_code": "005",
"insert_date": "1657177732000",
"status": 4,
"area_scope": 1,
"conf_type": 1,
"pull_stream_mode": 0,
"push_stream_domain": "push.daliqc.cn",
"https_switch": 0,
"cert_name": "",
"rtmp_origin": [],
"flv_origin": [],
"flv_https_origin": [],
"hls_http_origin": [],
"hls_https_origin": [],
"distribution_protocol": "",
"ip_access_control": {
"type": 0,
"protocols": [],
"switch": "off"
},
"referer_control": {
"type": 0,
"allow_empty": "on",
"protocols": [],
"switch": "off"
},
"self_notice": {
"switch": "on",
"notify_address": "1.1.1.1",
"notify_host": "2.2.2.2",
"notify_port": 81,
"notify_start_url_path": "/pushStart",
"notify_stop_url_path": "/pushStop"
},
"time_shift": {
"switch": "on",
"max_playback_time": "32s",
"module_id": "d6aaaaaaa5"
},
"third_push": {
"switch": "on",
"push_list": [
{
"origin": "3.3.3.3",
"port": "1935",
"host": "daliqc.cn2"
}
]
}
}
錯誤碼請參考:參數code和message含義