huawei-cloud-api-definitions-VIS 0.1.20240402

Huawei Cloud API definitions, generated from OpenAPI spec
Documentation
1
{"base_path":"/","components":null,"consumes":"[\"application/json;charset=UTF-8\"]","definitions":{"CreateStreamRequestList":{"properties":{"access_key":{"description":"当视频类型为HTTP-FLV时,不需要该参数。视频接入类型是RTMP时,该参数表示秘钥access_key,用户可根据自己实际需求选择是否配置。如果配置了秘钥access_key,则进行RTMP推流时需要提供认证Token。这里的秘钥access_key由[创建AK/SK凭证](https://support.huaweicloud.com/api-vis/CreateAkskCertificate.html)接口生成。配置了秘钥access_key后,在推流时,需要在原始推流地址后面加上若干查询参数,作为推流认证信息,具体请参见[推流鉴权规则](https://support.huaweicloud.com/usermanual-vis/vis_02_0012.html)。如果不配置该参数,表示不提供access_key,则推流时不需要进行认证。","example":"ALKJOWLKJSDNFGO******KSJDF","type":"string"},"access_type":{"description":"视频接入类型,当前支持HTTP-FLV和RTMP协议,不区分大小写。","enum":["HTTP-FLV","RTMP","RTP"],"example":"RTMP","pattern":"^[A-Za-z0-9\\-]*","type":"string"},"description":{"description":"视频流的描述信息,可填字符串最大长度为500。","example":"","type":"string"},"encode_type":{"description":"视频流编码格式,当前支持H264,不区分大小写。","enum":["H264","H265","NONE"],"example":"H264","type":"string"},"name":{"description":"自定义流名称只能使用英文字母a~z,A-Z)、数字(0~9)以及连接符(-、_),连接符(-、__)不能连续出现、不能单独注册,也不能放在开头和结尾。长度不低于 8,不超过128个字符。","example":"RTMP******","maxLength":32,"minLength":1,"pattern":"^[A-Za-z0-9\\-_]*","type":"string"},"share_type":{"default":"PRIVATE","description":"视频流共享类型。\n- PRIVATE:非共享。\n- PUBLIC:共享。\n\n不填时默认为PRIVATE,不区分大小写。当值为PRIVATE,用户在拉取视频时会鉴权,拉流时必须在请求头中添加X-Auth-Token,值为创建视频流的用户的Token。拉流地址参考[获取视频流地址](https://support.huaweicloud.com/api-vis/ListStreamsAddresses.html)。","enum":["PRIVATE","PUBLIC"],"example":"PUBLIC","type":"string"},"tag":{"description":"和视频流关联的标签,一个视频流最多添加10个标签。","items":{"$ref":"#/definitions/StreamTag"},"maxItems":10,"minItems":0,"type":"array"},"url":{"description":"当视频类型为RTMP协议时,不需要该参数。当视频类型为HTTP-FLV协议时,该参数必填,表示HTTP-FLV协议视频流的拉流地址。该地址必须是http或https协议的合法URL,格式要求以“http://”或“https://”开头的字符串,例如“http://xxxx.xxx”。","example":"https://xxxxxxxx.com/live","type":"string"}},"required":["name","access_type","encode_type"]},"StreamResponse":{"properties":{"access_key":{"description":"RTMP视频流的密钥。接入类型(access_type)为RTMP时,才有该参数。","example":"ALKJOWLKJSDNFGO******KSJDF","type":"string"},"access_type":{"description":"视频接入类型。","example":"RTMP","type":"string"},"created_at":{"description":"视频流创建时间,UTC时间,格式为:YYYY-MM-DDTHH:MM:SSZ。","example":"2018-06-12T13:00:01Z","type":"number"},"description":{"description":"视频流描述信息。","example":"","type":"string"},"encode_type":{"description":"视频流编码格式。","example":"H264","type":"string"},"name":{"description":"视频流的名称。","example":"RTMP******","type":"string"},"share_type":{"description":"视频流共享类型。","example":"PRIVATE","type":"string"},"state":{"description":"视频流状态。\n- ACTIVE:表示已激活。\n- STOPPED:表示已停用。\n\n默认为STOPPED。","example":"STOPPED","type":"string"},"stream_id":{"description":"视频流ID。","example":"stream-0P5g9fQ2","type":"string"},"tag":{"description":"和视频流关联的标签。","items":{"$ref":"#/definitions/StreamTag"},"type":"array"},"updated_at":{"description":"视频流更新时间,UTC时间,格式为:YYYY-MM-DDTHH:MM:SSZ。","example":"2018-06-12T13:00:01Z","type":"number"},"url":{"description":"HTTP-FLV视频流的拉流地址。接入类型(access_type)为HTTP-FLV时,才有该参数。","example":"","type":"string"}}},"StreamTag":{"properties":{"key":{"description":"标签的键。最大长度为36个UNICODE字符(一-鿿),可以包含大小写字母、数字、中划线(-)或者下划线(_),不能包含其他的特殊字符。","example":"group","type":"string"},"value":{"description":"标签的值。最大长度为43个UNICODE字符(一-鿿),可以包含大小写字母、数字、点(.)、中划线(-)或者下划线(_),不能包含其他的特殊字符,也可以为空字符串。","example":"number1","type":"string"}}}},"description":null,"group_id":"5346b7c1dc284228a28795d5bcbd550d","host":"vis.cn-north-4.myhuaweicloud.com","id":"48d3ff16c9374797b5a90e5b5d3cc9c4","info_version":"v1","method":"post","name":"CreateStream","parameters":{"Authorization":{"description":"使用AK/SK方式认证时必选,携带的鉴权信息。","in":"header","maxLength":256,"minLength":1,"name":"Authorization","required":false,"type":"string","x-example":"SDK-HMAC-SHA256 Access=xxx, SignedHeaders=content-type;host;x-sdk-date, Signature=xxx"},"X-Auth-Token":{"description":"普通租户的token。","in":"header","maxLength":10240,"minLength":1,"name":"X-Auth-Token","required":true,"type":"string"},"X-Project-Id":{"description":"使用AK/SK方式认证时必选,携带项目ID信息。","in":"header","maxLength":64,"minLength":1,"name":"X-Project-Id","required":false,"type":"string","x-example":"70b76xxxxxx34253880af501cdxxxxxx"},"X-Sdk-Date":{"description":"使用AK/SK方式认证时必选,请求的发生时间。","in":"header","maxLength":256,"minLength":1,"name":"X-Sdk-Date","required":false,"type":"string","x-example":"20191115T033655Z"},"project_id":{"description":"项目ID,获取方法请参考[获取项目ID](https://support.huaweicloud.com/api-vis/vis_03_0005.html)","in":"path","maxLength":32,"minLength":32,"name":"project_id","required":true,"type":"string"}},"paths":{"/v1/{project_id}/streams":{"post":{"consumes":[],"deprecated":false,"description":"该接口用于创建视频流。包括RTMP以及HTTP-FLV类型视频流。\n- 创建RTMP视频流时,用户可根据实际需求选择是否配置秘钥,如果配置了秘钥,则进行RTMP推流时需要提供认证Token。如果不配置该参数,则推流时不需要进行认证。\n- 创建HTTP-FLV视频流时,需要HTTP-FLV视频流的拉流地址,且地址必须是http或https协议的合法URL。\n\n自定义流名称只能使用英文字母a~z,A-Z)、数字(0~9)以及连接符(-、_),连接符(-、__)不能连续出现、不能单独注册,也不能放在开头和结尾。长度不低于 8,不超过128个字符。","operationId":"CreateStream","parameters":[{"$ref":"#/parameters/project_id"},{"$ref":"#/parameters/X-Auth-Token"},{"$ref":"#/parameters/Authorization"},{"$ref":"#/parameters/X-Sdk-Date"},{"$ref":"#/parameters/X-Project-Id"},{"description":"创建视频流请求体\"","in":"body","name":"CreateStreamRequest","required":false,"schema":{"$ref":"#/definitions/CreateStreamRequestList"}}],"produces":[],"responses":{"201":{"description":"正常","examples":{"application/json":{"access_key":"ALKJOWLKJSDNFGO******KSJDF","access_type":"RTMP","created_at":"2018-06-12T13:00:01Z","description":"","encode_type":"H264","name":"stream_test1","share_type":"PUBLIC","state":"STOPPED","stream_id":"stream-0BOPSRsT","tag":[{"key":"group","value":"number1"}],"updated_at":"2018-06-12T13:00:01Z"},"application/json-1":{"access_type":"HTTP-FLV","created_at":"2018-06-12T13:00:01Z","description":"","encode_type":"H264","name":"stream_test2","share_type":"PUBLIC","state":"STOPPED","stream_id":"stream-9IzU3TdL","tag":[{"key":"group","value":"number1"}],"updated_at":"2018-06-12T13:00:01Z","url":"https://xxxxxxxx.com/live"}},"schema":{"$ref":"#/definitions/StreamResponse"}},"400":{"description":"请求错误","examples":{"application/json":{"error_code":"VIS.0005","error_msg":"Invalid request parameter, url can not be null or empty when access type is HTTP-FLV."}}}},"summary":"创建视频流","tags":["视频流管理"],"x-apiexplorer-hide":"N","x-is-registered":"Y","x-name":"创建视频流","x-request-examples-1":{"access_key":"ALKJOWLKJSDNFGO******KSJDF","access_type":"RTMP","description":"","encode_type":"H264","name":"stream_test1","share_type":"PUBLIC","tag":[{"key":"group","value":"number1"}]},"x-request-examples-2":{"access_type":"HTTP-FLV","description":"","encode_type":"H264","name":"stream_test2","share_type":"PUBLIC","tag":[{"key":"group","value":"number1"}],"url":"https://xxxxxxxx.com/live"},"x-request-examples-description-1":"RTMP","x-request-examples-description-2":"HTTP-FLV","x-request-examples-url-1":"POST /v1/3266392d188c47d09948b1**********/streams","x-request-examples-url-2":"POST /v1/3266392d188c47d09948b1**********/streams","x-support-sdk":"Y"}}},"product_short":"VIS","region_id":"cn-north-4","schemes":["HTTPS"],"security_definitions":null,"summary":"创建视频流","tags":"视频流管理","uri":null,"version":"2.0"}