...
| Code Block | ||||||||
|---|---|---|---|---|---|---|---|---|
| ||||||||
{
"http_code": 200,
"data": {
"uid": "2567",
"oid": "67",
"wid": "3114",
"enable": "1",
"org_reg": "0",
"uName": "lileilei_3",
"user_conf": {...},
"role": [...],
"workgroup": [...],
"systemMediaApprove": "0"
},
"status": [
10405001
]
} |
参数说明
很多API方法使用可选参数,如`GET`请求中会存在`资源名称`和`查询参数`:
| Code Block | ||||
|---|---|---|---|---|
| ||||
{host}/Rest/Medias?offset=0&limit=10&search=&sort=last_amendment_time&sortType=desc |
在上述例子中,‘Rest’、‘Medias’代表了资源名称,`offset`、`limit`、`search`、`sort`、`sortType`代表了查询参数。
在`POST`、`PUT`请求中,无法包含在url中的参数需要格式化为JSON 并使用 Content-Type : 'application/json'方式请求接口
服务地址
Vnnox REST API均使用`host` + `resource` + `parameters` 的请求方式与服务器交互,`host`指服务器地址:https://cn.vnnox.com/,`resource`指资源及资源路径,一般为`Rest/{资源名}/`, `parameters`为资源标识或者查询参数:
| Code Block | ||||
|---|---|---|---|---|
| ||||
GET {host}/Rest/Medias?offset=0&limit=10&search=&sort=last_amendment_time&sortType=desc
GET {host}/Rest/Medias/{media_id}
PUT {host}/Rest/Player/{player_id}
DELETE {host}/Rest/User/{user_id}
POST {host}/Rest/Worker |
如上面的例子,本文档所有涉及{host}均指https://cn.vnnox.com/,建议第三方开发者将{host}信息作为可配置项