Skip to content
This repository was archived by the owner on Jun 3, 2021. It is now read-only.

Commit 72c8f0c

Browse files
committed
Progress: #13
1 parent e7f25c6 commit 72c8f0c

File tree

1 file changed

+13
-0
lines changed
  • docs/samples/curl

1 file changed

+13
-0
lines changed

docs/samples/curl/curl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
TANGO_REST_URL=http://ec2-35-156-104-8.eu-central-1.compute.amazonaws.com:8080/tango/rest/rc4/subscriptions
2+
3+
#subscriptions POST requires at least empty array as payload
4+
curl -X POST -H "Content-Type: application/json" -d '[]' -u "tango-cs:tango" $TANGO_REST_URL
5+
6+
#id must be extracted from response
7+
$ID=1
8+
9+
#subscription PUT requires an array of events
10+
curl -X PUT -H "Content-Type: application/json" -d '[{"host":"ip-172-31-30-179:10000","device":"sys/tg_test/1","attribute":"double_scalar","type":"change"}]' -u "tango-cs:tango" $TANGO_REST_URL/$ID
11+
12+
#open stream
13+
curl -u "tango-cs:tango" $TANGO_REST_URL/$ID/event-stream

0 commit comments

Comments
 (0)