GitHub Repos Get Branch

1 credits/call
ae_github_repos_get_branch

View details about a specific branch in a GitHub repository, including its latest commit and protection settings.

Productivity
1 credits/call

Pricing

1 credits/call
ConditionCharge
Each call1 credits/call

Parameters

Optional parameters use the platform defaults when omitted.

ParameterTypeRequiredDescriptionDefault
repostringYesThe name of the repository without the `.git` extension. The name is not case sensitive.—
ownerstringYesThe account owner of the repository. The name is not case sensitive.—
branchstringYesThe name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql).—

Invocation example

Copy the request and explore its response example.

POST/agent-api/v1/tool/executeX-Api-Key
Request coderequest.sh
curl --request POST \
  --url 'https://agentearth.ai/agent-api/v1/tool/execute?tool_name=ae_github_repos_get_branch' \
  --header "X-Api-Key: $AGENTEARTH_API_KEY" \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "params": {
    "branch": "master",
    "owner": "linyangkai01",
    "repo": "images-qwen3vl-annotation"
  }
}'
Response exampleresponse.json
JSONPartial content
{
  "_links": {
    "html": "https://github.com/linyangkai01/images-qwen3vl-annotation/tree/master",
    "self": "https://api.github.com/repos/linyangkai01/images-qwen3vl-annotation/branches/master"
  },
  "commit": {
    "author": {
      "avatar_url": "https://avatars.githubusercontent.com/u/106142495?v=4",
      "events_url": "https://api.github.com/users/linyangkai01/events{/privacy}",
      "followers_url": "https://api.github.com/users/linyangkai01/followers",
      "id": 106142495,
      "type": "User",
      "url": "https://api.github.com/users/linyangkai01"
    },
    "comments_url": "https://api.github.com/repos/linyangkai01/images-qwen3vl-annotation/commits/fde38af86face05e68e025efdc9be0428c936584/comments",
    "commit": {
      "author": {
        "date": "2026-09-26T10:14:04Z",
        "email": "[REDACTED]",
        "name": "linyangkai"
      },
      "comment_count": 0,
      "committer": {
        "date": "2026-09-26T10:14:04Z",
        "email": "[REDACTED]",
        "name": "linyangkai"
      },
      "message": "fix: 修正 PROJECT 方案中 2 处事实错误(基于独立实测)\n\nA1 · P1「私有 VLM 端点 403,最大风险」→ 改为「✅ 正常」\n   实测证据:用项目代码调用成功、检出 3 个目标。\n   403 系 curl 手工构造请求时 token 少读 3 字符所致,非端点问题。\n   同时修正「优化 4」的前提 —— 该优化仍值得做,但理由改为\n   架构解耦 + 离线可测性,而非「当前硬依赖已失效」。\n   并新增通用教训:探测外部服务必须用项目自己的调用路径。\n\nA2 · P3「相机静止",
      "tree": {
        "sha": "fa2e945038c9e0bfcadd6f3ca6776094cc2181e3",
        "url": "https://api.github.com/repos/linyangkai01/images-qwen3vl-annotation/git/trees/fa2e945038c9e0bfcadd6f3ca6776094cc2181e3"
      },
      "url": "https://api.github.com/repos/linyangkai01/images-qwen3vl-annotation/git/commits/fde38af86face05e68e025efdc9be0428c936584"
    },
    "committer": {
      "avatar_url": "https://avatars.githubusercontent.com/u/106142495?v=4",
      "events_url": "https://api.github.com/users/linyangkai01/events{/privacy}",
      "followers_url": "https://api.github.com/users/linyangkai01/followers",
      "id": 106142495,
      "type": "User",
      "url": "https://api.github.com/users/linyangkai01"
    },
    "html_url": "https://github.com/linyangkai01/images-qwen3vl-annotation/commit/fde38af86face05e68e025efdc9be0428c936584",
    "url": "https://api.github.com/repos/linyangkai01/images-qwen3vl-annotation/commits/fde38af86face05e68e025efdc9be0428c936584"
  },
  "name": "master",
  "protected": false,
  "protection": {
    "enabled": false,
    "required_status_checks": {
      "checks": [],
      "contexts": [],
      "enforcement_level": "off"
    }
  },
  "protection_url": "https://api.github.com/repos/linyangkai01/images-qwen3vl-annotation/branches/master/protection"
}

This example shows part of the response. Copied content is valid JSON.