ThingsKit物联网平台API文档-视频中心(视频配置)

视频配置新增和编辑

接口地址:/api/yt/video

请求方式:POST

请求数据类型:application/x-www-form-urlencoded,application/json

响应数据类型:*/*

请求示例:

{
  "accessMode": 0,
  "id": "",
  "name": "",
  "organizationId": ""
  "videoPlatformDTO": {
    "appKey": "",
    "appSecret": "",
    "ssl": 0,
    "type": 0,
  },
  "videoPlatformId": "",
  "videoUrl": ""
}

请求参数:

参数名称参数说明请求类型是否必须数据类型
tkVideoDTOTkVideoDTObodytrueTkVideoDTO
accessMode流获取方式:0 手动填写 1平台获取trueinteger(int32)
additionalJson摄像头附加信息,json格式falsestring
avatar封面图falsestring
brand摄像头厂家falsestring
createTime创建时间falsestring(date-time)
creator创建用户falsestring
defaultConfig租户默认配置falsestring
description摄像头描述falsestring
deviceType摄像头型号falsestring
enabled租户状态:启用/禁用falseboolean
icon租户图标falsestring
idIDfalsestring
name租户名称falsestring
organizationId组织IDtruestring
organizationName组织名称falsestring
playProtocol播放协议:0 http 1 httpsfalseinteger(int32)
roleIds租户角色列表falsearray
sn摄像头编号/监控点位编号truestring
status摄像头状态falseboolean
streamType码流:0主码流 1子码流 2第三码流falseinteger(int32)
tenantExpireTime租户到期时间falsestring(date-time)
tenantId租户IDfalsestring
tenantProfileId租户配置falsestring
tenantStatus可用值:DISABLED,EXPIRED,NORMALfalsestring
updateTime更新时间falsestring(date-time)
updater更新用户falsestring
videoPlatformDTO流媒体平台基础信息falseTkVideoPlatformDTO
appKey秘钥appKeytruestring
appSecret秘钥appSecrettruestring
createTime创建时间falsestring
creator创建用户falsestring
defaultConfig租户默认配置falsestring
description租户描述falsestring
enabled租户状态:启用/禁用falseboolean
host平台地址+端口truestring
icon租户图标falsestring
idIDfalsestring
name租户名称falsestring
roleIds租户角色列表falsearray
ssl流媒体部署环境trueinteger
tenantExpireTime租户到期时间falsestring
tenantId租户IDfalsestring
tenantProfileId租户配置falsestring
tenantStatus可用值:DISABLED,EXPIRED,NORMALfalsestring
type平台类型trueinteger
updateTime更新时间falsestring
updater更新用户falsestring
videoPlatformId平台IDfalsestring
videoUrl视频URLfalsestring

响应参数:

参数名称参数说明类型
accessMode流获取方式:0 手动填写 1平台获取integer(int32)
additionalJson摄像头附加信息,json格式string
avatar封面图string
brand摄像头厂家string
createTime创建时间string(date-time)
creator创建用户string
defaultConfig租户默认配置string
description摄像头描述string
deviceType摄像头型号string
enabled租户状态:启用/禁用boolean
icon租户图标string
idIDstring
name租户名称string
organizationId组织IDstring
organizationName组织名称string
playProtocol播放协议:0 http 1 httpsinteger(int32)
roleIds租户角色列表array
sn摄像头编号/监控点位编号string
status摄像头状态boolean
streamType码流:0主码流 1子码流 2第三码流integer(int32)
tenantExpireTime租户到期时间string(date-time)
tenantId租户IDstring
tenantProfileId租户配置string
tenantStatus可用值:DISABLED,EXPIRED,NORMALstring
updateTime更新时间string(date-time)
updater更新用户string
videoPlatformDTO流媒体平台基础信息TkVideoPlatformDTO
appKey秘钥appKeystring
appSecret秘钥appSecretstring
createTime创建时间string(date-time)
creator创建用户string
defaultConfig租户默认配置string
description租户描述string
enabled租户状态:启用/禁用boolean
host平台地址+端口string
icon租户图标string
idIDstring
name租户名称string
roleIds租户角色列表array
ssl流媒体部署环境integer(int32)
tenantExpireTime租户到期时间string(date-time)
tenantId租户IDstring
tenantProfileId租户配置string
tenantStatus可用值:DISABLED,EXPIRED,NORMALstring
type平台类型integer(int32)
updateTime更新时间string(date-time)
updater更新用户string
videoPlatformId平台IDstring
videoUrl视频URLstring

响应示例:

{
	"accessMode": 0,
	"additionalJson": "",
	"avatar": "",
	"brand": "",
	"createTime": "",
	"creator": "",
	"defaultConfig": "",
	"description": "",
	"deviceType": "",
	"enabled": false,
	"icon": "",
	"id": "",
	"name": "",
	"organizationId": "",
	"organizationName": "",
	"playProtocol": 0,
	"roleIds": [],
	"sn": "",
	"status": false,
	"streamType": 0,
	"tenantExpireTime": "",
	"tenantId": "",
	"tenantProfileId": "",
	"tenantStatus": "",
	"updateTime": "",
	"updater": "",
	"videoPlatformDTO": {
		"appKey": "",
		"appSecret": "",
		"createTime": "",
		"creator": "",
		"defaultConfig": "",
		"description": "",
		"enabled": false,
		"host": "",
		"icon": "",
		"id": "",
		"name": "",
		"roleIds": [],
		"ssl": 0,
		"tenantExpireTime": "",
		"tenantId": "",
		"tenantProfileId": "",
		"tenantStatus": "",
		"type": 0,
		"updateTime": "",
		"updater": ""
	},
	"videoPlatformId": "",
	"videoUrl": ""
}

删除视频配置

接口地址:/api/yt/video

请求方式:DELETE

请求数据类型:application/x-www-form-urlencoded,application/json

响应数据类型:*/*

