Hosts API


Overview

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

{warning} All Hosts must pass validation to be used!

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. Remember to check the requirements around validating hosts. If your validation fails we will automatically retry every 10 minutes.

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, or the request will return an error.

POST /api/hosts/delete

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

{
    "host_id": 123,    
}

Validation

All hosts must be validated in order to run load tests against them. Learn about validation in the Hosts documentation