]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
temp docs
authorAnthony Minessale <anthm@freeswitch.org>
Wed, 3 May 2017 23:22:17 +0000 (18:22 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Wed, 3 May 2017 23:22:23 +0000 (18:22 -0500)
libs/libblade/flows/flow1.json [new file with mode: 0644]

diff --git a/libs/libblade/flows/flow1.json b/libs/libblade/flows/flow1.json
new file mode 100644 (file)
index 0000000..9fe5eea
--- /dev/null
@@ -0,0 +1,153 @@
+--->
+GET /login HTTP/1.1
+Host: master.freeswitch.org
+Upgrade: websocket
+Connection: Upgrade
+Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==
+Sec-WebSocket-Protocol: blade-1.0
+Sec-WebSocket-Version: 13
+
+
+<---
+HTTP/1.1 101 Switching Protocols
+Upgrade: websocket
+Connection: Upgrade
+Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo=
+Sec-WebSocket-Protocol: blade-1.0
+
+
+--->  CONNECT TO THE MASTER NODE
+{
+    "jsonrpc": "2.0",
+    "method": "BLADE.connect",
+    "params": {
+       "blade": "1.0"
+    },
+    "id": 1
+}
+
+<--- SUCCESS (TBD FAIL CASE)
+{
+    "jsonrpc": "2.0",
+    "id": 1,
+    "result": {
+       "blade": "1.0",
+       "connection-state": "connected",
+       "session-id": "5b696e8d-9875-45a5-b347-3b9fc288bad3",
+       "master-id": "5164f7f8-a6ca-4dd4-8f36-33db1dc9c35d",
+       "realm-list": [{"realm": "ls1.mydomain.com"}]
+       "allowed-blapi": ["BLADE"],
+    }
+}
+
+---> REGISTER ADDITIONAL IDENTITY "foobar@ls1.mydomain.com/blah"
+{
+    "jsonrpc": "2.0",
+    "method": "BLADE.register",
+    "params": {
+       "identity": "foobar",
+       "realm": "ls1.mydomain.com",
+       "resource": "blah",
+       "session-id": "5b696e8d-9875-45a5-b347-3b9fc288bad3",
+       "master-id": "5164f7f8-a6ca-4dd4-8f36-33db1dc9c35d",
+    },
+    "id": 2
+}
+
+<--- SUCCESS (TBD FAIL CASE) messages for this foobar IDENTITY will now go to this node.
+    {
+       "jsonrpc": "2.0",
+       "id": 2,
+       "result": {
+           "identity": "foobar",
+           "realm": "ls1.mydomain.com",
+           "resource": "blah",
+           "session-id": "5b696e8d-9875-45a5-b347-3b9fc288bad3",
+           "master-id": "5164f7f8-a6ca-4dd4-8f36-33db1dc9c35d",
+       }
+    }
+
+---> REGISTER SUBDOMAIN "myspace.ls1.mydomain.com"
+{
+    "jsonrpc": "2.0",
+    "method": "BLADE.register",
+    "params": {
+       "realm-zone": "myspace",
+       "realm": "ls1.mydomain.com",
+       "session-id": "5b696e8d-9875-45a5-b347-3b9fc288bad3",
+       "master-id": "5164f7f8-a6ca-4dd4-8f36-33db1dc9c35d",
+    },
+    "id": 3
+}
+
+<--- SUCCESS (TBD FAIL CASE) messages for any IDENTITY at "myspace.ls1.mydomain.com" will now go to this node.
+    {
+       "jsonrpc": "2.0",
+       "id": 3,
+       "result": {
+           "realm-zone": "myspace",
+           "realm": "ls1.mydomain.com",
+           "realm-list": [{"realm": "ls1.mydomain.com", "zones": ["myspace"]}],
+           "session-id": "5b696e8d-9875-45a5-b347-3b9fc288bad3",
+           "master-id": "5164f7f8-a6ca-4dd4-8f36-33db1dc9c35d",
+       }
+    }
+
+
+---> PUBLISH API LSAPI "A single node must have exlusive access to the BLAPI's namespace with the master to publish"
+// MAYBE ADD SCHEMA and method to fetch it.
+{
+    "jsonrpc": "2.0",
+    "method": "BLADE.publish",
+    "params": {
+       "blapi": "LSAPI",
+       "realm": "ls1.mydomain.com",
+       "session-id": "5b696e8d-9875-45a5-b347-3b9fc288bad3",
+       "master-id": "5164f7f8-a6ca-4dd4-8f36-33db1dc9c35d",
+    },
+    "id": 4
+}
+
+
+<--- SUCCESS (TBD FAIL CASE) 
+{
+    "jsonrpc": "2.0",
+    "id": 4,
+    "result": {
+       "blapi": "LSAPI",
+       "allowed-blapi": ["BLADE", "LSAPI"],
+       "session-id": "5b696e8d-9875-45a5-b347-3b9fc288bad3",
+       "master-id": "5164f7f8-a6ca-4dd4-8f36-33db1dc9c35d",
+    }
+}
+
+
+
+---> EXECUTE API
+{
+    "jsonrpc": "2.0",
+    "method": "BLADE.execute",
+    "params": {
+       "blapi": "LSAPI",
+       "params": {
+           "path": "/tmp/testing"
+       }
+       "session-id": "5b696e8d-9875-45a5-b347-3b9fc288bad3",
+       "master-id": "5164f7f8-a6ca-4dd4-8f36-33db1dc9c35d",
+    },
+    "id": 5
+}
+
+<--- SUCCESS (TBD FAIL CASE) 
+{
+    "jsonrpc": "2.0",
+    "id": 5,
+    "result": {
+       "blapi": "LSAPI",
+       "result": {
+           "listing": "-rw-r--r-- 1 root root 33881 May  3 17:22 blank_avatar.png\ndrwxr-xr-x 6 root root  4096 Oct 26  2016 dash.js\n-rw-r--r-- 1 root root  5266 May  3 17:20 foo.diff\n-rw-r--r-- 1 root root   485 May  3 17:22 ks.diff"
+       },
+
+    }
+}