> ## Documentation Index
> Fetch the complete documentation index at: https://www.octoparse.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get upstream call detail

> Read the full request and response payload for one upstream call.

**`GET`** `https://api-datahub.octoparse.com/v1/runs/{run_id}/upstream-calls/{call_id}`

Authentication: API key required, and only the app author (publisher) may call it. Everyone else gets `404`.

Full capture for one trail entry: request (query / body) and response body. Oversized response bodies are truncated on write; see `response_truncated`. Auth rules match the list endpoint.

## Request

### Path parameters

<ParamField path="run_id" type="string" required>
  Debug run id.
</ParamField>

<ParamField path="call_id" type="integer" required>
  Trail entry id from `items[].call_id` on the list endpoint.
</ParamField>

### Example request

```bash theme={null}
curl \
  -H "Authorization: Bearer $OCTOPARSE_API_KEY" \
  "https://api-datahub.octoparse.com/v1/runs/run_c62bc0fb8df2/upstream-calls/1"
```

## Response

### 200 success

```json theme={null}
{
  "data": {
    "call_id": 0,
    "attempt": 0,
    "seq": 0,
    "stage": "string",
    "method": "string",
    "url": "string",
    "status_code": 0,
    "error": "string",
    "duration_ms": 0,
    "response_truncated": false,
    "created_at": "string",
    "request": {},
    "response_body": "string"
  }
}
```

The payload is wrapped in `data`. Fields:

<ResponseField name="call_id" type="integer" required>
  —
</ResponseField>

<ResponseField name="attempt" type="integer" required>
  —
</ResponseField>

<ResponseField name="seq" type="integer" required>
  —
</ResponseField>

<ResponseField name="stage" type="string" required>
  —
</ResponseField>

<ResponseField name="method" type="string" required>
  —
</ResponseField>

<ResponseField name="url" type="string" required>
  —
</ResponseField>

<ResponseField name="status_code" type="integer">
  —
</ResponseField>

<ResponseField name="error" type="string">
  —
</ResponseField>

<ResponseField name="duration_ms" type="integer">
  —
</ResponseField>

<ResponseField name="response_truncated" type="boolean">
  Whether the response body was truncated on write.
</ResponseField>

<ResponseField name="created_at" type="string" required>
  —
</ResponseField>

<ResponseField name="request" type="object">
  Request content (query / headers / body; sensitive values redacted).
</ResponseField>

<ResponseField name="response_body" type="string">
  Upstream response body.
</ResponseField>

### Errors

| HTTP | `code`                     | `category`  | Description                                                                                                                                  |
| ---- | -------------------------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| 401  | `unauthorized`             | `forbidden` | Missing or invalid API key.                                                                                                                  |
| 404  | `upstream-calls-not-found` | `not_found` | Only debug runs (`run_kind=test`) keep an upstream-call trail. Production runs, other people’s runs, and missing runs all return this error. |

Error responses use `{"error": {code, category, message, retryable}}`. See <a href="/docs/en/datahub/api/reference/introduction#errors">Errors</a>.

## Client libraries

The Python and JavaScript SDKs do not wrap this endpoint yet. Call REST directly.
