Consulta dados em lote no nível de stream para um nome de domínio especificado. Um máximo de 5.000 linhas de dados pode ser retornado por consulta.
Descrição da operação
Se esta for a primeira vez que você usa esta operação para consultar dados no nível de stream para um nome de domínio especificado, abra um ticket para solicitar a configuração de backend antes de usar esta operação. Forneça as seguintes informações no ticket:
O nome de domínio a ser consultado.
O número máximo de transmissões ao vivo simultâneas sob o nome de domínio.
O número máximo de espectadores simultâneos por transmissão ao vivo.
Os tipos de protocolo incluídos nas solicitações do cliente.
Antes de começar
-
A contagem de espectadores online para HLS não é suportada por padrão.
-
Apenas um único nome de domínio pode ser consultado por vez.
-
Intervalo de tempo máximo para consultas grandes: 24 horas.
-
Granularidade mínima de consulta: 1 minuto.
-
Intervalo máximo de consulta: 31 dias.
Limite de taxa
O limite de QPS de usuário único para esta operação é de 10 chamadas por segundo. Se esse limite for excedido, a chamada da API será limitada, o que pode afetar o seu negócio. Invoque esta operação adequadamente.
Experimente agora
Testar
Autorização RAM
|
Ação |
Nível de acesso |
Tipo de recurso |
Chave de condição |
Ação dependente |
|
live:DescribeLiveStreamMetricDetailData |
none |
*Domain
|
Nenhuma | Nenhuma |
Parâmetros da solicitação
|
Parâmetro |
Tipo |
Obrigatório |
Descrição |
Exemplo |
| RegionId |
string |
Não |
O ID da região. Valores válidos:
|
cn-shenzhen |
| DomainName |
string |
Não |
|
example.com |
| StartTime |
string |
Sim |
O início do intervalo de tempo a ser consultado. Especifique a hora no padrão ISO 8601 no formato AAAA-MM-DDThh:mm:ssZ. A hora deve estar em UTC. |
2015-12-10T20:00:00Z |
| EndTime |
string |
Sim |
O fim do intervalo de tempo a ser consultado. A hora de término deve ser posterior à hora de início, e a diferença não pode exceder 1 dia. Especifique a hora no padrão ISO 8601 no formato AAAA-MM-DDThh:mm:ssZ. A hora deve estar em UTC. |
2015-12-10T21:00:00Z |
| AppName |
string |
Não |
O nome do aplicativo. Especifique este parâmetro para consultar dados no nível de stream para um aplicativo específico. Nota
Se você especificar StreamName, também deverá especificar AppName. |
liveApp**** |
| StreamName |
string |
Não |
O nome do stream. Especifique este parâmetro junto com AppName para retornar dados no nível de stream. Nota
Se você especificar StreamName, também deverá especificar AppName. |
liveStream**** |
| Protocol |
string |
Não |
O protocolo de stream. Valores válidos: flv, hls, rtmp, rts e p2p. Você pode consultar dados para vários protocolos separando-os por vírgulas (,). Os dados para vários protocolos não são agregados e são gerados no nível de stream. Nota
A opção rts consulta streams de Real-Time Streaming (RTS) que usam o protocolo ARTC.
|
flv |
| NextPageToken |
string |
Não |
O token de consulta paginada. Um máximo de 5.000 linhas de dados pode ser retornado por consulta. Se os dados a serem consultados excederem 5.000 linhas, a resposta incluirá o índice inicial para a próxima solicitação de paginação. Passe este token na solicitação para continuar consultando os dados de onde a consulta anterior parou. |
UjsM9x3aVcJi9a0-ArwJUTTC67CIBKLw***** |
Elementos de resposta
|
Elemento |
Tipo |
Descrição |
Exemplo |
|
object |
Os dados da consulta. |
||
| DomainName |
string |
O nome de domínio acelerado consultado. |
example.com |
| EndTime |
string |
A hora de término. A hora segue o padrão ISO 8601 no formato AAAA-MM-DDThh:mm:ssZ. A hora é exibida em UTC. |
2015-12-10T21:00:00Z |
| NextPageToken |
string |
O índice inicial para a próxima consulta. Este valor é retornado quando os dados consultados não foram totalmente recuperados. |
UjsM9x3aVcJi9a0-ArwJUTTC67C***37C0= |
| PageSize |
integer |
O número de linhas de dados retornadas. |
5000 |
| RequestId |
string |
O ID da solicitação. |
B955107D-E658-4E77-B913-E0AC3D31693E |
| StartTime |
string |
A hora de início. A hora segue o padrão ISO 8601 no formato AAAA-MM-DDThh:mm:ssZ. A hora é exibida em UTC. |
2015-12-10T20:00:00Z |
| StreamDetailData |
object |
||
| StreamData |
array<object> |
O conjunto de dados retornado. |
|
|
object |
O conjunto de dados retornado. |
||
| AppName |
string |
The application name. |
app |
| Bps |
number |
The average bandwidth per minute for the stream. Unit: bit/s. |
423304182.66 |
| Count |
integer |
The total number of online viewers per minute for the stream. |
423304182 |
| FlvBps |
number |
The bandwidth for the FLV protocol. Unit: bit/s. Nota
This field is not returned if the specified protocol does not match. |
454 |
| FlvCount |
integer |
The number of online viewers for the FLV protocol. Nota
This field is not returned if the specified protocol does not match. |
32 |
| FlvTraffic |
integer |
The traffic for the FLV protocol. Unit: bytes. Nota
This field is not returned if the specified protocol does not match. |
1254 |
| HlsBps |
number |
The bandwidth for the HLS protocol. Unit: bit/s. Nota
This field is not returned if the specified protocol does not match. |
4456 |
| HlsCount |
integer |
The number of online viewers for the HLS protocol. Nota
Currently not supported. |
56 |
| HlsTraffic |
integer |
The traffic for the HLS protocol. Unit: bytes. Nota
This field is not returned if the specified protocol does not match. |
568 |
| NewConns |
string |
The number of new connections per minute for the stream. |
450 |
| P2pBps |
number |
The bandwidth for the P2P protocol. Unit: bit/s. Nota
This field is not returned if the specified protocol does not match. |
6845 |
| P2pCount |
integer |
The number of online viewers for the P2P protocol. Nota
This field is not returned if the specified protocol does not match. |
78 |
| P2pTraffic |
integer |
The traffic for the P2P protocol. Unit: bytes. Nota
This field is not returned if the specified protocol does not match. |
4102 |
| RtmpBps |
number |
The bandwidth for the RTMP protocol. Unit: bit/s. Nota
This field is not returned if the specified protocol does not match. |
3323 |
| RtmpCount |
integer |
The number of online viewers for the RTMP protocol. Nota
This field is not returned if the specified protocol does not match. |
63 |
| RtmpTraffic |
integer |
The traffic for the RTMP protocol. Unit: bytes. Nota
This field is not returned if the specified protocol does not match. |
5568 |
| RtsBps |
number |
The bandwidth for the RTS protocol. Unit: bit/s. Nota
This field is not returned if the specified protocol does not match. |
2361 |
| RtsCount |
integer |
The number of online viewers for the RTS protocol. Nota
This field is not returned if the specified protocol does not match. |
89 |
| RtsTraffic |
integer |
The traffic for the RTS protocol. Unit: bytes. Nota
This field is not returned if the specified protocol does not match. |
2322 |
| StreamName |
string |
The stream name. |
test.flv |
| TimeStamp |
string |
The start time of the time slice. The time follows the ISO 8601 standard in the YYYY-MM-DDThh:mm:ssZ format. The time is displayed in UTC. |
2015-12-10T20:00:00Z |
| Traffic |
integer |
The total traffic per minute for the stream. Unit: bytes. |
423304182 |
Exemplos
Resposta de sucesso
JSON formato
{
"DomainName": "example.com",
"EndTime": "2015-12-10T21:00:00Z",
"NextPageToken": "UjsM9x3aVcJi9a0-ArwJUTTC67C***37C0=",
"PageSize": 5000,
"RequestId": "B955107D-E658-4E77-B913-E0AC3D31693E",
"StartTime": "2015-12-10T20:00:00Z",
"StreamDetailData": {
"StreamData": [
{
"AppName": "app",
"Bps": 423304182.66,
"Count": 423304182,
"FlvBps": 454,
"FlvCount": 32,
"FlvTraffic": 1254,
"HlsBps": 4456,
"HlsCount": 56,
"HlsTraffic": 568,
"NewConns": "450",
"P2pBps": 6845,
"P2pCount": 78,
"P2pTraffic": 4102,
"RtmpBps": 3323,
"RtmpCount": 63,
"RtmpTraffic": 5568,
"RtsBps": 2361,
"RtsCount": 89,
"RtsTraffic": 2322,
"StreamName": "test.flv",
"TimeStamp": "2015-12-10T20:00:00Z",
"Traffic": 423304182
}
]
}
}
Códigos de erro
|
Código de status HTTP |
Código de erro |
Mensagem de erro |
Descrição |
|---|---|---|---|
| 400 | InvalidStartTime.Malformed | Specified StartTime is malformed. | |
| 400 | InvalidEndTime.Malformed | Specified EndTime is malformed. | |
| 400 | InvalidEndTime.Mismatch | Specified end time does not math the specified start time. | The end time does not match the start time. Make sure that the start and end times match. |
| 400 | InvalidTimeSpan | The time span exceeds the limit. | The time span exceeds the limit. Please refer to the API documentation to specify a reasonable time span. |
| 400 | InvalidPageToken | The token of page is invalid. | The specified paging token is incorrect. Specify the correct token returned by the last query and confirm that your request parameters are not modified. |
| 400 | InvalidAppName.Mismatch | The AppName param must be passed. | The AppName parameter does not match. Make sure that you specify the correct AppName. |
| 400 | InvalidStreamProtocol.NotSupport | The specified stream protocol is not support. | |
| 400 | InvalidStreamName.LengthTooLong | The specified stream name is too long. | |
| 400 | InvalidAppName.LengthTooLong | The specified app name is too long. | |
| 400 | InvalidTime.ValueNotSupported | Specified Time is malformed. | The specified time is invalid. |
Consulte Códigos de Erro para uma lista completa.
Notas de versão
Consulte Notas de Versão para uma lista completa.