HeadlessTesting API Documentation
Our REST API provides access to all our data and services in a secure (HTTPS) way.
All REST API calls will return JSON
results.
Our API endpoint is: https://api.headlesstesting.com/v1
Authentication
You can authenticate to our API by providing your API key which you can obtain in the member area.
All requests must be made to our endpoint via HTTPS. You must authenticate for all API requests.
Access your user info
This API call will return the data associated to your account.
curl "https://api.headlesstesting.com/v1/user?token=[YOUR-TOKEN]"
None required
{
"first_name": "Steven",
"last_name": "King",
"seconds": 17745,
"last_login" : "2022-05-19 18:26:03 UTC",
"plan" : "small",
"max_concurrent": 10,
"max_concurrent_mobile": 2,
"company":"companyName",
"street":"companyStreet",
"city":"companyCity",
"country":"companyCountry",
"vat":"ifInEurope"
}
Edit your user info
Edit your personal data with this API call.
curl "https://api.headlesstesting.com/v1/user?token=[YOUR-TOKEN]" \
-X PUT \
-d "user[first_name]=new"
- (string) first_name
- (string) last_name
{
"first_name": "Steven",
"last_name": "King",
"seconds": 17745,
"last_login" : "2022-05-19 18:26:03 UTC",
"plan" : "small",
"max_concurrent": 10,
"max_concurrent_mobile": 2,
"company":"companyName",
"street":"companyStreet",
"city":"companyCity",
"country":"companyCountry",
"vat":"ifInEurope"
}
Fetch your tests
This call will return all tests you or your team-members ran.
You can paginate the result with offset
and count
.
curl "https://api.headlesstesting.com/v1/tests?token=[YOUR-TOKEN]&offset=0&count=10"
- (int) offset (optional) (default 0) - paginate tests starting from this number
- (int) count (optional) (default 10, max 500) - number of tests to fetch
{
"data":[
{
"created_at":"2020-02-28T12:51:27.000Z",
"completed_at":"2020-02-28T12:51:28.000Z",
"state":"COMPLETE",
"name":"unnamed test 1582894287075",
"session_id":"1582894287075",
"success":false,
"browser":"chrome",
"browser_version":"80",
"duration":4
},
],"meta":{
"offset":0,
"count":1,
"total":1
}}
Details for a specific test
Fetch all details for a single test.
curl "https://api.headlesstesting.com/v1/tests/[session-id]?token=[YOUR-TOKEN]&offset=0&count=10"
- (int) sessionId - the ID identifying this test
{
"created_at":"2020-02-28T12:51:27.000Z",
"completed_at":"2020-02-28T12:51:28.000Z",
"name":"unnamed test 1582894287075",
"session_id":"1582894287075",
"success":false,
"state":"COMPLETE",
"unknown":true,
"browser":"chrome",
"browser_version":"80",
"duration":4
}
- 404 Not found - Test not found
Update a test
Update a test. You can use this to change the name, test status (passed/failed) and more.
curl "https://api.headlesstesting.com/v1/tests/[session-id]?token=[YOUR-TOKEN]" \
-X PUT \
-d "test[success]=1"
- (string) id - a unique string identifying your test (= Selenium sessionId, a UUID)
- (boolean) test[success] - indicating if the test was successful
- (string) test[name] - the name of your test
{
"success" : true
}
- 404 Not found - Test not found
Delete a test
Deletes a single test.
curl "https://api.headlesstesting.com/v1/tests/[session-id]?token=[YOUR-TOKEN]" \
-X DELETE
- (string) id - a unique identifier identifying your test
{
"success" : true
}
- 404 Not found - Test not found