Commit Graph

7 Commits

Author SHA1 Message Date
Kris Moore
97e8af86cf New API call for lifepreserver. This one lists the replication
targets on a system

While here, update api-test.sh to save response to /tmp/api-response, so we dont
need to always cut-n-paste

REST Request:
-------------------------------
PUT /sysadm/lifepreserver
{
   "action" : "listreplication"
}

REST Response:
-------------------------------
{
    "args": {
        "listreplication": {
            "tank1->192.168.0.9": {
                "dataset": "tank1",
                "frequency": "22",
                "host": "192.168.0.9",
                "port": "22",
                "rdset": "tank/backups",
                "user": "backups"
            }
        }
    }
}

WebSocket Request:
-------------------------------
{
   "namespace" : "sysadm",
   "args" : {
      "action" : "listreplication"
   },
   "id" : "fooid",
   "name" : "lifepreserver"
}

WebSocket Response:
-------------------------------
{
  "args": {
    "listreplication": {
      "tank1->192.168.0.9": {
        "dataset": "tank1",
        "frequency": "22",
        "host": "192.168.0.9",
        "port": "22",
        "rdset": "tank/backups",
        "user": "backups"
      }
    }
  },
  "id": "fooid",
  "name": "response",
  "namespace": "sysadm"
}
2016-01-15 10:40:03 -05:00
Kris Moore
adf6fe6ab7 Accept self-signed certs for wss 2016-01-08 14:16:35 -05:00
Kris Moore
c90c47adf6 Add wss to api-test script 2016-01-08 13:54:01 -05:00
Kris Moore
38321421c4 Tell resty to accept self-signed certs 2016-01-08 12:11:02 -05:00
Ken Moore
b2a2342f95 Switch the api-test script to use https and wss for the connections. 2016-01-08 11:59:04 -05:00
Kris Moore
a606d58af3 Update api-test with better formatting, so we can easily send doc
requests over to Dru with all the right information
2016-01-07 10:24:09 -05:00
Kris Moore
0694be78bf Add the new api-test.sh script, along with a javascript websocket
tester. Now you can try out API calls on the fly, which are sent
via REST and WebSockets, to verify you get expected results back
on both.
2016-01-06 17:07:30 -05:00