请求示例:

{
  "ids": [],
  "tenantId": ""
}

请求参数:

参数名称参数说明请求类型是否必须数据类型
deleteDTODeleteDTObodytrueDeleteDTO
ids删除ID列表truearray
tenantId租户IDfalsestring

响应参数:

参数名称参数说明类型
errorCode错误码object
message错误提示string
status页面响应状态integer(int32)
timestamp时间戳string(date-time)

获取平台视频流播放地址(GBT28181点播)

接口地址:/api/yt/video/control/start/{deviceId}/{channelId}

请求方式:GET

请求数据类型:application/x-www-form-urlencoded

响应数据类型:*/*

请求参数:

参数名称参数说明请求类型是否必须数据类型
deviceId设备id(视频列表中返回对象中param中的deviceId)pathtruestring
channelId摄像头编号/监控点编号pathtruestring

响应参数:

参数名称参数说明类型
code返回码integer(int32)
data各类播放地址object
message消息提示string

响应示例:

{
    "code": 200,
    "message": "OK",
    "data": {
        "app": "rtp",
        "stream": "34020000001310000002_34020000001310000003",
        "ip": null,
        "flv": "http://127.0.0.1:30500/rtp/34020000001310000002_34020000001310000003.live.flv",
        "https_flv": "https://127.0.0.1:443/rtp/34020000001310000002_34020000001310000003.live.flv",
        "ws_flv": "ws://127.0.0.1:30500/rtp/34020000001310000002_34020000001310000003.live.flv",
        "wss_flv": "wss://127.0.0.1:443/rtp/34020000001310000002_34020000001310000003.live.flv",
        "fmp4": "http://127.0.0.1:30500/rtp/34020000001310000002_34020000001310000003.live.mp4",
        "https_fmp4": "https://127.0.0.1:443/rtp/34020000001310000002_34020000001310000003.live.mp4",
        "ws_fmp4": "ws://127.0.0.1:30500/rtp/34020000001310000002_34020000001310000003.live.mp4",
        "wss_fmp4": "wss://127.0.0.1:443/rtp/34020000001310000002_34020000001310000003.live.mp4",
        "hls": "http://127.0.0.1:30500/rtp/34020000001310000002_34020000001310000003/hls.m3u8",
        "https_hls": "https://127.0.0.1:443/rtp/34020000001310000002_34020000001310000003/hls.m3u8",
        "ws_hls": "ws://127.0.0.1:30500/rtp/34020000001310000002_34020000001310000003/hls.m3u8",
        "wss_hls": "wss://127.0.0.1:443/rtp/34020000001310000002_34020000001310000003/hls.m3u8",
        "ts": "http://127.0.0.1:30500/rtp/34020000001310000002_34020000001310000003.live.ts",
        "https_ts": "https://127.0.0.1:443/rtp/34020000001310000002_34020000001310000003.live.ts",
        "ws_ts": "ws://127.0.0.1:30500/rtp/34020000001310000002_34020000001310000003.live.ts",
        "wss_ts": null,
        "rtmp": "rtmp://127.0.0.1:1935/rtp/34020000001310000002_34020000001310000003",
        "rtmps": "rtmps://127.0.0.1:19350/rtp/34020000001310000002_34020000001310000003",
        "rtsp": "rtsp://127.0.0.1:554/rtp/34020000001310000002_34020000001310000003",
        "rtsps": "rtsps://127.0.0.1:332/rtp/34020000001310000002_34020000001310000003",
        "rtc": "http://127.0.0.1:30500/index/api/webrtc?app=rtp&stream=34020000001310000002_34020000001310000003&type=play",
        "rtcs": "https://127.0.0.1:443/index/api/webrtc?app=rtp&stream=34020000001310000002_34020000001310000003&type=play",
        "mediaServerId": "f6GfbO0BGEaROKLP",
        "tracks": [
            {
                "channels": 1,
                "codecId": 0,
                "codecIdName": null,
                "codecType": 0,
                "ready": true,
                "sampleBit": 0,
                "sampleRate": 0,
                "fps": 0,
                "height": 0,
                "width": 0
            },
            {
                "channels": 0,
                "codecId": 0,
                "codecIdName": null,
                "codecType": 0,
                "ready": true,
                "sampleBit": 0,
                "sampleRate": 0,
                "fps": 25,
                "height": 1080,
                "width": 1920
            }
        ],
        "startTime": null,
        "endTime": null,
        "progress": 0
    }
}

获取平台视频流播放地址(流媒体获取)

接口地址:/api/yt/video/url/{entityId}

请求方式:GET

请求数据类型:application/x-www-form-urlencoded

响应数据类型:*/*

