文档中心 API文档 查询分钟级别的FLV回源状态码

查询分钟级别的FLV回源状态码

更新时间:2023-05-11 10:29:05

适用产品

直播分发

接口描述

查询分钟级别的FLV回源状态码

推荐使用 Open API在线调试

Open API在线调试功能提供可视化界面在线调试API、支持生成代码示例、快速检索查看API文档等能力。前往调试

请求参数

Body 参数

参数名称类型必填描述
dateFrom
String开始时间: 1.时间格式为yyyy-MM-ddTHH:mm:ss+08:00,例如,2019-01-01T10:00:00+08:00(为北京时间2019年01月01日10点0分0秒); 2.不能大于当前时间 3.最多可获取最近半年(183天)的数据。
dateTo
String结束时间: 时间格式2016-12-02T10:00:00+08:00 结束时间需大于开始时间,结束时间如果大于当前时间,取当前时间。 dateFrom,dateTo二者都未传,默认查询过去的24小时;如仅有一个未传,抛异常 允许查询最大时间间隔:24小时(可联系技术支持调整),即dateFrom和dateTo相差不能超过24小时。
domain
List域名: 可传递域名数量上限默认为20个(可联系技术支持调整); 自动过滤掉非法域名(如传递非法域名,会被过滤掉,查询结果只返回合法域名的数据) 域名超过上限,报错
dataInterval
String数据粒度:不传默认1m 支持1m(1分钟)、5m(5分钟)
queryBy
String查询维度: 可选值 statusCode, 2XX, 3XX, 4XX, 5XX; 不传默认 statusCode; statusCode :返回回源状态码明细; 2XX : 返回各 2 开头回源状态码明细数据; 3XX : 返回各 3 开头回源状态码明细数据; 4XX : 返回各 4 开头回源状态码明细数据; 5XX : 返回各 5 开头回源状态码明细数据;

返回参数

Body 参数

参数名称类型描述
code
String请求结果状态码
message
String请求结果信息
data
List
statusCode
String状态码
detailList
List
timestamp
String时间,格式为yyyy-MM-dd HH:mm
value
String回源总请求数

错误码

错误代码(code)描述(message)HTTP状态码语义
24102014This operation requires a body. Ensure that the body is present and the Content-Type header is set.400请求体没有传递
24102013The accept header specified in your request is not acceptable.400Accept请求头不支持,接口仅支持json和xml格式,默认为json格式
24102020The value of X-Time-Zone header specified in your request in invalid.400请求头时区不合法
24102002There was an error in the body of your HTTP request.400请求体格式错误
24102006The date specified is invalid.400dateFrom或dateTo不符合规范或时间区间不合法
24102007You cannot specify a period greater than xx minute(s).400dateFrom和dateTo相差超过限制值
24102019The request was rejected because the number of domain(xx) exceeds the limit (xx).400传递的域名个数超过账号限制
24102008param: domain is null or invalid.400参数domain不符合规范
24102008param: queryBy is null or invalid.400参数queryBy不符合规范
24102500We encountered an internal error. Please try again.500系统发生错误

示例

JSON
JSON
请求示例
复制代码 复制成功
#!/bin/bash
username="example_username"
apiKey="example_apiKey"
date=`env LANG="en_US.UTF-8" date -u "+%a, %d %b %Y %H:%M:%S GMT"`
password=`echo -en "$date" | openssl dgst -sha1 -hmac $apiKey -binary | openssl enc -base64`
curl -i --url "https://open.chinanetcenter.com/api/report/flv/status-code/real-time/origin/total" \
-X "POST" \
-u "$username:$password" \
-H "Date: $date" \
-H "Accept: application/json" \
-d '{
"dateFrom": "2021-01-01T10:00:00+08:00",
"dateTo": "2021-01-02T10:00:00+08:00",
"domain": ["www.aaa.com","www.bbb.com"],
"dataInterval": "5m",
"queryBy":"2XX"
}'
返回示例
复制代码 复制成功
{
  "code": "0",
  "message": "success",
  "data": [
    {
      "statusCode": "2XX",
      "detailList": [
        {
          "timestamp": "2020-08-30 10:00",
          "value": "1200000"
        },
        {
          "timestamp": "2020-08-30 10:05",
          "value": "1800000"
        }
      ]
    },
    {
      "statusCode": "200",
      "detailList": [
        {
          "timestamp": "2020-08-30 10:00",
          "value": "3600000"
        },
        {
          "timestamp": "2020-08-30 10:05",
          "value": "4800000"
        }
      ]
    },
    {
      "statusCode": "201",
      "detailList": [
        {
          "timestamp": "2020-08-30 10:00",
          "value": "1800000"
        }
      ]
    },
    {
      "statusCode": "203",
      "detailList": [
        {
          "timestamp": "2020-08-30 10:05",
          "value": "2400000"
        }
      ]
    }
  ]
}
本篇文档内容对您是否有帮助?
有帮助
我要反馈
提交成功!非常感谢您的反馈,我们会继续努力做到更好!