新增文档
This commit is contained in:
@@ -1,78 +1,78 @@
|
||||
# API 文档
|
||||
|
||||
## Gerrit API
|
||||
|
||||
### REST API
|
||||
|
||||
Gerrit 提供 REST API 用于程序化访问。
|
||||
|
||||
**基础 URL**: `http://101.43.95.130:8082/a/`
|
||||
|
||||
### 获取变更信息
|
||||
|
||||
```bash
|
||||
curl http://101.43.95.130:8082/a/changes/12345
|
||||
```
|
||||
|
||||
### 获取项目列表
|
||||
|
||||
```bash
|
||||
curl http://101.43.95.130:8082/a/projects/
|
||||
```
|
||||
|
||||
## Gitea API
|
||||
|
||||
### REST API
|
||||
|
||||
Gitea 提供完整的 REST API。
|
||||
|
||||
**基础 URL**: `http://101.43.95.130:3000/api/v1/`
|
||||
|
||||
### 获取用户信息
|
||||
|
||||
```bash
|
||||
curl -H "Authorization: token YOUR_TOKEN" \
|
||||
http://101.43.95.130:3000/api/v1/user
|
||||
```
|
||||
|
||||
### 创建仓库
|
||||
|
||||
```bash
|
||||
curl -X POST \
|
||||
-H "Authorization: token YOUR_TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"name":"my-repo"}' \
|
||||
http://101.43.95.130:3000/api/v1/user/repos
|
||||
```
|
||||
|
||||
## MinIO API
|
||||
|
||||
### S3 兼容 API
|
||||
|
||||
MinIO 完全兼容 Amazon S3 API。
|
||||
|
||||
**端点**: `http://101.43.95.130:9000`
|
||||
|
||||
### 使用 AWS CLI
|
||||
|
||||
```bash
|
||||
aws --endpoint-url http://101.43.95.130:9000 \
|
||||
s3 ls s3://my-bucket
|
||||
```
|
||||
|
||||
## Drone API
|
||||
|
||||
### REST API
|
||||
|
||||
Drone 提供 REST API 用于管理构建和仓库。
|
||||
|
||||
**基础 URL**: `http://101.43.95.130:3000/api/`
|
||||
|
||||
### 触发构建
|
||||
|
||||
```bash
|
||||
curl -X POST \
|
||||
-H "Authorization: Bearer YOUR_TOKEN" \
|
||||
http://101.43.95.130:3000/api/repos/owner/name/builds
|
||||
```
|
||||
|
||||
# API 文档
|
||||
|
||||
## Gerrit API
|
||||
|
||||
### REST API
|
||||
|
||||
Gerrit 提供 REST API 用于程序化访问。
|
||||
|
||||
**基础 URL**: `http://101.43.95.130:8082/a/`
|
||||
|
||||
### 获取变更信息
|
||||
|
||||
```bash
|
||||
curl http://101.43.95.130:8082/a/changes/12345
|
||||
```
|
||||
|
||||
### 获取项目列表
|
||||
|
||||
```bash
|
||||
curl http://101.43.95.130:8082/a/projects/
|
||||
```
|
||||
|
||||
## Gitea API
|
||||
|
||||
### REST API
|
||||
|
||||
Gitea 提供完整的 REST API。
|
||||
|
||||
**基础 URL**: `http://101.43.95.130:3000/api/v1/`
|
||||
|
||||
### 获取用户信息
|
||||
|
||||
```bash
|
||||
curl -H "Authorization: token YOUR_TOKEN" \
|
||||
http://101.43.95.130:3000/api/v1/user
|
||||
```
|
||||
|
||||
### 创建仓库
|
||||
|
||||
```bash
|
||||
curl -X POST \
|
||||
-H "Authorization: token YOUR_TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"name":"my-repo"}' \
|
||||
http://101.43.95.130:3000/api/v1/user/repos
|
||||
```
|
||||
|
||||
## MinIO API
|
||||
|
||||
### S3 兼容 API
|
||||
|
||||
MinIO 完全兼容 Amazon S3 API。
|
||||
|
||||
**端点**: `http://101.43.95.130:9000`
|
||||
|
||||
### 使用 AWS CLI
|
||||
|
||||
```bash
|
||||
aws --endpoint-url http://101.43.95.130:9000 \
|
||||
s3 ls s3://my-bucket
|
||||
```
|
||||
|
||||
## Drone API
|
||||
|
||||
### REST API
|
||||
|
||||
Drone 提供 REST API 用于管理构建和仓库。
|
||||
|
||||
**基础 URL**: `http://101.43.95.130:3000/api/`
|
||||
|
||||
### 触发构建
|
||||
|
||||
```bash
|
||||
curl -X POST \
|
||||
-H "Authorization: Bearer YOUR_TOKEN" \
|
||||
http://101.43.95.130:3000/api/repos/owner/name/builds
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user