请求参数:

参数名称参数说明请求类型是否必须数据类型
entityId视频列表主键IDpathtruestring

响应参数:

参数名称参数说明类型
code返回码integer(int32)
data返回数据object
url播放地址string
message消息提示string

响应示例:

{
    "code": 200,
    "message": "OK",
    "data": {
        "url": "https://rtmp01open.ys7.com:9188/v3/openlive/E53165567_1_1.flv?expire=1716436372&id=713358718642319360&t=dcac64135ed3cfaba04b3f1e003abf813b0d0b29f26d001cb872953e4fac899a&ev=100"
    }
}

视频配置(视频列表)分页

接口地址:/api/yt/video

请求方式:GET

请求数据类型:application/x-www-form-urlencoded

响应数据类型:*/*

请求参数:

参数名称参数说明是否必须数据类型
pagepagetrueint
pageSizepageSizetrueint
statusstatusfalseboolean
namenamefalsestring
organizationIdorganizationIdfalsestring
orderFiledorderFiledfalsestring
orderTypeorderType,可用值:ASC,DESCfalsestring

响应参数:

参数名称参数说明类型
itemsarray
accessMode流获取方式:0 手动填写 1平台获取integer(int32)
additionalJson摄像头附加信息,json格式string
avatar封面图string
brand摄像头厂家string
createTime创建时间string(date-time)
creator创建用户string
defaultConfig租户默认配置string
description摄像头描述string
deviceType摄像头型号string
enabled租户状态:启用/禁用boolean
icon租户图标string
idIDstring
name租户名称string
organizationId组织IDstring
organizationName组织名称string
playProtocol播放协议:0 http 1 httpsinteger(int32)
roleIds租户角色列表array
sn摄像头编号/监控点位编号string
status摄像头状态boolean
streamType码流:0主码流 1子码流 2第三码流integer(int32)
tenantExpireTime租户到期时间string(date-time)
tenantId租户IDstring
tenantProfileId租户配置string
tenantStatus可用值:DISABLED,EXPIRED,NORMALstring
updateTime更新时间string(date-time)
updater更新用户string
videoPlatformDTO流媒体平台基础信息TkVideoPlatformDTO
appKey秘钥appKeystring
appSecret秘钥appSecretstring
createTime创建时间string
creator创建用户string
defaultConfig租户默认配置string
description租户描述string
enabled租户状态:启用/禁用boolean
host平台地址+端口string
icon租户图标string
idIDstring
name租户名称string
roleIds租户角色列表array
ssl流媒体部署环境integer
tenantExpireTime租户到期时间string
tenantId租户IDstring
tenantProfileId租户配置string
tenantStatus可用值:DISABLED,EXPIRED,NORMALstring
type平台类型integer
updateTime更新时间string
updater更新用户string
videoPlatformId平台IDstring
videoUrl视频URLstring
totalinteger(int32)

响应示例:

{
	"items": [
		{
			"accessMode": 0,
			"additionalJson": "",
			"avatar": "",
			"brand": "",
			"createTime": "",
			"creator": "",
			"defaultConfig": "",
			"description": "",
			"deviceType": "",
			"enabled": false,
			"icon": "",
			"id": "",
			"name": "",
			"organizationId": "",
			"organizationName": "",
			"playProtocol": 0,
			"roleIds": [],
			"sn": "",
			"status": false,
			"streamType": 0,
			"tenantExpireTime": "",
			"tenantId": "",
			"tenantProfileId": "",
			"tenantStatus": "",
			"updateTime": "",
			"updater": "",
			"videoPlatformDTO": {
				"appKey": "",
				"appSecret": "",
				"createTime": "",
				"creator": "",
				"defaultConfig": "",
				"description": "",
				"enabled": false,
				"host": "",
				"icon": "",
				"id": "",
				"name": "",
				"roleIds": [],
				"ssl": 0,
				"tenantExpireTime": "",
				"tenantId": "",
				"tenantProfileId": "",
				"tenantStatus": "",
				"type": 0,
				"updateTime": "",
				"updater": ""
			},
			"videoPlatformId": "",
			"videoUrl": ""
		}
	],
	"total": 0
}

获取当前用户的流媒体配置列表

接口地址:/api/yt/video/platform

请求方式:GET

请求数据类型:application/x-www-form-urlencoded

响应数据类型:*/*

请求参数:

暂无

响应参数:

参数名称参数说明类型
appKey秘钥appKeystring
appSecret秘钥appSecretstring
createTime创建时间string(date-time)
creator创建用户string
defaultConfig租户默认配置string
description租户描述string
enabled租户状态:启用/禁用boolean
host平台地址+端口string
icon租户图标string
idIDstring
name租户名称string
roleIds租户角色列表array
ssl流媒体部署环境integer(int32)
tenantExpireTime租户到期时间string(date-time)
tenantId租户IDstring
tenantProfileId租户配置string
tenantStatus可用值:DISABLED,EXPIRED,NORMALstring
type平台类型integer(int32)
updateTime更新时间string(date-time)
updater更新用户string

响应示例:

[
	{
		"appKey": "",
		"appSecret": "",
		"createTime": "",
		"creator": "",
		"defaultConfig": "",
		"description": "",
		"enabled": false,
		"host": "",
		"icon": "",
		"id": "",
		"name": "",
		"roleIds": [],
		"ssl": 0,
		"tenantExpireTime": "",
		"tenantId": "",
		"tenantProfileId": "",
		"tenantStatus": "",
		"type": 0,
		"updateTime": "",
		"updater": ""
	}
]