API reference
API - Hosts
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/v2/hosts
[
{
"id": 20,
"created_at": "2021-02-13T17:07:34.000000Z",
"updated_at": "2021-02-13T17:08:14.000000Z",
"verified": true,
"url": "example1.com",
"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": "example2.com",
"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/v2/hosts/create
{
"url": "www.test.com",
"port": "443",
"protocol": "https"
}
Variables:
- url: The domain name "www.test.com"
- port: The port "443"
- protocol: Either "http" or "https"
Response:
{
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.
DELETE /api/v2/hosts/{host_id}
{
"host_id": 123,
"status": "Deleted"
}
Validation
All hosts must be validated in order to run load tests against them. Learn about validation in the Hosts documentation