API ReferenceCore API
Requests API
Query request history and monitor API usage for specific proxies
Requests API
Query request history and monitor API usage for individual proxies. Request logs are stored regionally based on the proxy's region.
Requests are stored in the same region as the proxy that processed them, ensuring data sovereignty and compliance.
Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/clients/{clientId}/proxies/{proxyId}/requests | List all requests for a proxy |
| GET | /api/clients/{clientId}/proxies/{proxyId}/requests/{requestId} | Get specific request details |
Only GET requests are supported. Request logs are read-only.
List Requests
Get request history for a specific proxy with optional date filtering, status/method/path filtering, and cursor-based pagination. Results are returned newest-first.
Request
GET /api/clients/{clientId}/proxies/{proxyId}/requests?pageSize=100&processedAfter=2024-01-01T00:00:00Z HTTP/1.1
Host: api.requestrocket.com
Authorization: {user_token}Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
processedAfter | string | No | — | Filter to requests processed after this time (ISO 8601 or Unix timestamp) |
processedBefore | string | No | — | Filter to requests processed before this time (ISO 8601 or Unix timestamp) |
anyStatus | number | No | — | Return requests where proxyData.status or targetData.status equals this HTTP status code |
proxyStatus | number | No | — | Return requests where proxyData.status equals this HTTP status code |
targetStatus | number | No | — | Return requests where targetData.status equals this HTTP status code |
method | string | No | — | Filter by HTTP method (case-insensitive). One of GET, POST, PUT, PATCH, DELETE, OPTIONS, HEAD, TRACE |
pathPrefix | string | No | — | Filter to requests where proxyData.apiPath begins with this value (e.g. /api/v1) |
pageSize | number | No | 100 | Number of results per page. Maximum 1000 |
nextToken | string | No | — | Pagination cursor returned by a previous response. Pass this to fetch the next page |
Filtering tips:
- Use
anyStatus=429to find all rate-limited requests regardless of which layer returned the status. - Use
proxyStatus=200combined withtargetStatus=500in separate requests to distinguish gateway successes from upstream failures. pathPrefixis a prefix match —/api/v1matches/api/v1/usersand/api/v1/orders.processedAfterandprocessedBeforeaccept ISO 8601 strings (2026-06-01T00:00:00Z) or Unix timestamps in seconds or milliseconds.
Response
{
"message": "Success",
"totalRequests": 100,
"nextToken": "eyJwS2V5IjoiNmY0MDRiOWUtNjY5Zi00YjZmLTk4YWYtMGM4YTliMDJjNTk0IiwiaW5kZXgiOnsicEtleSI6IjZmNDA0YjllLTY2OWYtNGI2Zi05OGFmLTBjOGE5YjAyYzU5NCIsInByb2Nlc3NlZEF0IjoxNzY1NTE3MjE3NjIxfX0=",
"requests": [
{
"pKey": "6f404b9e-669f-4b6f-98af-0c8a9b02c594",
"sKey": "cbe4b932-262b-4b05-8fee-2a8809709a7f",
"userId": "c95e5458-10a1-7024-e88f-32a6548152f5",
"clientId": "c320b7e5-cf17-4e95-8cd7-eb5cee65d6b9",
"parentId": "c320b7e5-cf17-4e95-8cd7-eb5cee65d6b9",
"processed": false,
"processedAt": 1765517217621,
"TTL": 1773293219,
"proxyData": {
"stage": "qas",
"method": "GET",
"apiPath": "/cat",
"receivedAt": 1765517217621,
"sentAt": 1765517219616,
"duration": 1.995,
"status": 200,
"message": "Request logged",
"arnBase": "",
"apiHeaders": {
"user-agent": "PostmanRuntime/7.49.1",
"accept": "image/*",
"cache-control": "no-cache"
},
"apiParams": {
"position": "center"
}
},
"targetData": {
"sentAt": 1765517217764,
"receivedAt": 1765517219616,
"duration": 1.852,
"status": 200,
"location": null
},
"validationData": {
"proxyExists": true,
"proxyActive": true,
"proxyAuthenticated": true,
"proxyCredentialExists": true,
"proxyCredentialActive": true,
"proxyCredentialRelationship": true,
"proxyCredentialScopeValid": true,
"proxyScopeValid": true,
"targetExists": true,
"targetRelationship": true,
"targetScopeValid": true,
"targetCredentialExists": true,
"targetCredentialActive": true,
"targetCredentialRelationship": true,
"targetCredentialScopeValid": true,
"requestValid": true,
"requestSent": true,
"responseReceived": true,
"systemError": false,
"requestConfigError": false
}
}
]
}Response Fields
| Field | Type | Description |
|---|---|---|
message | string | Response message |
totalRequests | number | Number of requests returned in this page |
nextToken | string | absent | Pagination cursor. Present when more results exist; pass as nextToken query param to fetch the next page |
requests | array | Array of request objects, newest first |
requests[].pKey | string | Proxy ID |
requests[].sKey | string | Request ID (unique identifier for this request) |
requests[].userId | string | User who made the request |
requests[].clientId | string | Client (organisation) ID |
requests[].parentId | string | Parent resource ID (typically the proxy ID) |
requests[].processed | boolean | Whether the request has been fully processed |
requests[].processedAt | number | Unix timestamp (milliseconds) when request was received by proxy |
requests[].TTL | number | Time-to-live (Unix timestamp) for when this log entry expires |
proxyData | object | Data about the proxy stage of the request |
proxyData.stage | string | Deployment stage (e.g., "qas", "prod") |
proxyData.method | string | HTTP method (GET, POST, etc.) |
proxyData.apiPath | string | Request path |
proxyData.receivedAt | number | Timestamp when proxy received the request |
proxyData.sentAt | number | Timestamp when proxy sent response |
proxyData.duration | number | Proxy processing duration (seconds) |
proxyData.status | number | HTTP status code returned by proxy |
proxyData.message | string | Proxy message (e.g., "Request logged", error messages) |
proxyData.apiHeaders | object | Request headers received by proxy |
proxyData.apiParams | object | Query parameters received by proxy |
targetData | object | Data about the target API request |
targetData.sentAt | number | Timestamp when request was sent to target |
targetData.receivedAt | number | Timestamp when response received from target |
targetData.duration | number | Target API response time (seconds) |
targetData.status | number | HTTP status code from target API |
targetData.location | string | Target API location/region |
validationData | object | Validation checks performed on the request |
validationData.proxyExists | boolean | Proxy configuration exists |
validationData.proxyActive | boolean | Proxy is active |
validationData.proxyAuthenticated | boolean | Proxy authentication succeeded |
validationData.proxyScopeValid | boolean | Request passed proxy rule checks |
validationData.targetExists | boolean | Target configuration exists |
validationData.targetScopeValid | boolean | Request passed target rule checks |
validationData.requestValid | boolean | Overall request validation passed |
validationData.requestSent | boolean | Request was sent to target |
validationData.responseReceived | boolean | Response received from target |
Understanding Request Flow:
proxyDatashows how the proxy handled the requesttargetDatashows the target API's response (null if request didn't reach target)validationDataprovides detailed validation checks that can help diagnose failures
Example
// Fetch the first page of 500 error requests from the past week
let url = `https://api.requestrocket.com/api/clients/${clientId}/proxies/${proxyId}/requests`;
const params = new URLSearchParams({
processedAfter: new Date(Date.now() - 7 * 86400_000).toISOString(),
anyStatus: '500',
pageSize: '100',
});
const allRequests = [];
while (url) {
const response = await fetch(`${url}?${params}`, {
headers: { 'Authorization': process.env.USER_TOKEN }
});
const data = await response.json();
allRequests.push(...data.requests);
if (data.nextToken) {
params.set('nextToken', data.nextToken);
} else {
break;
}
}
console.log(`Total 500 errors fetched: ${allRequests.length}`);import requests
from datetime import datetime, timedelta
import os
client_id = "your-client-id"
proxy_id = "your-proxy-id"
base_url = f'https://api.requestrocket.com/api/clients/{client_id}/proxies/{proxy_id}/requests'
headers = {'Authorization': os.getenv('USER_TOKEN')}
params = {
'processedAfter': (datetime.now() - timedelta(days=7)).isoformat(),
'anyStatus': 500,
'pageSize': 100,
}
all_requests = []
while True:
response = requests.get(base_url, params=params, headers=headers)
data = response.json()
all_requests.extend(data.get('requests', []))
next_token = data.get('nextToken')
if not next_token:
break
params['nextToken'] = next_token
print(f"Total 500 errors fetched: {len(all_requests)}")package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
"os"
"time"
)
type Response struct {
Requests []map[string]interface{} `json:"requests"`
TotalRequests int `json:"totalRequests"`
NextToken string `json:"nextToken"`
Message string `json:"message"`
}
func main() {
clientId := "your-client-id"
proxyId := "your-proxy-id"
baseURL := fmt.Sprintf("https://api.requestrocket.com/api/clients/%s/proxies/%s/requests", clientId, proxyId)
oneWeekAgo := time.Now().AddDate(0, 0, -7).Format(time.RFC3339)
params := url.Values{
"processedAfter": {oneWeekAgo},
"anyStatus": {"500"},
"pageSize": {"100"},
}
var allRequests []map[string]interface{}
httpClient := &http.Client{}
for {
req, _ := http.NewRequest("GET", baseURL+"?"+params.Encode(), nil)
req.Header.Set("Authorization", os.Getenv("USER_TOKEN"))
resp, _ := httpClient.Do(req)
body, _ := io.ReadAll(resp.Body)
resp.Body.Close()
var result Response
json.Unmarshal(body, &result)
allRequests = append(allRequests, result.Requests...)
if result.NextToken == "" {
break
}
params.Set("nextToken", result.NextToken)
}
fmt.Printf("Total 500 errors fetched: %d\n", len(allRequests))
}import java.net.http.*;
import java.net.URI;
import java.time.*;
import java.time.format.DateTimeFormatter;
import com.google.gson.*;
import java.util.*;
public class ListRequests {
public static void main(String[] args) throws Exception {
String clientId = "your-client-id";
String proxyId = "your-proxy-id";
String baseUrl = "https://api.requestrocket.com/api/clients/" + clientId + "/proxies/" + proxyId + "/requests";
String oneWeekAgo = LocalDateTime.now().minusWeeks(1).format(DateTimeFormatter.ISO_DATE_TIME);
HttpClient client = HttpClient.newHttpClient();
List<JsonObject> allRequests = new ArrayList<>();
String nextToken = null;
do {
String queryString = "?processedAfter=" + oneWeekAgo + "&anyStatus=500&pageSize=100";
if (nextToken != null) queryString += "&nextToken=" + nextToken;
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(baseUrl + queryString))
.header("Authorization", System.getenv("USER_TOKEN"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
JsonObject json = JsonParser.parseString(response.body()).getAsJsonObject();
json.getAsJsonArray("requests").forEach(r -> allRequests.add(r.getAsJsonObject()));
nextToken = json.has("nextToken") ? json.get("nextToken").getAsString() : null;
} while (nextToken != null);
System.out.println("Total 500 errors fetched: " + allRequests.size());
}
}# First page — 500 errors from the past week
curl -X GET "https://api.requestrocket.com/api/clients/${CLIENT_ID}/proxies/${PROXY_ID}/requests?processedAfter=2026-06-01T00:00:00Z&anyStatus=500&pageSize=100" \
-H "Authorization: ${USER_TOKEN}"
# Next page — pass the nextToken from the previous response
curl -X GET "https://api.requestrocket.com/api/clients/${CLIENT_ID}/proxies/${PROXY_ID}/requests?processedAfter=2026-06-01T00:00:00Z&anyStatus=500&pageSize=100&nextToken=eyJwS2V5Ijoi..." \
-H "Authorization: ${USER_TOKEN}"Get Request Details
Get detailed information about a specific request.
Request
GET /api/clients/{clientId}/proxies/{proxyId}/requests/{requestId} HTTP/1.1
Host: api.requestrocket.com
Authorization: {user_token}Response
{
"message": "Success",
"requests": [
{
"pKey": "550e8400-e29b-41d4-a716-446655440000",
"sKey": "req_123e4567",
"method": "POST",
"path": "/api/users",
"statusCode": 201,
"duration": 245,
"processedAt": 1706025600000,
"requestHeaders": {
"Content-Type": "application/json",
"Authorization": "[REDACTED]"
},
"requestBody": {
"name": "John Doe",
"email": "john@example.com"
},
"responseHeaders": {
"requestrocket-proxy-code": "proxy-access-granted",
"Content-Type": "application/json"
},
"responseBody": {
"id": "usr_789",
"name": "John Doe",
"created": "2024-01-23T10:00:00Z"
}
}
]
}Sensitive headers like Authorization are redacted in request logs for security.
Example
const response = await fetch(
`https://api.requestrocket.com/api/clients/${clientId}/proxies/${proxyId}/requests/${requestId}`,
{
headers: {
'Authorization': process.env.USER_TOKEN
}
}
);
const data = await response.json();
const request = data.requests[0];
console.log(`Request: ${request.method} ${request.path}`);
console.log(`Status: ${request.statusCode}, Duration: ${request.duration}ms`);import requests
import os
client_id = "your-client-id"
proxy_id = "your-proxy-id"
request_id = "your-request-id"
response = requests.get(
f'https://api.requestrocket.com/api/clients/{client_id}/proxies/{proxy_id}/requests/{request_id}',
headers={'Authorization': os.getenv('USER_TOKEN')}
)
data = response.json()
req = data['requests'][0]
print(f"Request: {req['method']} {req['path']}")
print(f"Status: {req['statusCode']}, Duration: {req['duration']}ms")package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"os"
)
type Response struct {
Requests []map[string]interface{} `json:"requests"`
Message string `json:"message"`
}
func main() {
clientId := "your-client-id"
proxyId := "your-proxy-id"
requestId := "your-request-id"
url := fmt.Sprintf("https://api.requestrocket.com/api/clients/%s/proxies/%s/requests/%s",
clientId, proxyId, requestId)
req, _ := http.NewRequest("GET", url, nil)
req.Header.Set("Authorization", os.Getenv("USER_TOKEN"))
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var result Response
json.Unmarshal(body, &result)
request := result.Requests[0]
fmt.Printf("Request: %v %v\n", request["method"], request["path"])
fmt.Printf("Status: %v, Duration: %vms\n", request["statusCode"], request["duration"])
}import java.net.http.*;
import java.net.URI;
import com.google.gson.*;
public class GetRequestDetails {
public static void main(String[] args) throws Exception {
String clientId = "your-client-id";
String proxyId = "your-proxy-id";
String requestId = "your-request-id";
String url = String.format(
"https://api.requestrocket.com/api/clients/%s/proxies/%s/requests/%s",
clientId, proxyId, requestId
);
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.header("Authorization", System.getenv("USER_TOKEN"))
.GET()
.build();
HttpResponse<String> response = client.send(request,
HttpResponse.BodyHandlers.ofString());
JsonObject json = JsonParser.parseString(response.body()).getAsJsonObject();
JsonArray requests = json.getAsJsonArray("requests");
JsonObject req = requests.get(0).getAsJsonObject();
System.out.println("Request: " + req.get("method").getAsString() + " " + req.get("path").getAsString());
System.out.println("Status: " + req.get("statusCode").getAsInt() + ", Duration: " + req.get("duration").getAsInt() + "ms");
}
}curl -X GET "https://api.requestrocket.com/api/clients/${CLIENT_ID}/proxies/${PROXY_ID}/requests/${REQUEST_ID}" \
-H "Authorization: ${USER_TOKEN}"