# Get response times — API reference

> Returns response times for a monitor.

Source: https://upfour.io/docs/api/monitors/get-response-times

[Developers](https://upfour.io/docs/api.md)/[Monitors](https://upfour.io/docs/api/monitors.md)

Returns response times for a monitor.

GET https://app.upfour.io/v1/monitors/{monitorID}/response_times

scope monitor.read stable returns 200

## Parameters

| Field | Type | Description |
| --- | --- | --- |
| `monitorID` required | uuid | path parameter |

## Returns

A successful request returns `200` with application/json.

Response fields 2 top-level fields

| Field | Type | Description |
| --- | --- | --- |
| `data` | CheckResultPoint[]  · nullable | |
| Each item · 11 fields FieldTypeDescription `connect_ms` integer `dns_ms` integer `is_checker_failure` boolean `is_degraded` boolean `latency_ms` integer `status_code` integer `timestamp` string (date-time) `tls_ms` integer `ttfb_ms` integer `was_successful` boolean `region` string | | |
| `pagination` | Pagination | |
| Pagination · 5 fields FieldTypeDescription `cursor` string  · nullable `has_more` boolean `limit` integer 1–250 `next_cursor` string  · nullable `prev_cursor` string  · nullable | | |

## Errors

Only the errors this operation can return. Every error uses the [same envelope](https://upfour.io/docs/api/responses.md).

| Status | Code | Meaning |
| --- | --- | --- |
| 400 | [bad_request](https://upfour.io/docs/api/errors#code-bad_request) | The request is malformed or fails validation. |
| 404 | [not_found](https://upfour.io/docs/api/errors#code-not_found) | The requested resource does not exist or is outside the caller's scope. |

Every call can also return `unauthorized` (401), `rate_limit_exceeded` (429) or `internal_error` (500 / 502). See [Responses and errors](https://upfour.io/docs/api/responses.md).

[PreviousGet availability](https://upfour.io/docs/api/monitors/get-availability.md) [NextList incidents](https://upfour.io/docs/api/monitors/list-incidents.md)

## Request

### cURL

```bash
curl -s "https://app.upfour.io/v1/monitors/00000000-0000-4000-8000-000000000001/response_times" \
  -H "Authorization: Bearer $UP4_API_KEY"
```

### JavaScript

```javascript
const res = await fetch("https://app.upfour.io/v1/monitors/00000000-0000-4000-8000-000000000001/response_times", {
  headers: {
    Authorization: `Bearer ${process.env.UP4_API_KEY}`,
  },
});
console.log(res.status, await res.json());
```

### Python

```python
import os
import requests

res = requests.get(
    "https://app.upfour.io/v1/monitors/00000000-0000-4000-8000-000000000001/response_times",
    headers={"Authorization": f"Bearer {os.environ['UP4_API_KEY']}"},
)
print(res.status_code, res.json())
```

### Go

```go
package main

import (
	"fmt"
	"io"
	"net/http"
	"os"
)

func main() {
	req, _ := http.NewRequest("GET", "https://app.upfour.io/v1/monitors/00000000-0000-4000-8000-000000000001/response_times", nil)
	req.Header.Set("Authorization", "Bearer "+os.Getenv("UP4_API_KEY"))
	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()
	out, _ := io.ReadAll(res.Body)
	fmt.Println(res.StatusCode, string(out))
}
```

### PHP

```php
<?php
$ch = curl_init("https://app.upfour.io/v1/monitors/00000000-0000-4000-8000-000000000001/response_times");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer " . getenv("UP4_API_KEY"),
    ],
]);
$response = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_RESPONSE_CODE), " ", $response, "\n";
curl_close($ch);
```

## Response

### 200

```json
{
  "data": [
    {
      "connect_ms": 0,
      "dns_ms": 0,
      "is_checker_failure": false,
      "is_degraded": false,
      "latency_ms": 115,
      "status_code": 200,
      "timestamp": "2026-10-27T08:00:00Z",
      "tls_ms": 0,
      "ttfb_ms": 0,
      "was_successful": true
    },
    {
      "connect_ms": 0,
      "dns_ms": 0,
      "is_checker_failure": false,
      "is_degraded": false,
      "latency_ms": 108,
      "status_code": 200,
      "timestamp": "2026-10-27T08:10:00Z",
      "tls_ms": 0,
      "ttfb_ms": 0,
      "was_successful": true
    },
    {
      "connect_ms": 0,
      "dns_ms": 0,
      "is_checker_failure": false,
      "is_degraded": false,
      "latency_ms": 101,
      "status_code": 200,
      "timestamp": "2026-10-27T08:20:00Z",
      "tls_ms": 0,
      "ttfb_ms": 0,
      "was_successful": true
    },
    {
      "connect_ms": 0,
      "dns_ms": 0,
      "is_checker_failure": false,
      "is_degraded": false,
      "latency_ms": 94,
      "status_code": 200,
      "timestamp": "2026-10-27T08:30:00Z",
      "tls_ms": 0,
      "ttfb_ms": 0,
      "was_successful": true
    },
    {
      "connect_ms": 0,
      "dns_ms": 0,
      "is_checker_failure": false,
      "is_degraded": false,
      "latency_ms": 87,
      "status_code": 200,
      "timestamp": "2026-10-27T08:40:00Z",
      "tls_ms": 0,
      "ttfb_ms": 0,
      "was_successful": true
    },
    {
      "connect_ms": 0,
      "dns_ms": 0,
      "is_checker_failure": false,
      "is_degraded": false,
      "latency_ms": 80,
      "status_code": 200,
      "timestamp": "2026-10-27T08:50:00Z",
      "tls_ms": 0,
      "ttfb_ms": 0,
      "was_successful": true
    }
  ],
  "pagination": {
    "cursor": null,
    "has_more": false,
    "limit": 50,
    "next_cursor": null,
    "prev_cursor": null
  }
}
```

### 400

```json
{
  "error": {
    "code": "bad_request",
    "message": "The request is malformed or fails validation.",
    "request_id": "req_…"
  }
}
```

### 404

```json
{
  "error": {
    "code": "not_found",
    "message": "The requested resource does not exist or is outside the caller's scope.",
    "request_id": "req_…"
  }
}
```
