Home > API
login

© Montastic

Google

Montastic API  

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.

API entry point  

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

Authentication  

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

Getting checkpoint info  

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>

Creating a new 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>

Deleting a 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

Getting list of checkpoints  

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>

Updating a checkpoint  

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

Checkpoint fields explanation  

 

  • url
    • URL to check. E.g. http://www.daskeyboard.com/ or https://bob:secret@login.ibm.com:8080/login
  • name
    • Name given to this checkpoint. E.g. 'Website login page'.
  • grep-this
    • Keyword Montastic should check for. E.g. keyboard
  • grep-presence
    • true (default) | false: if true, Montastic checks the presence of <grep-this> keyword. If false, Montastic checks that the document does not contain the <grep-this> keyword.
  • id
    • Unique id of a checkpoint. This is assigned automatically at checkpoint creation time.
  • is-monitoring-enabled
    • true | false: if true, Montastic monitors the checkpoint on a regular basis set by check-interval-id. If false, checkpoint is not monitored.
  • status
    • -1 | 0 | 1: If -1 checkpoint is faulty. 1 means all is OK. 0 means unknown status.
  • status-changed-on
    • Date of the last status change.
  • check-interval-id
    • Monitoring interval in minutes. Possible values are 5, 10, 30, 60, 180, 360, 1440.