GET https://www.host-tracker.com/api/web/v1/tasks/intervals HTTP/1.1 User-Agent: Fiddler Content-Type: application/json Host: www.host-tracker.com Authorization: bearer your auth.token here Content-Length: 0
[1,5,15,30,60]
GET https://www.host-tracker.com/api/web/v1/tasks/types HTTP/1.1 User-Agent: Fiddler Content-Type: application/json Host: www.host-tracker.com Authorization: bearer your auth.token here Content-Length: 0
["Counter","DNSBL","Database","Http","Ping","Port","Snmp"]
GET https://www.host-tracker.com/api/web/v1/tasks/428cad60-2f47-e511-80c3-0003ff730224 HTTP/1.1 User-Agent: Fiddler Content-Type: application/json Host: www.host-tracker.com Authorization: bearer your auth.token here Content-Length: 0
TODO, try API or see Create request bellow.
TODO
GET https://www.host-tracker.com/api/web/v1/tasks HTTP/1.1 User-Agent: Fiddler Accept: application/json Host: www.host-tracker.com Authorization: bearer 3DD135...5EE510417 Content-Length: 0
{ //fields specific for http task "url": "<your url. Required>", "httpMethod": "<Get, Post or Head. Optional - default is Get>", "userAgent": "<user agent for request. Optional.>", "referer": "<referrer for request. Optional>", "acceptHeader": "<accept header. Optional>", "followRedirect": <bool: true or false(default). Optional>, "treat300AsError": <bool: true or false(default). Optional. If set, followRedirect is ignored>, //if true then redirects will be followed. "checkDnsbl": <bool: true or false(default). Optional>, /*if true then domain will be checked agains DNS black lists and if it is there, notification will be send according to subscriptions.*/ "checkDomainExpiration": <bool: true or false(default). Optional>, /*if true then domain expiration date will be monitored. Notifications will be sent 30,7 and 1 day before expiration and every day after it according to subscriptions.*/ /*Note: expiration monitoring will be created only for valid domain (not IP)*/ "checkCertificateExpiration": <bool: true or false(default). Optional>, /*if true then certificate expiration date of provided endpoint will be monitored. Notifications will be sent 30,7 and 1 day before expiration and every day after it according to subscriptions. Available only for https endpoints and ignored in other cases.*/ "timeout": <int: ms for site response before fail. Optional>, "keywords": [ "keyword1", "keyword2", ... ], //keywords to search for in response body. Optional "keywordMode": "<PresentAny, PresentAll, ReverseAny, ReverseAll, ReverseWithResult. Optional>", /* Keyword mode specifies how to use keywords: PresentAny - task will be Ok if any of specified keywords are present in response PresentAll - task will be Ok if all specified keywords are present in response ReverseAny - task will be Ok if all specified keywords are absent in response ReverseAll - task will be Ok if any of specified keywords are absent in response ReverseWithResult - task will be Ok if all specified keywords are absent in response. Fail contains rest of response line where first keyword was detected. This text is sent in alerts. Usefull, for example, in scenarios when your response contains some status information - each line has error status and object with this status. In such case you will retrieve on email, SMS, ... information of objects with fail status. WARN. In this mode only first 100 characters of every response line will be analyzed. */ "userName": "<userName for credentials to your resourse. Optional>", "password": "<password for credentials to your resourse. Optional>", "postParameters":"paramKey1=paramValue1\r\nparamKey2=paramValue2\r\n...", /*postParameters are Optional and specified with Post httpMethod*/ //fields same for all task types "interval": <int: 1(default),5,15,30,60 - interval of monitoring. Optional>, "enabled": <bool: true(default) or false. Optional>, "fullLog": <bool: true or false(default). Optional>, "openStat": <bool: true(default) or false. Optional>, "name": "<your task name here. Optional>", "tags": [ "tag1", "tag2", ... ], /*tags are Optional and can be used for task filtering*/ "agentPools": [ "poolId1", "poolId2", ... ], /*agentPools is Optional. It specifies monitoring locations for task. Default is taken from profile. Requirements if specified: 7 agents in all pools. If condition is not met error SelectMoreAgents with details will arise. */ "subscriptions": [ <subscription1>, <subscription2>, ... ] /* subscriptions are Optional. You could subscribe contacts for alerts and reports about this task using this field. In every subscription structure in array you should not specify taskIds. Specifying contactIds will create subscriptions only for this contacts. If you do not specify contactIds then all your existing confirmed contacts will be subscribed. For details of subscription structure see subscription service and examples. */ }
<HttpTaskEditableData> <!-- specific for http task fields --> <url>your url. Required</url> <httpMethod>Get, Post or Head. Optional - default is Get</httpMethod> <userAgent>user agent for request. Optional.</userAgent> <referer>referrer for request. Optional</referer> <acceptHeader>accept header. Optional</acceptHeader> <followRedirect>bool: true or false(default). Optional</followRedirect> <treat300AsError>bool: true or false(default). Optional. If set, followRedirect is ignored</treat300AsError> <!--if true then redirects will be followed.--> <checkDnsbl>bool: true or false(default). Optional</checkDnsbl> <!--if true then domain will be checked agains DNS black lists and if it is there, notification will be send according to subscriptions.--> <checkDomainExpiration>bool: true or false(default). Optional</checkDomainExpiration> <!--if true then domain expiration date will be monitored. Notifications will be sent 30,7 and 1 day before expiration and every day after it according to subscriptions.--> <!--Note: expiration monitoring will be created only for valid domain (not IP) --> <checkCertificateExpiration>bool: true or false(default). Optional</checkCertificateExpiration> <!--if true then certificate expiration date of provided endpoint will be monitored. Notifications will be sent 30,7 and 1 day before expiration and every day after it according to subscriptions. Available only for https endpoints and ignored in other cases.--> <keywords> <string>keyword1</string> <string>keyword2</string> ... </keywords> <!--keywords to search for in response body. Optional--> <keywordMode>PresentAny, PresentAll, ReverseAny, ReverseAll, ReverseWithResult. Optional</keywordMode> <!-- Keyword mode specifies how to use keywords: PresentAny - task will be Ok if any of specified keywords are present in response PresentAll - task will be Ok if all specified keywords are present in response ReverseAny - task will be Ok if all specified keywords are absent in response ReverseAll - task will be Ok if any of specified keywords are absent in response ReverseWithResult - task will be Ok if all specified keywords are absent in response. Fail contains rest of response line where first keyword was detected. This text is sent in alerts. Usefull, for example, in scenarios when your response contains some status information - each line has error status and object with this status. In such case you will retrieve on email, SMS, ... information of objects with fail status. WARN. In this mode only first 100 characters of every response line will be analyzed. --> <userName>userName for credentials to your resourse. Optional</userName> <password>password for credentials to your resourse. Optional</password> <postParameters>param1=test\r\nparam2=test\r\nuser=public</postParameters> <!--postParameters are Optional and specified with Post httpMethod--> <interval>1(default),5,15,30,60 - interval of monitoring. Optional</interval> <enabled>bool: true(default) or false. Optional</enabled> <fullLog>bool: true or false(default). Optional</fullLog> <openStat>bool: true(default) or false. Optional</openStat> <name>your task name here. Optional</name> <tags> <string>tag1</string> <string>tag2</string> ... </tags><!--tags are Optional and can be used for task filtering--> <agentPools> <string>poolId1</string> <string>poolId2</string> ... </agentPools><!--agentPools are Optional. It specifies monitoring locations for task. Default is taken from profile. Requirements if specified: 7 agents in all pools. If condition is not met error SelectMoreAgents with details will arise. --> <subscriptions> <Subscription>subscription1</Subscription> <Subscription>subscription2</Subscription> ... </subscriptions> <!-- subscriptions are Optional. You could subscribe contacts for alerts and reports about this task using this field. In every subscription structure in array you should not specify taskIds. Specifying contactIds will create subscriptions only for this contacts. If you do not specify contactIds then all your existing confirmed contacts will be subscribed. For details of subscription structure see subscription service and examples. --> </HttpTaskEditableData>
{ "id":"ef10cd12-93f9-e311-bec5-dc85de1f0bc2", "url":"http://www.myprivateresource6.com", "rawUrl":"http://www.myprivateresource6.com", "name":"testing web api on private resourse", "creationTime":"2014-06-21T22:26:23.6780166Z", "taskType":"Http", "enabled":true, "interval":1, "upFromTime":"2014-06-21T22:26:23.6780166Z", "lastState":true, "lastStateChangeTime":"2014-06-21T22:26:23.6780166Z", "openStatEnabled":false, "fullLogEnabled":false, "disablenceReason":null, "disablenceTime":null, "holdResults":true, "agentStat":false, "billingOverlimits":[], "tags":["privateResource","testApi"], "subscriptions": [ { "alertTypes":["Up"], "reportTypes":null, "taskIds":["ef10cd12-93f9-e311-bec5-dc85de1f0bc2"], "contactIds":["4cedf037-d1d9-e311-bebc-dc85de1f0bc2"] }, { "alertTypes":["Down"], "reportTypes":null, "taskIds":["ef10cd12-93f9-e311-bec5-dc85de1f0bc2"], "contactIds":["4cedf037-d1d9-e311-bebc-dc85de1f0bc2"] }, { "alertTypes":["Up"], "reportTypes":null, "taskIds":["ef10cd12-93f9-e311-bec5-dc85de1f0bc2"], "contactIds":["afc5e2c8-3d42-e311-bea5-3085a980e898"] }, { "alertTypes":["Down"], "reportTypes":null, "taskIds":["ef10cd12-93f9-e311-bec5-dc85de1f0bc2"], "contactIds":["afc5e2c8-3d42-e311-bea5-3085a980e898"] }, { "alertTypes":["Up"],"reportTypes":null, "taskIds":["ef10cd12-93f9-e311-bec5-dc85de1f0bc2"],"contactIds":["e48409ff-bbf7-e311-bec5-dc85de1f0bc2"]}, {"alertTypes":["Down"],"reportTypes":null,"taskIds":["ef10cd12-93f9-e311-bec5-dc85de1f0bc2"],"contactIds":["e48409ff-bbf7-e311-bec5-dc85de1f0bc2"]}, {"alertTypes":null,"reportTypes":["Monthly"],"taskIds":["ef10cd12-93f9-e311-bec5-dc85de1f0bc2"],"contactIds":["4cedf037-d1d9-e311-bebc-dc85de1f0bc2"]}, {"alertTypes":null,"reportTypes":["Daily"],"taskIds":["ef10cd12-93f9-e311-bec5-dc85de1f0bc2"],"contactIds":["afc5e2c8-3d42-e311-bea5-3085a980e898"]}, {"alertTypes":null,"reportTypes":["Monthly"],"taskIds":["ef10cd12-93f9-e311-bec5-dc85de1f0bc2"],"contactIds":["afc5e2c8-3d42-e311-bea5-3085a980e898"]} ], "stats":null, "agentPools":["asia","westeurope"], "deleted":false, "httpMethod":"Post", "userAgent":"mybot", "referer":"http://www.google.com", "acceptHeader":"application/json", "keywords":["error","wrong"], "keywordMode":"ReverseAny", "maxResponsePageSize":2097152, "timeout":40000, "userName":"public", "password":"xxx", "postParameters":"param1=test\r\nparam2=test\r\nuser=public" }
POST https://www.host-tracker.com/api/web/v1/tasks/http HTTP/1.1 User-Agent: Fiddler Content-Type: application/json Host: www.host-tracker.com Content-Length: 823 Authorization: bearer ECFB190B3...653C1E78 { "url": "http://www.myprivateresource.com", "httpMethod": "Post", "userAgent": "mybot", "referer": "http://www.google.com", "acceptHeader": "application/json", "keywords": ["error", "wrong"], "keywordMode": "ReverseAny", "timeout": 10000, "userName": "public", "password": "xxx", "postParameters":"param1=test\r\nparam2=test\r\nuser=public", "interval": 1, "enabled": true, "fullLog": false, "openStat": false, "name": "testing web api on private resourse", "tags": ["testApi", "privateResource"], "agentPools": ["asia", "westeurope"], "subscriptions": [ {"alertTypes": ["Up", "Down"]}, {"reportTypes": ["Daily"], contactIds:["AFC5E2C8-3D42-E311-BEA5-3085A980E898"]}, {"reportTypes": ["Monthly"]} ] }
POST https://www.host-tracker.com/api/web/v1/tasks/http HTTP/1.1 User-Agent: Fiddler Content-Type: text/xml Accept: text/xml Host: www.host-tracker.com Content-Length: 1546 Authorization: bearer ECFB...1E78 <HttpTaskEditableData> <url>http://www.myprivateresource5.com</url> <httpMethod>Post</httpMethod> <userAgent>mybot</userAgent> <referer>http://www.google.com</referer> <acceptHeader>application/json</acceptHeader> <keywords> <string>error</string> <string>wrong</string> </keywords> <keywordMode>ReverseAny</keywordMode> <userName>public</userName> <password>xxx</password> <postParameters>param1=test\r\nparam2=test\r\nuser=public</postParameters> <interval>1</interval> <enabled>true</enabled> <fullLog>false</fullLog> <openStat>false</openStat> <name>testing web api on private resourse</name> <tags> <string>testApi</string> <string>privateResource</string> </tags> <agentPools> <string>asia</string> <string>westeurope</string> </agentPools> <subscriptions> <Subscription> <alertTypes> <string>Up</string> <string>Down</string> </alertTypes> </Subscription> <Subscription> <reportTypes> <string>Daily</string> </reportTypes> <contactIds> <guid>AFC5E2C8-3D42-E311-BEA5-3085A980E898</guid> </contactIds> </Subscription> <Subscription> <reportTypes> <string>Monthly</string> </reportTypes> </Subscription> </subscriptions> </HttpTaskEditableData>
POST https://www.host-tracker.com/api/web/v1/tasks/ping HTTP/1.1 User-Agent: Fiddler Content-Type: application/json Host: www.host-tracker.com Content-Length: 430 Authorization: bearer your auth.token here { "interval": 1, "enabled": true, "fullLog": false, "openStat": false, "name": "testing web api on private resourse", "tags": ["testApi", "privateResource"], "agentPools": [], "subscriptions": [ {"alertTypes": ["Up", "Down"]}, {"reportTypes": ["Daily"], contactIds:[]}, {"reportTypes": ["Monthly"]} ], "host":"91.197.255.62" }
POST https://www.host-tracker.com/api/web/v1/tasks/ping HTTP/1.1 User-Agent: Fiddler Content-Type: text/xml Host: www.host-tracker.com Content-Length: 773 Authorization: bearer your auth.token here <PingTaskEditableData> <host>172.16.254.1</host> <interval>1</interval> <enabled>true</enabled> <fullLog>false</fullLog> <openStat>false</openStat> <name>test2</name> <tags> <string>tag1</string> <string>tag2</string> </tags> <agentPools> </agentPools> <subscriptions> <Subscription> <alertTypes> <string>Up</string> <string>Down</string> </alertTypes> </Subscription> <Subscription> <reportTypes> <string>Daily</string> </reportTypes> <contactIds> </contactIds> </Subscription> <Subscription> <reportTypes> <string>Monthly</string> </reportTypes> </Subscription> </subscriptions> </PingTaskEditableData>
POST https://www.host-tracker.com/api/web/v1/tasks/port HTTP/1.1 User-Agent: Fiddler Content-Type: application/json Host: www.host-tracker.com Authorization: bearer your auth.token here Content-Length: 400 { "host":"my.some.site.com", "port":"123", "interval": 1, "enabled": true, "fullLog": false, "openStat": false, "name": "porttest2", "tags": ["tag1"], "agentPools": [], "subscriptions": [ {"alertTypes": ["Up", "Down"]}, {"reportTypes": ["Daily"], contactIds:["AFC5E2C8-3D42-E311-BEA5-3085A980E898"]}, {"reportTypes": ["Monthly"]} ] }
POST https://www.host-tracker.com/api/web/v1/tasks/port HTTP/1.1 User-Agent: Fiddler Content-Type: text/xml Host: www.host-tracker.com Authorization: bearer your auth.token here Content-Length: 857 <PortTaskEditableData > <host>somemy.site.com</host> <port>123</port> <interval>1</interval> <enabled>true</enabled> <fullLog>false</fullLog> <openStat>false</openStat> <name>test2</name> <tags> <string>tag1</string> <string>tag2</string> </tags> <agentPools> </agentPools> <subscriptions> <Subscription> <alertTypes> <string>Up</string> <string>Down</string> </alertTypes> </Subscription> <Subscription> <reportTypes> <string>Daily</string> </reportTypes> <contactIds> <guid>AFC5E2C8-3D42-E311-BEA5-3085A980E898</guid> </contactIds> </Subscription> <Subscription> <reportTypes> <string>Monthly</string> </reportTypes> </Subscription> </subscriptions> </PortTaskEditableData >
PUT https://www.host-tracker.com/api/web/v1/tasks/http/guid of task HTTP/1.1 User-Agent: Fiddler Content-Type: application/json Host: www.host-tracker.com Content-Length: 659 Authorization: bearer your auth.token here { "url": "http://www.myprivateresource.com", "httpMethod": "Post", "userAgent": "mybot", "referer": "http://www.google.com", "acceptHeader": "application/json", "keywords": ["error", "wrong"], "keywordMode": "ReverseAny", "userName": "public", "timeout": 5000, "password": "xxx", "postParameters":"param1=test\r\nparam2=test\r\nuser=public", "interval": 1, "enabled": true, "fullLog": false, "openStat": false, "name": "test33", "tags": [], "agentPools": [], "subscriptions": [ {"alertTypes": ["Up", "Down"]}, {"reportTypes": ["Daily"], contactIds:[]}, {"reportTypes": ["Monthly"]} ] }
PUT https://www.host-tracker.com/api/web/v1/tasks/http/guid of task HTTP/1.1 User-Agent: Fiddler Content-Type: text/xml Host: www.host-tracker.com Content-Length: 1190 Authorization: bearer your auth.token here <HttpTaskEditableData> <url>http://www.myprivateresource6.com</url> <httpMethod>Post</httpMethod> <userAgent>mybot</userAgent> <referer>http://www.google.com</referer> <acceptHeader>application/json</acceptHeader> <keywords> <string>error</string> <string>wrong</string> </keywords> <keywordMode>ReverseAny</keywordMode> <userName>public</userName> <password>xxx</password> <postParameters>param1=test\r\nparam2=test\r\nuser=public</postParameters> <interval>1</interval> <enabled>true</enabled> <fullLog>false</fullLog> <openStat>false</openStat> <name>testing web api on private resourse</name> <tags> </tags> <agentPools> </agentPools> <subscriptions> <Subscription> <alertTypes> <string>Up</string> <string>Down</string> </alertTypes> </Subscription> <Subscription> <reportTypes> <string>Daily</string> </reportTypes> <contactIds> </contactIds> </Subscription> <Subscription> <reportTypes> <string>Monthly</string> </reportTypes> </Subscription> </subscriptions> </HttpTaskEditableData>
PUT https://www.host-tracker.com/api/web/v1/tasks/ping/guid of task HTTP/1.1 User-Agent: Fiddler Content-Type: application/json Host: www.host-tracker.com Content-Length: 344 Authorization: bearer your auth.token here { "host":"91.197.255.62" "interval": 1, "enabled": true, "fullLog": false, "openStat": false, "name": "testing web api on private resourse", "tags": ["testApi", "privateResource"], "agentPools": [], "subscriptions": [ {"alertTypes": ["Up", "Down"]}, {"reportTypes": ["Daily"], contactIds:[]}, {"reportTypes": ["Monthly"]} ], }
PUT https://www.host-tracker.com/api/web/v1/tasks/ping/guid of task HTTP/1.1 User-Agent: Fiddler Content-Type: text/xml Host: www.host-tracker.com Content-Length: 638 Authorization: bearer your auth.token here <PingTaskEditableData> <host>172.16.254.2</host> <interval>1</interval> <enabled>true</enabled> <fullLog>false</fullLog> <openStat>false</openStat> <name>test2</name> <tags> <string>tag1</string> <string>tag2</string> </tags> <agentPools> </agentPools> <subscriptions> <Subscription> <alertTypes> <string>Up</string> <string>Down</string> </alertTypes> </Subscription> <Subscription> <reportTypes> <string>Daily</string> </reportTypes> <contactIds> </contactIds> </Subscription> <Subscription> <reportTypes> <string>Monthly</string> </reportTypes> </Subscription> </subscriptions> </PingTaskEditableData>
PUT https://www.host-tracker.com/api/web/v1/tasks/port/guid of task HTTP/1.1 User-Agent: Fiddler Content-Type: application/json Host: www.host-tracker.com Content-Length: 399 Authorization: bearer your auth.token here { "host":"my.some.site.com", "port":"123", "interval": 1, "enabled": true, "fullLog": false, "openStat": false, "name": "porttest2", "tags": ["tag1"], "agentPools": [], "subscriptions": [ {"alertTypes": ["Up", "Down"]}, {"reportTypes": ["Daily"], contactIds:["AFC5E2C8-3D42-E311-BEA5-3085A980E898"]}, {"reportTypes": ["Monthly"]} ] }
PUT https://www.host-tracker.com/api/web/v1/tasks/port/guid of task HTTP/1.1 User-Agent: Fiddler Content-Type: text/xml Host: www.host-tracker.com Content-Length: 857 Authorization: bearer your auth.token here <PortTaskEditableData> <host>somemy.site.com</host> <port>123</port> <interval>1</interval> <enabled>true</enabled> <fullLog>false</fullLog> <openStat>false</openStat> <name>test2</name> <tags> <string>tag1</string> <string>tag2</string> </tags> <agentPools> </agentPools> <subscriptions> <Subscription> <alertTypes> <string>Up</string> <string>Down</string> </alertTypes> </Subscription> <Subscription> <reportTypes> <string>Daily</string> </reportTypes <contactIds> <guid>AFC5E2C8-3D42-E311-BEA5-3085A980E898</guid> </contactIds> </Subscription> <Subscription> <reportTypes> <string>Monthly</string> </reportTypes> </Subscription> </subscriptions> </PortTaskEditableData>
DELETE https://www.host-tracker.com/api/web/v1/tasks/guid of task HTTP/1.1 User-Agent: Fiddler Content-Type: text/xml Host: www.host-tracker.com Authorization: bearer your auth.token here Content-Length: 0
DELETE https://www.host-tracker.com/api/web/v1/tasks?tag=tag1&?taskTypes=Http HTTP/1.1 User-Agent: Fiddler Content-Type: text/xml Host: www.host-tracker.com Content-Length: 0 Authorization: bearer your auth.token here