Get test
const url = 'https://testomato.com/api/test/5e9602e7a39e5a46428b457f';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://testomato.com/api/test/5e9602e7a39e5a46428b457f \ --header 'Authorization: Bearer <token>'Retrieve Checks (referred to as tests in API endpoints) by unique test ID
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”A unique test ID
Example
5e9602e7a39e5a46428b457fResponses
Section titled “Responses”Test response
A group of individual checks
object
Check id
Area ID
Name of check
URL of check
Check notice
Test flags e.g. configured
object
object
Type of check. Accepted values:
- Plain content: text, html, status, header, location, title, meta-description
- Open Graph: meta-og:title, meta-og:description, meta-og:image, meta-og:type, meta-og:url, meta-og:site_name, meta-og:locale, meta-og:updated_time, meta-og:logo
- Article: meta-article:modified_time, meta-article:published_time, meta-article:publisher, meta-article:section, meta-article:tag
- Twitter: meta-twitter:title, meta-twitter:image, meta-twitter:description, meta-twitter:card, meta-twitter:site, meta-twitter:creator
- Item prop: meta-itemprop:name, meta-itemprop:author, meta-itemprop:description, meta-itemprop:image
Operators can be:
eq— equal tosub— contains!sub— does not containmatch— exact match!match— does not matchxpath— XPath checks.
Value that will be used for the check.
Origin of the check.
Optional parameter if the check uses a template.
Order of the check
object
Size of the response (may be false in case of an error)
List of redirections
object
Template ID if any
Template variables if any
object
Allow HTTP/1 requests only
Allow only IPv6 request
Do not accept gzip encoding
Do not follow redirects
Extra HTTP headers separated
Example
{ "id": "50a9f73014db3ae812000234", "enabled": true, "areaId": "55ae166c25b395537a8b6030", "name": "Homepage", "url": "https://testomato.com", "notice": "", "type": "homepage", "run": "completed", "flags": [ "configured" ], "status": { "status": "ok", "rules": [ { "type": "text", "op": "eq", "val": 123456, "origin": "check" } ], "response": { "status": 200, "httpStatus": 200, "baseUrl": "https://testomato.com", "contentType": "text/html", "httpHeader": ":status: 200\r\nserver: nginx\r\ndate: Mon, 10 Oct 2022 15:04:05 GMT\r\ncontent-type: text/html;", "processTime": 0.037, "size": false, "timing": [ { "metrics": "DNS Lookup", "value": 1 } ] } }, "templateId": "", "templateVars": [], "options": { "2": false, "6": false, "g": false, "l": false, "w": "" }}The API token is missing, malformed or expired. Request a new one from
POST /api/authenticate.
object
Error message text
Error code number
Example
{ "message": "Access denied! Please log in to access this resource.", "code": 401, "ok": false, "error": true}The token is valid but the operation is not allowed. Two distinct causes:
- the subscription plan does not include API access — every endpoint returns this, regardless of the resource
- the account lacks the required role on the project — reading needs
read, changing checks needseditTests, and so on. See Project permissions.
object
Error message text
Error code number
Example
{ "message": "Sorry! Your current plan does not support access to Testomato API.", "code": 403, "ok": false, "error": true}