Get speed tests histogram
client.radar.quality.speed.histogram(SpeedHistogramParams { asn, bucketSize, continent, 5 more } query?, RequestOptionsoptions?): SpeedHistogramResponse { histogram_0, meta }
GET/radar/quality/speed/histogram
Retrieves a histogram from the previous 90 days of Cloudflare Speed Test data, split into fixed bandwidth (Mbps), latency (ms), or jitter (ms) buckets.
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example:
API Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
Example:
The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
Example:
Accepted Permissions (at least one required)
Get speed tests histogram
import Cloudflare from 'cloudflare';
const client = new Cloudflare({
apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted
});
const response = await client.radar.quality.speed.histogram();
console.log(response.histogram_0);{
"result": {
"histogram_0": {
"bandwidthDownload": [
"83681"
],
"bandwidthUpload": [
"181079"
],
"bucketMin": [
"0"
]
},
"meta": {
"bucketSize": 0,
"confidenceInfo": {
"annotations": [
{
"dataSource": "ALL",
"description": "Cable cut in Tonga",
"endDate": "2019-12-27T18:11:19.117Z",
"eventType": "EVENT",
"isInstantaneous": true,
"linkedUrl": "https://example.com",
"startDate": "2019-12-27T18:11:19.117Z"
}
],
"level": 0
},
"dateRange": [
{
"endTime": "2022-09-17T10:22:57.555Z",
"startTime": "2022-09-16T10:22:57.555Z"
}
],
"lastUpdated": "2019-12-27T18:11:19.117Z",
"normalization": "PERCENTAGE",
"totalTests": [
0
],
"units": [
{
"name": "*",
"value": "requests"
}
]
}
},
"success": true
}Returns Examples
{
"result": {
"histogram_0": {
"bandwidthDownload": [
"83681"
],
"bandwidthUpload": [
"181079"
],
"bucketMin": [
"0"
]
},
"meta": {
"bucketSize": 0,
"confidenceInfo": {
"annotations": [
{
"dataSource": "ALL",
"description": "Cable cut in Tonga",
"endDate": "2019-12-27T18:11:19.117Z",
"eventType": "EVENT",
"isInstantaneous": true,
"linkedUrl": "https://example.com",
"startDate": "2019-12-27T18:11:19.117Z"
}
],
"level": 0
},
"dateRange": [
{
"endTime": "2022-09-17T10:22:57.555Z",
"startTime": "2022-09-16T10:22:57.555Z"
}
],
"lastUpdated": "2019-12-27T18:11:19.117Z",
"normalization": "PERCENTAGE",
"totalTests": [
0
],
"units": [
{
"name": "*",
"value": "requests"
}
]
}
},
"success": true
}