Table of Contents |
---|
Anchor | ||||
---|---|---|---|---|
|
Attribute | type | values | default | mandate | comment | ||||
category | string |
|
| true | |||||
name | string |
|
| true | |||||
description | string |
|
| false |
| ||||
options | string |
|
|
|
|
Anchor | ||||
---|---|---|---|---|
|
Method:/configuration /create
Code Block | ||||
---|---|---|---|---|
|
...
{ |
...
"attrs": |
...
{ "category":"DGS", |
...
"name":"SMS", |
...
"description":"description", |
...
"options": |
...
"{ \"provider\":\"clickatell\", \"username\":\"john.smith\", |
...
\"password\":\"secret\" |
...
}"
}
} |
Code Block | ||||
---|---|---|---|---|
| ||||
{ "error":0 |
...
} |
Anchor | ||||
---|---|---|---|---|
|
...
Code Block | ||||
---|---|---|---|---|
| ||||
{
|
...
"match":
|
...
[ |
...
["category", "=", "DGS" |
...
],
|
...
["name", "=", "SMS" |
...
]
|
...
], "return": |
...
["*" |
...
]
|
...
} |
Code Block | ||||
---|---|---|---|---|
| ||||
{ "error":0 |
...
"result": |
...
{ "id": "id", "category": "DGS", "name":"SMS", "description":"description", "options": |
...
"{ \"provider\":\"clickatell\", \"username\":\"john.smith\", \"password\":\"secret\" |
...
}"
}
} |
Anchor | ||||
---|---|---|---|---|
|
...
...
Code Block | ||||
---|---|---|---|---|
|
{ "match": |
...
[ |
...
["category", "=", "DGS" |
...
], |
...
["name", "=", "SMS" |
...
]
|
...
], "return": |
...
["*" |
...
]
|
...
} |
Code Block | ||||
---|---|---|---|---|
| ||||
{ "error":0 |
...
"result": |
...
{ "total": 1, |
...
"rows":
[
{
"id": "id",
"category": "DGS",
"name":"SMS",
"description":"description",
"options":
"{
\"provider\":\"clickatell\",
\"username\":\"john.smith\",
\"password\":\"secret\"
}"
}
]
}
} |
Anchor | ||||
---|---|---|---|---|
|
Method:/configuration /delete
Code Block | ||||
---|---|---|---|---|
| ||||
{
"id": "configuration object id"
} |
Code Block | ||||
---|---|---|---|---|
| ||||
{
"error":0
} |
Anchor | ||||
---|---|---|---|---|
|
Method:/configuration /set
Code Block | ||||
---|---|---|---|---|
| ||||
{
"id": "configuration object id",
"attrs":
{
"category":"DGS",
"name":"SMS",
"description":"description",
"options":
"{
\"provider\":\"clickatell\ |
...
Method:/configuration /delete
Parameters:
{
"id":id
}
Response:
{
"error":0
}
...
Method:/configuration /set
Parameters:
{
"id":id,
"attrs":
{
"description":"description",
"options":
'{
"provider":"clickatell",
"username":"john.smith",
"password":"secret"
}'
}
}
Response:
{
"error":0
}
...
Method:/configuration /update
Parameters:
{
"attrs":
{
"category":"DGS",
"name":"SMS",
"description":"description",
"options":
'{
"provider":"clickatell",
"username":"john.smith",
"password":"secret"
}'
}
}
Response:
{
"error":0
}
...
- SMTP server:
category:"CONNECTOR",
name:"SMTP",
options:
'{
"doc":
{
"serverURI":"192.168.222.1",
"serverPort":25,
"authRequired":false,
"useTLS":false,
"userName":"",
"password":""
}
}'
- SMTP send OTP template
Wiki Markup |
---|
category:"TEMPLATE",
name:"SMTP_OTP",
options:
'\{
"subject":"OTP",
"from":"deepnetsecurity@gmail.com",
"to":"\[\[EMAIL\]\]",
"body":"Your one-time password: \[\[OTP\]\]",
"bodyFormat":"1",
"priority":"1"
\}' |
- SMS settings
Wiki Markup |
---|
category:"CONNECTOR",
name:"SMS",
options:
'\{
"provider":
\{
"@name":"Clickatell",
"username":"deepnet",
"password":"d33p5pace",
"sms":
\{
"http":
\{
"variables":
\[
\{
"variable":
\{
"@name":"api_id",
"@value":"389965"
\}
\}
\]
\}
\},
"wap":
\{
"http":
\{
"variables":
\[
\{
"variable":
\{
"@name":"api_id",
"@value":"389965"
\}
\}
\]
\}
\}
\}
\}'
\\ |
- SMS send OTP template
Wiki Markup |
---|
category:"TEMPLATE",
name:"SMS_OTP",
options:
'\{
"from":"t.s.b@deepnetsecurity.com",
"to":"\[\[MOBILE\]\]",
"body":"Your one-time password: \[\[OTP\]\]"
\}'
\\ |
- Twitter settings:
category:"CONNECTOR",
name:"TWITTER",
options:
'{
"doc":
{ "serverURI":'http://twitter.com/direct_messages/new.xml',
"userName":"deepnet",
"password":"314159"
}
}'
- TeleSigh settings
...
",
|
...
\ |
...
"username\":\"john.smith\", |
...
\" |
...
password\":\" |
...
secret\" |
...
}" |
...
|
...
}
} |
Code Block | ||||
---|---|---|---|---|
| ||||
{
"error":0
} |
Anchor | ||||
---|---|---|---|---|
|
Method:/configuration /update
This API will create the configuration if it doesn't exist. Or it will update it, if it already exists.
Code Block | ||||
---|---|---|---|---|
| ||||
{ " |
...
attrs": |
...
|
...
{ " |
...
category":" |
...
DGS", " |
...
name":" |
...
SMS", |
...
"description":"description", " |
...
options": |
...
"{ |
...
|
...
\" |
...
provider\":\" |
...
clickatell\", |
...
|
...
\"username\":\"john.smith\", |
...
|
...
|
...
\ |
...
- SMTP send Emergency Code template
...
"password\":\"secret\"
}"
}
} |
Code Block | ||||
---|---|---|---|---|
| ||||
{
"error":0
} |
...