Getting Started

Servers

Sites

APIs

Need Help…

Pulse APIs - Servers

The server APIs can be used to index, show, create, update or delete a server. They can also be used to add, update or delete a monitor on an existing server, as well as download a copy of the shell script that the server should use to send data to Pulse.

Index - Retrieve All

This API is available via the following url:

/api/v1/servers

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",
            "name": "Et aut ut aut fugiat quae",
            "ip_address": "117.233.94.48",
            "status": "New",
            "time_zone": "Antarctica - McMurdo",
            "channel": "Slack",
            "route": "http://schmitt.com/voluptas"
        },
        {
            "id": "8ca402e8-8ebb-465c-b47e-114145bae8f2",
            "name": "Totam vitae earum et nobi",
            "ip_address": "51.41.148.123",
            "status": "Silent",
            "time_zone": "Asia - Bangkok",
            "channel": "None",
            "route": ""
        }
    ],
    "links": {
        "first": "/api/v1/servers?page=1",
        "last": "/api/v1/servers?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "path": "/api/v1/servers",
        "per_page": 15,
        "to": 4,
        "total": 4
    }
}

Show - Retrieve A Server

This API is available via the following url:

/api/v1/servers/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": "8ca402e8-9808-43b8-93ff-81d75a986b70",
        "name": "Dicta temporibus est maxi",
        "ip_address": "111.119.188.244",
        "status": "Good",
        "time_zone": "Europe - Vilnius",
        "channel": "Webhook",
        "route": "https://www.hane.net/minima-amet",
        "monitors": [
            {
                "id": "8ca402e9-25f7-4338-a287-263a551149db",
                "item": "CPU",
                "threshold": 90,
                "channel": "Slack",
                "route": "http://www.kirlin.biz/"
            },
            {
                "id": "8ca402e9-28da-4b86-9409-391db13a0c30",
                "item": "Memory",
                "threshold": 90,
                "channel": "None"
            },
            {
                "id": "8ca402e9-2c44-4277-b2b0-74280a760b28",
                "item": "Disk Storage",
                "threshold": 90,
                "channel": "Email",
                "route": "[email protected]"
            },
            {
                "id": "8ca402e9-2f59-4413-9820-3b03e718a88b",
                "item": "Inbound Traffic",
                "threshold": 15,
                "channel": "Slack",
                "route": "https://fadel.com/sit-nihil"
            },
            {
                "id": "8ca402e9-3257-4fc3-b446-5bce03dcefbb",
                "item": "Outbound Traffic",
                "threshold": 15,
                "channel": "Webhook",
                "route": "http://www.borer.com/nihil"
            },
            {
                "id": "8ca402e9-35fc-40aa-8156-dd59943da107",
                "item": "MySQL",
                "channel": "None"
            },
            {
                "id": "8ca402e9-393d-4c4b-93e6-884962d065f5",
                "item": "Redis",
                "channel": "Webhook",
                "route": "https://halvorson.org/lauda"
            }
        ]
    }
}

Store - Create A Server

This API is available via the following url:

/api/v1/servers/store

It has the following parameters:

key type required example
name String yes Worker Server #3
ip_address String yes 123.123.123.123
cluster_id String no 8ca1e533-49d5-497a-93f0-1d5ecd79949d
channel_id String yes 8ca1e533-49d5-497a-93f0-1d5ecd79949d
time_zone_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 server has been created"
}

Update - Update A Server

This API is available via the following url:

/api/v1/servers/update

It has the following parameters:

key type required example
id String yes 8ca1e533-49d5-497a-93f0-1d5ecd79949d
name String yes Worker Server #3
ip_address String yes 123.123.123.123
channel_id String yes 8ca1e533-49d5-497a-93f0-1d5ecd79949d
time_zone_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 Server

This API is available via the following url:

/api/v1/servers/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.

Script - Download A Shell Script

This API is available via the following url:

/api/v1/servers/script

It has the following parameters:

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

A string response is returned containing the content of the shell script.

Store Monitor - Attach A Monitor

This API is available via the following url:

/api/v1/monitors/store

It has the following parameters:

key type required example
server_id String yes 8ca1e533-49d5-497a-93f0-1d5ecd79949d
watcher_id String yes 8ca1e533-49d5-497a-93f0-1d5ecd79949d
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 monitor has been created"
}

Update Monitor - Modify A Monitor

This API is available via the following url:

/api/v1/monitors/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
threshold Integer maybe 25
route String maybe [email protected]

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

Destroy Monitor - Detach A Monitor

This API is available via the following url:

/api/v1/monitors/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.

Store Custom Monitor - Attach A Bespoke Monitor

This API is available via the following url:

/api/v1/monitors/bespoke/store

It has the following parameters:

key type required example
server_id String yes 8ca1e533-49d5-497a-93f0-1d5ecd79949d
bespoke_name String yes Backup
bespoke_type Enum yes "Boolean", "Integer" or "Decimal"
bespoke_command String yes echo "Do Something Amazing"
threshold Numeric yes 0, 3, 5.5,
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 monitor has been created"
}

Update Custom Monitor - Modify A Bespoke Monitor

This API is available via the following url:

/api/v1/monitors/bespoke/update

It has the following parameters:

key type required example
id String yes 8ca1e533-49d5-497a-93f0-1d5ecd79949d
bespoke_name String yes Backup
bespoke_type Enum yes "Boolean", "Integer" or "Decimal"
bespoke_command String yes echo "Do Something Amazing"
threshold Numeric yes 0, 3, 5.5,
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.