curl -X GET "https://api.apitraffic.io/v1/accounts/acc_abc123def456ghi789jkl012/buckets/bkt_xyz789uvw012rst345abc/requests" \
  -H "Authorization: Bearer your-jwt-token"
{
  "hasMore": false,
  "records": [
    {
      "sid": "req_abc123def456ghi789jkl012mno",
      "bucketSid": "bkt_xyz789uvw012rst345abc",
      "environmentSid": "env123",
      "contextSid": null,
      "direction": "in",
      "note": null,
      "createdAt": "2023-12-01T10:30:00.000Z",
      "receivedAt": "2023-12-01T10:30:00.100Z",
      "firewall": {
        "blocked": false
      },
      "request": {
        "host": "api.example.com",
        "method": "GET",
        "path": "/users/123",
        "port": 443,
        "url": "https://api.example.com/users/123",
        "queryString": {},
        "headers": {
          "user-agent": "Mozilla/5.0",
          "accept": "application/json"
        },
        "body": null,
        "contentType": null,
        "size": 0
      },
      "response": {
        "statusCode": 200,
        "headers": {
          "content-type": "application/json",
          "content-length": "156"
        },
        "size": 156,
        "body": {
          "id": 123,
          "name": "John Doe",
          "email": "john@example.com"
        },
        "contentType": "application/json"
      },
      "timings": {
        "duration": 245,
        "start": 1701423000000,
        "end": 1701423000245,
        "lookup": 12,
        "socket": 25,
        "upload": 30,
        "connect": 45,
        "response": 200
      }
    }
  ]
}

List Requests

Retrieve all requests captured in a specific bucket.

Path Parameters

accountSid
string
required
Account identifier (format: acc_ followed by 27 alphanumeric characters)
bucketSid
string
required
Bucket identifier

Headers

Authorization
string
required
Bearer token for authentication

Response

hasMore
boolean
Indicates if there are more records to paginate through
records
array
curl -X GET "https://api.apitraffic.io/v1/accounts/acc_abc123def456ghi789jkl012/buckets/bkt_xyz789uvw012rst345abc/requests" \
  -H "Authorization: Bearer your-jwt-token"
{
  "hasMore": false,
  "records": [
    {
      "sid": "req_abc123def456ghi789jkl012mno",
      "bucketSid": "bkt_xyz789uvw012rst345abc",
      "environmentSid": "env123",
      "contextSid": null,
      "direction": "in",
      "note": null,
      "createdAt": "2023-12-01T10:30:00.000Z",
      "receivedAt": "2023-12-01T10:30:00.100Z",
      "firewall": {
        "blocked": false
      },
      "request": {
        "host": "api.example.com",
        "method": "GET",
        "path": "/users/123",
        "port": 443,
        "url": "https://api.example.com/users/123",
        "queryString": {},
        "headers": {
          "user-agent": "Mozilla/5.0",
          "accept": "application/json"
        },
        "body": null,
        "contentType": null,
        "size": 0
      },
      "response": {
        "statusCode": 200,
        "headers": {
          "content-type": "application/json",
          "content-length": "156"
        },
        "size": 156,
        "body": {
          "id": 123,
          "name": "John Doe",
          "email": "john@example.com"
        },
        "contentType": "application/json"
      },
      "timings": {
        "duration": 245,
        "start": 1701423000000,
        "end": 1701423000245,
        "lookup": 12,
        "socket": 25,
        "upload": 30,
        "connect": 45,
        "response": 200
      }
    }
  ]
}

Get Request

Retrieve details of a specific request.

Path Parameters

accountSid
string
required
Account identifier
bucketSid
string
required
Bucket identifier
requestSid
string
required
Request identifier

Headers

Authorization
string
required
Bearer token for authentication

Response

