|
The wiki of Montastic, the free website monitoring service.
Home
> API
© Montastic |
Montastic API allows 3rd party developers to build web and desktop applications which can communicate directly with Montastic. The communication is done by using RESTful HTTPS requests and XML responses.
The API has the same entry point as the montastic web site. Make sure to use HTTPS to secure your connection:
https://www.montastic.com
Each API request requires a basic HTTP authentication, which means the presence of username & password is required.
Example:
curl -H 'Accept: application/xml' -H 'Content-type: application/xml' -u daniel@metadot.com:123456 https://www.montastic.com/checkpoints/index
Example request:
curl -H 'Accept: application/xml' -H 'Content-type: application/xml' -u daniel@metadot.com:123456 https://www.montastic.com/checkpoints/show/9795
Example response:
Status: OK
<?xml version="1.0" encoding="UTF-8"?>
<checkpoint>
<check-interval-id type="integer">3</check-interval-id>
<grep-this>Login</grepthis>
<grep-presence>true</grep-presence>
<id type="integer">9795</id>
<is-monitoring-enabled type="boolean">true</is-monitoring-enabled>
<name>Login page</name>
<status type="integer">1</status>
<status-changed-on type="datetime">2008-12-29T17:54:18-06:00</status-changed-on>
<url>http://www.google.com/</url>
</checkpoint>
Example request:
curl -H 'Accept: application/xml' -H 'Content-type: application/xml' -u billy@example.com:123456 https://www.montastic.com/checkpoints/create -d '<checkpoint><url>http://ww3.test3.com</url></checkpoint>' -X POST
Example response:
Status: OK
<?xml version="1.0" encoding="UTF-8"?>
<checkpoint>
<check-interval-id type="integer">5</check-interval-id>
<id type="integer">9830</id>
<is-monitoring-enabled type="boolean">true</is-monitoring-enabled>
<name></name>
<status type="integer">1</status>
<status-changed-on type="datetime">2009-10-30T13:42:50-06:00</status-changed-on>
<url>http://ww3.test3.com</url>
</checkpoint>
Example request:
curl -H 'Accept: application/xml' -H 'Content-type: application/xml' -u daniel@metadot.com:123456 https://www.montastic.com/checkpoints/destroy/156423 -X DELETE
Example response:
Status: OK
Example request:
curl -H 'Accept: application/xml' -H 'Content-type: application/xml' -u daniel@metadot.com:123456 https://www.montastic.com/checkpoints/index
Example response:
Status: OK
<?xml version="1.0" encoding="UTF-8"?>
<checkpoints type="array">
<checkpoint>
<check-interval-id type="integer">5</check-interval-id>
<id type="integer">9795</id>
<is-monitoring-enabled type="boolean">true</is-monitoring-enabled>
<name></name>
<status type="integer">1</status>
<status-changed-on type="datetime">2008-12-29T17:54:18-06:00</status-changed-on>
<url>http://www.mojohelpdesk.com/</url>
</checkpoint>
<checkpoint>
<check-interval-id type="integer">30</check-interval-id>
<id type="integer">9794</id>
<is-monitoring-enabled type="boolean">true</is-monitoring-enabled>
<name></name>
<status type="integer">-1</status>
<status-changed-on type="datetime">2008-06-20T22:07:20-05:00</status-changed-on>
<url>http://www.metadot.com/s</url>
</checkpoint>
<checkpoint>
<check-interval-id type="integer">30</check-interval-id>
<id type="integer">9793</id>
<is-monitoring-enabled type="boolean">true</is-monitoring-enabled>
<name></name>
<status type="integer">1</status>
<status-changed-on type="datetime">2009-01-09T14:01:26-06:00</status-changed-on>
<url>http://www.metadot.com/</url>
</checkpoint>
</checkpoints>
Example request:
curl -H 'Accept: application/xml' -H 'Content-type: application/xml' -u daniel@metadot.com:123456 http://www.montastic.com/checkpoints/update/21 -d '<checkpoint><name>Montastic.com production</name></checkpoint>' -X POST
Example response:
Status: OK