Crawly logo Crawly

Introduction


Abstract

API lets you configure everything about our application through a simple, structured Application Programming Interface (API). Many basic operations on Crawly can be controlled through API service. Moreover, all the changes that you make will be effected spontaneously.

Let's overview about API help.

  • Learn about our authentication method and get your first API key
  • Get your monitors and their checks with the API.

How to connect API Service

Once you login dashboard, you will see API Access page under settings. Before connect to API you will need a Token on this page, you can create an access token. You can name your token for reminder for your different purposes.

After creating a token, you will see your API token once. For security reason you will be able to reach your token once, so be sure that you save your token to somewhere in secure.

Authenticate API Token

Crawly API Token can be used for the Bearer authentication header. Let's have a look on a curl example how to connect to Crawly with the token. This curl code will display your monitors.

$ curl https://crawly.app/api/v1/sites
    -H 'Authorization: Bearer ANO04Q0LAnIx5vPh2wy0vQZp3zUd24HPb2QlSe1iAvybdM5mg2sFJx4b30To'
    -H 'Accept: application/json'

The token ANO04Q0LAnIx5vPh2wy0vQZp3zUd24HPb2QlSe1iAvybdM5mg2sFJx4b30To is used to authenticate your user to Crawly and return your monitors. The resulting response payload may look like this:

{
    "id": 29,
    "identifier": "8hgzL5t2",
    "name": "PingML",
    "url": "pingml.com",
    "type": "https",
    "crawling_dates": [
        "11:03"
    ],
    "certificate_check": true,
    "execute_javascript": false,
    "external_url_check": true,
    "active": true,
    "last_check_at": {
        "date": "2018-09-27 11:04:55.000000",
        "timezone_type": 3,
        "timezone": "UTC"
    },
    "updated_at": {
        "date": "2018-09-27 09:06:17.000000",
        "timezone_type": 3,
        "timezone": "UTC"
    },
    "created_at": {
        "date": "2018-09-27 11:04:30.000000",
        "timezone_type": 3,
        "timezone": "UTC"
    },
    "internalLinks": 31,
    "externalLinks": 10
}, {
    "id": 30,
    "identifier": "87asdLK",
    ...