Query Detail
developer/v1/history/queries/:idReturns the complete request and response details for a specific historical API query, identified by its unique query ID (qh_* format). Includes the full request parameters, response summary, HTTP status, latency breakdown, cache status, Cloudflare colo/country metadata, and the originating IP address and user agent.
What It Does
Fetches detailed information about a single API request by its ID. Verifies organization ownership before returning data (queries are scoped to your org). Returns all request metadata including parameters sent, response summary, error codes, performance timing, API key used, trace ID for distributed tracing, and Cloudflare edge location (colo) that served the request.
Why It's Useful
Essential for incident response workflows where you need to reconstruct exactly what happened during a specific API call. Provides the forensic detail needed to differentiate between client-side errors (wrong parameters), server-side issues (5xx errors), and network problems (timeout patterns). The Cloudflare colo metadata helps identify region-specific failures.
Use Cases
Error Root Cause Analysis
A monitoring alert fires for a specific failed API call (request_id from error logs). Retrieve the full query detail to see exact request parameters, the error code returned, response time, and which Cloudflare edge location handled the request to determine if the issue is regional or global.
Reconstruct the full context of any API failure without needing to reproduce it, cutting MTTR significantly.
Response Verification & QA
After deploying a new integration, verify that specific API calls returned the expected data structure and status codes. Compare actual response summaries against expected values in automated test validation.
Validate API integration behavior against real production responses without mocking.
Security Incident Forensics
During a security investigation, retrieve the full audit trail for suspicious API activity — including originating IP address, user agent, API key used, and exact data accessed. Cross-reference with your SIEM for correlation.
Immutable forensic evidence for security incidents, satisfying SOC 2 CC7.3 incident response documentation requirements.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
domain | string | Required | Query ID (qh_* format) from the query history listExample: qh_m1abc123_def456gh |
Response Fields
| Field | Type | Description |
|---|---|---|
query.id | string | Unique query identifier (qh_* format) |
query.endpoint | string | API endpoint path called (e.g., /v1/dns/lookup) |
query.method | string | HTTP method (GET, POST, etc.) |
query.target | string | Target domain or resource queried |
query.request_params | object | Full request parameters sent |
query.status_code | number | HTTP response status code |
query.response_summary | object | Summarized response data |
query.error_code | string | Error code if request failed (null on success) |
query.response_time_ms | number | Total response time in milliseconds |
query.cache_hit | boolean | Whether the response was served from cache |
query.cost_micros | number | Request cost in microcents |
query.request_id | string | Unique request identifier for tracing |
query.trace_id | string | Distributed trace ID (OpenTelemetry compatible) |
query.api_key_id | string | API key that authenticated the request |
query.ip_address | string | Originating client IP address |
query.user_agent | string | Client user agent string |
query.cf_colo | string | Cloudflare edge location (IATA code) that served the request |
query.cf_country | string | Country of the requesting client (ISO 3166-1 alpha-2) |
query.created_at | string | ISO 8601 timestamp of when the query was made |
Code Examples
curl "https://api.edgedns.dev/v1/history/queries/:id" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d "domain=qh_m1abc123_def456gh"const response = await fetch(
'https://api.edgedns.dev/v1/history/queries/:id?domain=qh_m1abc123_def456gh',
{
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
}
);
const data = await response.json();
console.log(data);import requests
response = requests.get(
'https://api.edgedns.dev/v1/history/queries/:id',
headers={'Authorization': 'Bearer YOUR_API_KEY'},
params={
'domain': 'qh_m1abc123_def456gh'
}
)
data = response.json()
print(data)Read the full Query Detail guide
Why it matters, real-world use cases, parameters, response fields, and how to call it from Claude, ChatGPT, or Gemini via MCP.
Read the guide →Related Endpoints
External References
Learn more about the standards and protocols behind this endpoint.
Try This Endpoint
Test the Query Detail endpoint live in the playground.