提交 77f516c2 authored 作者: blu's avatar blu

upload video files

上级 c8b301f8
...@@ -7,37 +7,34 @@ query configuration for edge device with specified sn ...@@ -7,37 +7,34 @@ query configuration for edge device with specified sn
- sn: string. device serial - sn: string. device serial
##### return ##### return
- type: json - type: json
- field "code": 0 - success; - field "code": 0 - success; otherwise failed.
otherwise failed.
- field "msg": string, readable string for "code" - field "msg": string, readable string for "code"
- field "data": configuration for sn. - field "data": configuration for sn.
- example - example
``` ```
{ {
"code": 0, "code": 0,
"data": { "data": {
"NMXH73Y2": { "NMXH73Y2": {
"addr": "127.0.0.1" "addr": "127.0.0.1",
, "api-cloud": "http://127.0.0.1:8089",
"api-cloud": "http://127.0.0.1:8089" "ipcs": [
, {
"ipcs": "addr": "172.31.0.51",
[ { "modules": {
"addr": "172.31.0.51", "evml": [
"modules": {
"evml": [
{ {
"area": 300, "area": 300,
"enabled": 1, "enabled": 1,
"iid": 1, "iid": 1,
"post": 30, "post": 30,
"pre": 3, "pre": 3,
"sn": "NMXH73Y2", "sn": "NMXH73Y2",
"thresh": 80, "thresh": 80,
"type": "motion" "type": "motion"
} }
], ],
"evpuller": [ "evpuller": [
{ {
"addr": "127.0.0.1", "addr": "127.0.0.1",
"enabled": 1, "enabled": 1,
...@@ -46,7 +43,7 @@ otherwise failed. ...@@ -46,7 +43,7 @@ otherwise failed.
"sn": "NMXH73Y2" "sn": "NMXH73Y2"
} }
], ],
"evpusher": [ "evpusher": [
{ {
"enabled": 1, "enabled": 1,
"iid": 1, "iid": 1,
...@@ -57,7 +54,7 @@ otherwise failed. ...@@ -57,7 +54,7 @@ otherwise failed.
"user": "" "user": ""
} }
], ],
"evslicer": [ "evslicer": [
{ {
"enabled": 1, "enabled": 1,
"iid": 1, "iid": 1,
...@@ -66,23 +63,21 @@ otherwise failed. ...@@ -66,23 +63,21 @@ otherwise failed.
} }
] ]
}, },
"password": "FWBWTU", "password": "FWBWTU",
"port": 554, "port": 554,
"proto": "rtsp", "proto": "rtsp",
"user": "admin" "user": "admin"
} }
], ],
"mqtt-cloud": "<cloud_addr>" "mqtt-cloud": "<cloud_addr>",
,
"port-cloud": 5556, "port-cloud": 5556,
"port-router": 5550, "port-router": 5550,
"proto": "zmq" "proto": "zmq",
, "sn": "NMXH73Y2"
"sn": "NMXH73Y2"
} }
}, },
"msg": "ok" "msg": "ok"
} }
``` ```
...@@ -94,33 +89,31 @@ set or change configuration for edge device ...@@ -94,33 +89,31 @@ set or change configuration for edge device
- sn: string, only used when patch is set as true - sn: string, only used when patch is set as true
##### body ##### body
- type: json - type: json
- example - example
1. full configure 1. full configure
``` ```
{ {
"data": { "data":{
"NMXH73Y2": { "NMXH73Y2":{
"addr":"127.0.0.1" "addr":"127.0.0.1",
, "api-cloud":"http://127.0.0.1:8089",
"api-cloud":"http://127.0.0.1:8089" "ipcs":[
, {
"ipcs": "addr":"172.31.0.51",
[ { "modules":{
"addr":"172.31.0.51", "evml":[
"modules":{
"evml":[
{ {
"area":300, "area":300,
"enabled":1, "enabled":1,
"iid":1, "iid":1,
"post":30, "post":30,
"pre":3, "pre":3,
"sn":"NMXH73Y2", "sn":"NMXH73Y2",
"thresh":80, "thresh":80,
"type":"motion" "type":"motion"
} }
], ],
"evpuller":[ "evpuller":[
{ {
"addr":"127.0.0.1", "addr":"127.0.0.1",
"iid":1, "iid":1,
...@@ -129,7 +122,7 @@ set or change configuration for edge device ...@@ -129,7 +122,7 @@ set or change configuration for edge device
"sn":"NMXH73Y2" "sn":"NMXH73Y2"
} }
], ],
"evpusher":[ "evpusher":[
{ {
"enabled":1, "enabled":1,
"iid":1, "iid":1,
...@@ -140,7 +133,7 @@ set or change configuration for edge device ...@@ -140,7 +133,7 @@ set or change configuration for edge device
"user":"" "user":""
} }
], ],
"evslicer":[ "evslicer":[
{ {
"enabled":1, "enabled":1,
"iid":1, "iid":1,
...@@ -149,19 +142,17 @@ set or change configuration for edge device ...@@ -149,19 +142,17 @@ set or change configuration for edge device
} }
] ]
}, },
"password":"FWBWTU", "password":"FWBWTU",
"port":554, "port":554,
"proto":"rtsp", "proto":"rtsp",
"user":"admin" "user":"admin"
} }
], ],
"mqtt-cloud":"<cloud_addr>" "mqtt-cloud":"<cloud_addr>",
,
"port-cloud":5556, "port-cloud":5556,
"port-router":5550, "port-router":5550,
"proto":"zmq" "proto":"zmq",
, "sn":"NMXH73Y2"
"sn":"NMXH73Y2"
} }
}, },
"lastupdated":1567669674 "lastupdated":1567669674
...@@ -169,16 +160,13 @@ set or change configuration for edge device ...@@ -169,16 +160,13 @@ set or change configuration for edge device
``` ```
2. patch configure (POST /config?patch=true&sn=NMXH73Y2) 2. patch configure (POST /config?patch=true&sn=NMXH73Y2)
``` ```
[ {"op":"add","path":"/ipcs/0/modules/evpuller/0/enabled","value":1}] [{"op":"add","path":"/ipcs/0/modules/evpuller/0/enabled","value":1}]
``` ```
##### return ##### return
- type: json - type: json
- example: - example:
``` ```
{"code": 0, "msg":"ok" {"code": 0, "msg":"ok", "data":JSON}
, "data":
JSON
}
``` ```
#### GET /keys #### GET /keys
...@@ -187,43 +175,38 @@ query all keys in cloud db ...@@ -187,43 +175,38 @@ query all keys in cloud db
##### params ##### params
- none - none
##### return ##### return
- type: json array - type: json array
- example - example
``` ```
[ [
"NMXH73Y2", "NMXH73Y2",
"NMXH73Y2_bak", "NMXH73Y2_bak",
"SN", "SN",
"configmap", "configmap",
"configmap_bak" "configmap_bak"
] ]
``` ```
#### GET /value #### GET /value
##### description ##### description
get value for specified key in cloud db. keys list is queried by /keys api get value for specified key in cloud db. keys list is queried by /keys api
##### params ##### params
- key: string - key: string
##### return ##### return
- type: json - type: json
- example - example
``` ```
# GET /value?key=configmap # GET /value?key=configmap
{ {
"NMXH73Y2": "NMXH73Y2" "NMXH73Y2": "NMXH73Y2",
, "code": 0,
"code": 0, "mod2mgr": {
"mod2mgr": { "NMXH73Y2:evml:motion": "NMXH73Y2",
"NMXH73Y2:evml:motion": "NMXH73Y2" "NMXH73Y2:evpuller": "NMXH73Y2",
, "NMXH73Y2:evpusher": "NMXH73Y2",
"NMXH73Y2:evpuller": "NMXH73Y2" "NMXH73Y2:evslicer": "NMXH73Y2"
, },
"NMXH73Y2:evpusher": "NMXH73Y2" "sn2mods": {
, "NMXH73Y2": [
"NMXH73Y2:evslicer": "NMXH73Y2"
},
"sn2mods": {
"NMXH73Y2":
[
"NMXH73Y2:evml:motion", "NMXH73Y2:evml:motion",
"NMXH73Y2:evpuller", "NMXH73Y2:evpuller",
"NMXH73Y2:evpusher", "NMXH73Y2:evpusher",
...@@ -238,12 +221,10 @@ query all keys in cloud db ...@@ -238,12 +221,10 @@ query all keys in cloud db
##### params ##### params
- sn: string - sn: string
##### return ##### return
- type: json - type: json
- example - example
``` ```
{"code": 0, "msg":"ok" {"code": 0, "msg":"ok", ...}
, ...
}
``` ```
#### GET /sysinfo #### GET /sysinfo
...@@ -255,18 +236,15 @@ query all keys in cloud db ...@@ -255,18 +236,15 @@ query all keys in cloud db
*[NOT IMPLEMENTED]* turn on/off debug tunnel *[NOT IMPLEMENTED]* turn on/off debug tunnel
##### params ##### params
- sn: string - sn: string
- op: on|off - op: on|off
- ip: string. ip of public accessable host - ip: string. ip of public accessable host
- port(optional): number. ssh port of the public accessable host. default 22. - port(optional): number. ssh port of the public accessable host. default 22.
- port_tun(optional): number. tunnuel port of the public accessable host. default 11222. - port_tun(optional): number. tunnuel port of the public accessable host. default 11222.
- user: ssh user of the public accessable host - user: ssh user of the public accessable host
- password: ssh password of the public accessable host - password: ssh password of the public accessable host
##### return ##### return
- type: json - type: json
- example - example
``` ```
{"code":0, "msg":"ok" {"code":0, "msg":"ok"}
}
``` ```
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论