Hosts API


Overview

The Hosts API allows creation and deletion of Hosts via the API. These can then be used in Tests.

List

List all the hosts on your account

GET /api/hosts

[
    {
        "id": 20,
        "created_at": "2021-02-13T17:07:34.000000Z",
        "updated_at": "2021-02-13T17:08:14.000000Z",
        "verified": true,
        "url": "walkstory.co",
        "port": 443,
        "protocol": "https"
    },
    {
        "id": 18,
        "created_at": "2021-02-13T16:44:48.000000Z",
        "updated_at": "2021-02-13T16:44:50.000000Z",
        "verified": true,
        "url": "blakey.co",
        "port": 443,
        "protocol": "https"
    }
]

Create

For creating a new host. The host will automatically attempt to be verified afterwards.

POST /api/hosts/create

Variables: 
 - url: The domain name "www.test.com"
 - port: The port "443"
 - protocol: Either "http" or "https"

[
    {
        host_id: 123
    }
]

Delete

For deleting an existing host. Make sure to delete any tests using it beforehand.

POST /api/hosts/delete

Variables: 
 - host_id: the id of the host to delete

{
    "host_id": 123,    
}