Getting Started

Servers

Sites

APIs

Need Help…

Pulse APIs - Sites

The sites APIs can be used to index, show, create, update, verify or delete a site.

Index - Retrieve All

This API is available via the following url:

/api/v1/sites

It has the following parameters:

key type required example
page Integer no 1

The following is an example response.

{
    "data": [
        {
            "id": "8ca402e8-83af-4cd0-bd17-20cf8b21d438",
            "domain": "https://test.com",
            "status": "Online",
            "channel": "Slack",
            "route": "http://schmitt.com/voluptas",
            "dns_record": "8ca402e8-83af-4cd0-bd17-20cf8b21d438",
            "response_time": "0.3642",
            "last_outage_at": "2019-01-25 10:56:00",
            "ssl_tls": "Good"
        },
        {
            "id": "8ca402e8-8ebb-465c-b47e-114145bae8f2",
            "domain": "https://www.example.com",
            "status": "Offline",
            "channel": "None",
            "route": ""
            "dns_record": "8ca402e8-8ebb-465c-b47e-114145bae8f2",
            "response_time": "0.7646",
            "last_outage_at": "2019-01-25 10:56:00",
            "ssl_tls": "Bad"            
        }
    ],
    "links": {
        "first": "/api/v1/sites?page=1",
        "last": "/api/v1/sites?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "path": "/api/v1/sites",
        "per_page": 15,
        "to": 4,
        "total": 4
    }
}

Response time is displayed in seconds. The last outage date uses the UTC time zone.

Show - Retrieve A Site

This API is available via the following url:

/api/v1/sites/show

It has the following parameters:

key type required example
id String yes 8ca1e533-49d5-497a-93f0-1d5ecd79949d

The following is an example response:

{
    "data": {
        "id": "8ca1e533-49d5-497a-93f0-1d5ecd79949d",
        "domain": "https://test.com",
        "status": "Online",
        "channel": "Slack",
        "route": "http://schmitt.com/voluptas",
        "dns_record": "8ca1e533-49d5-497a-93f0-1d5ecd79949d",
        "response_time": "0.3642",
        "last_outage_at": "2019-01-25 10:56:00",
        "ssl_tls": "Good"
    }
}

Store - Create A Site

This API is available via the following url:

/api/v1/sites/store

It has the following parameters:

key type required example
domain String yes example.com
channel_id String yes 8ca1e533-49d5-497a-93f0-1d5ecd79949d
route String maybe [email protected]

The following is an example response:

{
    "id": "8ca40c9a-866f-44bd-84e4-5a93a745f9f7",
    "status": "The site has been created"
}

Update - Update A Site

This API is available via the following url:

/api/v1/sites/update

It has the following parameters:

key type required example
id String yes 8ca1e533-49d5-497a-93f0-1d5ecd79949d
channel_id String yes 8ca1e533-49d5-497a-93f0-1d5ecd79949d
route String maybe [email protected]

A string response is returned indicating that the update took place.

Destroy - Delete A Site

This API is available via the following url:

/api/v1/sites/destroy

It has the following parameters:

key type required example
id String yes 8ca1e533-49d5-497a-93f0-1d5ecd79949d

A string response is returned indicating that the deletion took place.

Verify - Verify A Site

This API is available via the following url:

/api/v1/sites/verify

It has the following parameters:

key type required example
id String yes 8ca1e533-49d5-497a-93f0-1d5ecd79949d

A string response is returned indicating whether the verification succeeded.