Run a TTFB test

POST /v1/ttfb-tests

Runs a new TTFB test for a region.

Body

This is the TTFB test body object

  • url string

    The url of the webpage

  • region string

    Values are asia, america, or europe.

Responses

POST /v1/ttfb-tests
curl \
 -X POST https://api.speedvitals.com/v1/ttfb-tests \
 -H "X-API-KEY: $API_KEY" \
 -H "Content-Type: application/json" \
 -d '{"url":"https://speedvitals.com","region":"asia"}'
Request example
{
  "url": "https://speedvitals.com",
  "region": "asia"
}
Response example (201)
{
  "value": {
    "url": "https://speedvitals.com",
    "region": "america",
    "result": [
      {
        "location_id": "del",
        "location_name": "Delhi",
        "status": "success",
        "data": {
          "timings": {
            "dns_lookup": 2,
            "server_processing": 18,
            "tcp_connection": 10,
            "tls_handshake": 25,
            "total": 56,
            "ttfb": 55
          },
          "http_version": 2,
          "http_status": 200,
          "response_headers": {
            "accept-ranges": "bytes",
            "age": 520141,
            "cache-control": "max-age=604800",
            "vary": "Accept-Encoding",
            "x-cache": "HIT"
          }
        },
        "error": null
      },
      "{...}",
      "{...}"
    ]
  }
}
Response example (400)
{
  "code": "string",
  "message": "string"
}
Response example (402)
{
  "code": "string",
  "message": "string"
}