Skip to main content
GitHub 文档
Version:
Free, Pro, & Team
搜索 GitHub Docs
REST API
/
操作
All products
REST API
API Version:
2022-11-28 (latest)
快速入门
概述
Comparing GitHub's APIs
REST API 中的资源
Rate limits
API 版本
媒体类型
身份验证
确保 API 凭据安全
故障排除
Libraries
OpenAPI 描述
议题事件类型
GitHub 事件类型
适用于 GitHub Apps 安装令牌的终结点
适用于 GitHub Apps 用户令牌的终结点
细化 PAT 的终结点
GitHub 应用的权限
细化 PAT 的权限
重大更改
Guides
使用 API
使用 JavaScript 编写脚本
使用 Ruby 编写脚本
为用户发现资源
交付部署
将数据渲染为图形
处理注释
分页
构建 CI 服务器
最佳实践
入门 - Git 数据库
开始 - 检查
加密机密
操作
Artifacts
缓存
OIDC
权限
机密
自托管运行程序
变量
工作流程作业
工作流运行
工作流
活动
事件
源
通知
标星
关注中
应用
GitHub 应用
安装
市场
OAuth 授权
Webhook
计费
计费
分支
分支
受保护的分支
检查
检查运行
检查套件
教室
教室
代码扫描
代码扫描
行为准则
行为准则
Codespaces
Codespaces
组织
组织机密
机
存储库机密
用户机密
协作者
协作者
邀请
提交
提交
提交注释
提交状态
Copilot
Copilot 企业版
Dependabot
警报
机密
依赖项关系图
依赖项检查
依赖项提交
软件材料清单 (SBOM)
部署密钥
部署密钥
部署
部署分支策略
部署
环境
保护规则
部署状态
表情符号
表情符号
Gists
Gists
注释
Git 数据库
Blob
提交
reference
标记
Trees
Gitignore
Gitignore
交互
组织
存储库
用户
问题
问题
受理人
注释
事件
标签
里程碑
时间线
许可证
许可证
Markdown
Markdown
元数据
元数据
指标
社区
统计信息
交通
迁移
组织
源导入
用户
组织
阻止用户
Custom properties
成员
组织
外部协作者
个人访问令牌
规则套件
规则
安全经理
Webhook
包
包
页
页
Projects (classic)
Boards
卡片
协作者
列
拉取
拉取
评价注释
审查请求
审阅
速率限制
速率限制
反应
反应
发行版本
发行版本
发布资产
存储库
自动链接
目录
Custom properties
前叉
存储库
规则套件
规则
标记
Webhook
搜索
搜索
机密扫描
机密扫描
安全通知
全局安全公告
存储库安全公告
Teams
Teams
讨论评论
讨论
成员
用户
用户
阻止用户
电子邮件
关注者
GPG 密钥
Git SSH 密钥
SSH 签名密钥
社交帐户
The REST API is now versioned.
For more information, see "
About API versioning
."
REST API
/
操作
操作
使用 REST API 与组织或存储库的 GitHub Actions 交互。
Artifacts
List artifacts for a repository
Get an artifact
Delete an artifact
Download an artifact
List workflow run artifacts
Cache
Get GitHub Actions cache usage for an organization
List repositories with GitHub Actions cache usage for an organization
Get GitHub Actions cache usage for a repository
List GitHub Actions caches for a repository
Delete GitHub Actions caches for a repository (using a cache key)
Delete a GitHub Actions cache for a repository (using a cache ID)
Oidc
Get the customization template for an OIDC subject claim for an organization
Set the customization template for an OIDC subject claim for an organization
Get the customization template for an OIDC subject claim for a repository
Set the customization template for an OIDC subject claim for a repository
Permissions
Get GitHub Actions permissions for an organization
Set GitHub Actions permissions for an organization
List selected repositories enabled for GitHub Actions in an organization
Set selected repositories enabled for GitHub Actions in an organization
Enable a selected repository for GitHub Actions in an organization
Disable a selected repository for GitHub Actions in an organization
Get allowed actions and reusable workflows for an organization
Set allowed actions and reusable workflows for an organization
Get default workflow permissions for an organization
Set default workflow permissions for an organization
Get GitHub Actions permissions for a repository
Set GitHub Actions permissions for a repository
Get the level of access for workflows outside of the repository
Set the level of access for workflows outside of the repository
Get allowed actions and reusable workflows for a repository
Set allowed actions and reusable workflows for a repository
Get default workflow permissions for a repository
Set default workflow permissions for a repository
Secrets
List organization secrets
Get an organization public key
Get an organization secret
Create or update an organization secret
Delete an organization secret
List selected repositories for an organization secret
Set selected repositories for an organization secret
Add selected repository to an organization secret
Remove selected repository from an organization secret
List repository organization secrets
List repository secrets
Get a repository public key
Get a repository secret
Create or update a repository secret
Delete a repository secret
List environment secrets
Get an environment public key
Get an environment secret
Create or update an environment secret
Delete an environment secret
Self hosted runners
List self-hosted runners for an organization
List runner applications for an organization
Create configuration for a just-in-time runner for an organization
Create a registration token for an organization
Create a remove token for an organization
Get a self-hosted runner for an organization
Delete a self-hosted runner from an organization
List labels for a self-hosted runner for an organization
Add custom labels to a self-hosted runner for an organization
Set custom labels for a self-hosted runner for an organization
Remove all custom labels from a self-hosted runner for an organization
Remove a custom label from a self-hosted runner for an organization
List self-hosted runners for a repository
List runner applications for a repository
Create configuration for a just-in-time runner for a repository
Create a registration token for a repository
Create a remove token for a repository
Get a self-hosted runner for a repository
Delete a self-hosted runner from a repository
List labels for a self-hosted runner for a repository
Add custom labels to a self-hosted runner for a repository
Set custom labels for a self-hosted runner for a repository
Remove all custom labels from a self-hosted runner for a repository
Remove a custom label from a self-hosted runner for a repository
Variables
List organization variables
Create an organization variable
Get an organization variable
Update an organization variable
Delete an organization variable
List selected repositories for an organization variable
Set selected repositories for an organization variable
Add selected repository to an organization variable
Remove selected repository from an organization variable
List repository organization variables
List repository variables
Create a repository variable
Get a repository variable
Update a repository variable
Delete a repository variable
List environment variables
Create an environment variable
Get an environment variable
Update an environment variable
Delete an environment variable
Workflow jobs
Get a job for a workflow run
Download job logs for a workflow run
List jobs for a workflow run attempt
List jobs for a workflow run
Workflow runs
Re-run a job from a workflow run
List workflow runs for a repository
Get a workflow run
Delete a workflow run
Get the review history for a workflow run
Approve a workflow run for a fork pull request
Get a workflow run attempt
Download workflow run attempt logs
Cancel a workflow run
Review custom deployment protection rules for a workflow run
Force cancel a workflow run
Download workflow run logs
Delete workflow run logs
Get pending deployments for a workflow run
Review pending deployments for a workflow run
Re-run a workflow
Re-run failed jobs from a workflow run
Get workflow run usage
List workflow runs for a workflow
Workflows
List repository workflows
Get a workflow
Disable a workflow
Create a workflow dispatch event
Enable a workflow
Get workflow usage