ZukVnc (1.2)

Download OpenAPI specification:Download

ZukRec的RESTFul接口文档

task

进行中任务相关接口

创建新任务

Request Body schema: application/json
url
required
string

页面链接,任务对应的页面url

callback
string

回调地址

region
string

任务运行的区域,当前仅支持us-east-1和cn-north-1

Responses

202

服务器已收到创建请求

401

用户未登录

post /tasks
https://rec.zukdoor.cloud/api/v1/tasks

Request samples

Content type
application/json
Copy
Expand all Collapse all
{}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "display": 0,
  • "userId": "string",
  • "url": "string",
  • "callback": "string",
  • "createdTime": 0
}

列出所有任务

query Parameters
pageSize
number

每一页展示的任务数量,默认为20

pageNum
number

页数,从0开始,默认为0

userId
string
stopped
boolean
startedTime
number
stoppedTime
number

Responses

200

操作成功

401

用户未登录

403

用户无权限

get /tasks
https://rec.zukdoor.cloud/api/v1/tasks

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data":
    [
    ],
  • "totalCount": 0
}

修改任务参数

path Parameters
display
required
string
Request Body schema: application/json
audioOffsetMillisecond
number

音频偏移时间

autoOffset
boolean

是否自动调整音频偏移

rp
number

调整屏幕分辨率

Responses

200

操作成功

401

用户未登录

403

用户无权限

404

任务不存在

patch /tasks/{display}
https://rec.zukdoor.cloud/api/v1/tasks/{display}

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "audioOffsetMillisecond": 0,
  • "autoOffset": true,
  • "rp": 0
}

停止任务

path Parameters
display
required
string

Responses

204

成功停止

401

用户未登录

403

用户无权限

404

任务不存在

delete /tasks/{display}
https://rec.zukdoor.cloud/api/v1/tasks/{display}

开始录制

path Parameters
display
required
string
Request Body schema: application/json
recordName
required
string

录像名称,同一任务中的录像名称不能重复

format
string

录像格式,默认为mkv

onlyAudio
boolean

是否只录制音频,默认为否

Responses

202

收到开始录制请求

401

用户未登录

403

用户无权限

404

任务不存在

409

该任务正在录制中或录像名重复

post /tasks/{display}/records
https://rec.zukdoor.cloud/api/v1/tasks/{display}/records

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "recordName": "string",
  • "format": "string",
  • "onlyAudio": true
}

停止录制

path Parameters
display
required
string

Responses

204

成功停止

401

用户未登录

403

用户无权限

404

任务不存在

delete /tasks/{display}/records
https://rec.zukdoor.cloud/api/v1/tasks/{display}/records

开始推流

path Parameters
display
required
string
Request Body schema: application/json
rtmpUrl
required
string

推流地址

Responses

202

收到开始推流请求

401

用户未登录

403

用户无权限

404

任务不存在

409

推流地址重复

post /tasks/{display}/rtmps
https://rec.zukdoor.cloud/api/v1/tasks/{display}/rtmps

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "rtmpUrl": "string"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "rtmpId": 0
}

停止推流

path Parameters
display
required
string
rtmpId
required
integer

Responses

204

停止推流成功

401

用户未登录

403

用户无权限

404

任务不存在

delete /tasks/{display}/rtmps/{rtmpId}
https://rec.zukdoor.cloud/api/v1/tasks/{display}/rtmps/{rtmpId}

模拟鼠标点击

path Parameters
display
required
string
Request Body schema: application/json
x
required
number

横坐标

y
required
number

纵坐标

Responses

201

模拟点击成功

401

用户未登录

403

用户无权限

404

任务不存在

post /tasks/{display}/clicks
https://rec.zukdoor.cloud/api/v1/tasks/{display}/clicks

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "x": 0,
  • "y": 0
}

stopped-task

已停止任务相关接口

获取已结束任务信息

query Parameters
pageSize
number

每一页的任务数量

pageNum
number

第几页,从0开始计数

Responses

200

任务信息

get /stopped-tasks
https://rec.zukdoor.cloud/api/v1/stopped-tasks

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • null
]

生成录像地址

path Parameters
display
required
string
recordName
required
string
Request Body schema: application/json
expireTime
required
number

有效期时间,单位为秒

Responses

201

录像url

401

用户未登录

403

用户无权限

404

任务不存在

post /stopped-tasks/{display}/records/{recordName}/urls
https://rec.zukdoor.cloud/api/v1/stopped-tasks/{display}/records/{recordName}/urls

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "expireTime": 0
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "url": "string"
}

instance

实例相关接口

获取所有运行中实例

Responses

200

所有实例

401

用户未登录

403

用户无权限

get /instances
https://rec.zukdoor.cloud/api/v1/instances

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "region": "string",
  • "instance":
    {
    }
}

user

用户相关接口

获取用户统计信息

path Parameters
userId
required
string
query Parameters
start
number

起始时间,代码为毫秒

end
number

结束时间,代码为毫秒

Responses

200

操作成功

401

用户未登录

403

用户无权限

get /users/{userId}/statistics
https://rec.zukdoor.cloud/api/v1/users/{userId}/statistics

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data":
    [
    ],
  • "totalCount": 0
}