You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何通过API获取ZenHub中与Epic关联的Issues?

关于ZenHub获取Epic关联Issues的API方案

REST API 方案

有专门的REST API可以获取Epic关联的Issues,使用GET请求,端点格式为:

/p1/repositories/{repository_id}/epics/{epic_id}/issues

请求需要携带有效的ZenHub认证信息(比如API Token),返回结果会包含该Epic下所有关联Issue的详细数据,包括Issue ID、标题、状态、所属仓库等信息。

GraphQL API 方案

针对ZenHub Enterprise无法使用Explorer的情况,可以通过两种方式解决schema查询问题:

  • 直接联系ZenHub企业客户支持,请求提供完整的GraphQL schema文档,或者申请启用内部的GraphQL Explorer权限。
  • 使用GraphQL自省查询来获取schema结构,发送如下查询请求到ZenHub Enterprise的GraphQL端点:
query IntrospectionQuery {
  __schema {
    types {
      name
      fields {
        name
        type {
          name
          kind
          ofType {
            name
            kind
          }
        }
      }
    }
  }
}

拿到schema后,就可以构造查询Epic关联Issues的语句,示例大致结构如下:

query GetEpicIssues {
  epic(id: "YOUR_EPIC_ID") {
    issues {
      nodes {
        id
        title
        state
      }
    }
  }
}

内容的提问来源于stack exchange,提问作者k239430

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.11 12:35:19