Returns a single request object with the same structure as described in the List Requests response.
curl -X GET "https://api.apitraffic.io/v1/accounts/acc_abc123def456ghi789jkl012/buckets/bkt_xyz789uvw012rst345abc/requests/req_abc123def456ghi789jkl012mno" \
  -H "Authorization: Bearer your-jwt-token"
{
  "sid": "req_abc123def456ghi789jkl012mno",
  "bucketSid": "bkt_xyz789uvw012rst345abc",
  "environmentSid": "env123",
  "contextSid": null,
  "direction": "in",
  "note": null,
  "createdAt": "2023-12-01T10:30:00.000Z",
  "receivedAt": "2023-12-01T10:30:00.100Z",
  "firewall": {
    "blocked": false
  },
  "request": {
    "host": "api.example.com",
    "method": "GET",
    "path": "/users/123",
    "port": 443,
    "url": "https://api.example.com/users/123",
    "queryString": {},
    "headers": {
      "user-agent": "Mozilla/5.0",
      "accept": "application/json"
    },
    "body": null,
    "contentType": null,
    "size": 0
  },
  "response": {
    "statusCode": 200,
    "headers": {
      "content-type": "application/json",
      "content-length": "156"
    },
    "size": 156,
    "body": {
      "id": 123,
      "name": "John Doe",
      "email": "john@example.com"
    },
    "contentType": "application/json"
  },
  "timings": {
    "duration": 245,
    "start": 1701423000000,
    "end": 1701423000245,
    "lookup": 12,
    "socket": 25,
    "upload": 30,
    "connect": 45,
    "response": 200
  }
}

Update Request

Update details of a specific request (typically used to add notes or modify metadata).

Path Parameters

accountSid
string
required
Account identifier
bucketSid
string
required
Bucket identifier
requestSid
string
required
Request identifier

Headers

Authorization
string
required
Bearer token for authentication

Request Body

note
string
Add or update notes for the request

Response

Returns the updated request object.
curl -X PUT "https://api.apitraffic.io/v1/accounts/acc_abc123def456ghi789jkl012/buckets/bkt_xyz789uvw012rst345abc/requests/req_abc123def456ghi789jkl012mno" \
  -H "Authorization: Bearer your-jwt-token" \
  -H "Content-Type: application/json" \
  -d '{
    "note": "This request was flagged for review"
  }'
{
  "sid": "req_abc123def456ghi789jkl012mno",
  "bucketSid": "bkt_xyz789uvw012rst345abc",
  "environmentSid": "env123",
  "contextSid": null,
  "direction": "in",
  "note": "This request was flagged for review",
  "createdAt": "2023-12-01T10:30:00.000Z",
  "receivedAt": "2023-12-01T10:30:00.100Z",
  "firewall": {
    "blocked": false
  },
  "request": {
    "host": "api.example.com",
    "method": "GET",
    "path": "/users/123",
    "port": 443,
    "url": "https://api.example.com/users/123",
    "queryString": {},
    "headers": {
      "user-agent": "Mozilla/5.0",
      "accept": "application/json"
    },
    "body": null,
    "contentType": null,
    "size": 0
  },
  "response": {
    "statusCode": 200,
    "headers": {
      "content-type": "application/json",
      "content-length": "156"
    },
    "size": 156,
    "body": {
      "id": 123,
      "name": "John Doe",
      "email": "john@example.com"
    },
    "contentType": "application/json"
  },
  "timings": {
    "duration": 245,
    "start": 1701423000000,
    "end": 1701423000245,
    "lookup": 12,
    "socket": 25,
    "upload": 30,
    "connect": 45,
    "response": 200
  }
}

Delete Request

Delete a specific request from the bucket.
This action is irreversible. The request data will be permanently deleted.

Path Parameters

accountSid
string
required
Account identifier
bucketSid
string
required
Bucket identifier
requestSid
string
required
Request identifier

Headers

Authorization
string
required
Bearer token for authentication

Response

sid
string
ID of the deleted request
deleted
boolean
Flag indicating the request was successfully deleted
curl -X DELETE "https://api.apitraffic.io/v1/accounts/acc_abc123def456ghi789jkl012/buckets/bkt_xyz789uvw012rst345abc/requests/req_abc123def456ghi789jkl012mno" \
  -H "Authorization: Bearer your-jwt-token"
{
  "sid": "req_abc123def456ghi789jkl012mno",
  "deleted": true
}