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

# 影响面分析 - GET /v1/workspaces/:workspace_id/code-repos/:repo_id/impact

> 通过 GET /v1/workspaces/:workspace_id/code-repos/:repo_id/impact 分析某符号的上下游影响路径。最小角色 viewer。

分析某个符号的影响面：沿调用/引用边返回其上游（被谁依赖）或下游（依赖谁）的影响路径。

## 接口

```http theme={null}
GET /v1/workspaces/:workspace_id/code-repos/:repo_id/impact
```

## 认证

`Authorization: Bearer <jwt>` 或 `X-API-Key <sk_...>`。最小角色：**viewer**。

## 路径参数

<ParamField path="workspace_id" type="string" required>
  工作空间 id。
</ParamField>

<ParamField path="repo_id" type="string" required>
  仓库 id。
</ParamField>

## 查询参数

<ParamField query="symbol_id" type="string" required>
  要分析的符号 id。
</ParamField>

<ParamField query="direction" type="string">
  方向：`downstream`（默认，依赖谁）/ `upstream`（被谁依赖）。
</ParamField>

## 响应

响应为一个数组，每个元素为一条影响路径（含经过的符号与边信息）。

## 示例

<RequestExample>
  ```bash cURL theme={null}
  curl "https://memo.ariacompute.cn/v1/workspaces/ws_01a2b3c4d5e6/code-repos/repo_01a2b3c4d5e6/impact?symbol_id=sym_01a2b3c4d5e6&direction=downstream" \
    -H "Authorization: Bearer <jwt>"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  [
    {
      "symbol_id": "sym_01a2b3c4d5e6",
      "name": "RegisterRoutes",
      "relations": [
        { "to": "sym_bb", "relation": "call" }
      ]
    }
  ]
  ```
</ResponseExample>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.