Skip to content

Commit ef049c0

Browse files
committed
Add APIv1 Bruno collection to test end-points
1 parent 42896cd commit ef049c0

67 files changed

Lines changed: 1388 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
info:
2+
name: Get DATA Day
3+
type: http
4+
seq: 6
5+
6+
http:
7+
method: GET
8+
url: http://{{yadoms_ip}}:{{yadoms_port}}/rest/acquisition/keyword/3/day
9+
headers:
10+
- name: Content-Type
11+
value: application/json
12+
auth: inherit
13+
14+
settings:
15+
encodeUrl: true
16+
timeout: 0
17+
followRedirects: true
18+
maxRedirects: 5
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
info:
2+
name: Get DATA Hour
3+
type: http
4+
seq: 7
5+
6+
http:
7+
method: GET
8+
url: http://{{yadoms_ip}}:{{yadoms_port}}/rest/acquisition/keyword/3/hour
9+
headers:
10+
- name: Content-Type
11+
value: application/json
12+
auth: inherit
13+
14+
settings:
15+
encodeUrl: true
16+
timeout: 0
17+
followRedirects: true
18+
maxRedirects: 5
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
info:
2+
name: Get DATA [From; ...]
3+
type: http
4+
seq: 2
5+
6+
http:
7+
method: GET
8+
url: http://{{yadoms_ip}}:{{yadoms_port}}/rest/acquisition/keyword/1/20140604T103000
9+
headers:
10+
- name: Content-Type
11+
value: application/json
12+
auth: inherit
13+
14+
settings:
15+
encodeUrl: true
16+
timeout: 0
17+
followRedirects: true
18+
maxRedirects: 5
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
info:
2+
name: Get DATA [From; To]
3+
type: http
4+
seq: 4
5+
6+
http:
7+
method: GET
8+
url: http://{{yadoms_ip}}:{{yadoms_port}}/rest/acquisition/keyword/1/20140604T100000/20140604T10300
9+
headers:
10+
- name: Content-Type
11+
value: application/json
12+
auth: inherit
13+
14+
settings:
15+
encodeUrl: true
16+
timeout: 0
17+
followRedirects: true
18+
maxRedirects: 5
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
info:
2+
name: Get DATA
3+
type: http
4+
seq: 1
5+
6+
http:
7+
method: GET
8+
url: http://{{yadoms_ip}}:{{yadoms_port}}/rest/acquisition/keyword/1
9+
headers:
10+
- name: Content-Type
11+
value: application/json
12+
auth: inherit
13+
14+
settings:
15+
encodeUrl: true
16+
timeout: 0
17+
followRedirects: true
18+
maxRedirects: 5
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
info:
2+
name: Get Last DATA
3+
type: http
4+
seq: 3
5+
6+
http:
7+
method: GET
8+
url: http://{{yadoms_ip}}:{{yadoms_port}}/rest/acquisition/keyword/1/Lastdata
9+
headers:
10+
- name: Content-Type
11+
value: application/json
12+
auth: inherit
13+
14+
settings:
15+
encodeUrl: true
16+
timeout: 0
17+
followRedirects: true
18+
maxRedirects: 5
19+
20+
examples:
21+
- name: Get Last DATA
22+
request:
23+
url: http://{{yadoms_ip}}:{{yadoms_port}}/rest/acquisition/keyword/1/Lastdata
24+
method: GET
25+
headers:
26+
- name: Content-Type
27+
value: application/json
28+
response:
29+
status: 200
30+
statusText: OK
31+
headers:
32+
- name: Date
33+
value: Tue, 16 Nov 2021 09:44:07 GMT
34+
- name: Server
35+
value: 2.5.1-beta.1
36+
- name: Content-Type
37+
value: application/json; charset=utf-8
38+
body:
39+
type: json
40+
data: |-
41+
{
42+
"result": true,
43+
"message": "",
44+
"data": {
45+
"lastValue": "0"
46+
}
47+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
info:
2+
name: Get acquisition by id
3+
type: http
4+
seq: 5
5+
6+
http:
7+
method: GET
8+
url: http://{{yadoms_ip}}:{{yadoms_port}}/rest/acquisition/8
9+
headers:
10+
- name: Content-Type
11+
value: application/json
12+
auth: inherit
13+
14+
settings:
15+
encodeUrl: true
16+
timeout: 0
17+
followRedirects: true
18+
maxRedirects: 5
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
info:
2+
name: Acquisition
3+
type: folder
4+
seq: 1
5+
6+
request:
7+
auth: inherit
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
info:
2+
name: Code d'une règle
3+
type: http
4+
seq: 5
5+
6+
http:
7+
method: GET
8+
url: http://{{yadoms_ip}}:{{yadoms_port}}/rest/automation/rule/1/code
9+
headers:
10+
- name: Content-Type
11+
value: application/json
12+
auth: inherit
13+
14+
settings:
15+
encodeUrl: true
16+
timeout: 0
17+
followRedirects: true
18+
maxRedirects: 5
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
info:
2+
name: Création règle locale Python
3+
type: http
4+
seq: 3
5+
6+
http:
7+
method: POST
8+
url: http://{{yadoms_ip}}:{{yadoms_port}}/rest/automation/rule
9+
headers:
10+
- name: Content-Type
11+
value: application/json
12+
body:
13+
type: json
14+
data: |-
15+
{
16+
"name" : "test",
17+
"description" : "test te dis-je !",
18+
"interpreter" : "Python",
19+
"code" : "import%20time%0Aimport%20yScriptApiWrapper%0A%0Adef%20yMain(yApi)%3A%0A%20%20%20print%20%22%3C%3C%3C%20DEBUT%20%3E%3E%3E%22%0A%20%20%20temperature%20%3D%20float(yApi.readKeyword(9))%0A%20%20%20print%20%22Temperature%20actuelle%20%3A%20%22%2C%20temperature%0A%20%20%20if%20temperature%20%3E%3D%2035%3A%0A%20%20%20%20%20%20print%20%22Fait%20une%20chaleur%20la-dedans%20!%20!%20!%20STOP%20CHAUFFAGE%20!%20!%20!%22%0A%20%20%20%20%20%20yApi.writeKeyword(18%2C%20%220%22)%0A%20%20%20else%3A%0A%20%20%20%20%20%20print%20%22Brrr...%20DEMARRAGE%20CHAUFFAGE%22%0A%20%20%20%20%20%20yApi.writeKeyword(18%2C%20%221%22)%0A%20%20%20print%20%22%23%23%23%20FIN%20%23%23%23%22%0A%20%20%20time.sleep(10)%0A%20%20%20",
20+
"enabled" : "true"
21+
}
22+
auth: inherit
23+
24+
settings:
25+
encodeUrl: true
26+
timeout: 0
27+
followRedirects: true
28+
maxRedirects: 5

0 commit comments

Comments
 (0)