Documentation Index
Fetch the complete documentation index at: https://docs.qoder.com/llms.txt
Use this file to discover all available pages before exploring further.
GET /v1/environments
列出当前账户下所有未归档的环境,支持分页。
请求头
| 头部 | 必选 | 说明 |
|---|
Authorization | 是 | Bearer <PAT> |
查询参数
| 参数 | 类型 | 必选 | 说明 |
|---|
limit | integer | 否 | 每页返回数量(默认 20) |
after_id | string | 否 | 游标分页:返回此 ID 之后的记录 |
before_id | string | 否 | 游标分页:返回此 ID 之前的记录 |
完整分页规范详见 分页。
示例请求
curl -s -X GET "https://openapi.qoder.sh/api/v1/cloud/environments" \
-H "Authorization: Bearer $QODER_PAT"
示例响应
HTTP 200 OK
{
"data": [
{
"id": "env_019e3bb39b6774d8878cd0b9d237574b",
"type": "environment",
"name": "doc-test-env",
"description": "",
"status": "ready",
"config": {
"type": "cloud",
"networking": {
"type": "limited"
},
"packages": {
"apt": ["curl"]
}
},
"created_at": "2026-05-18T15:28:07.017808Z",
"updated_at": "2026-05-18T15:28:07.017808Z"
},
{
"id": "env_019e2590d33f711fabf42f2857cecd8a",
"type": "environment",
"name": "default",
"description": "",
"status": "ready",
"config": {
"type": "cloud",
"networking": {
"allow_package_managers": true,
"type": "limited"
},
"packages": {}
},
"created_at": "2026-05-14T08:18:28.800813Z",
"updated_at": "2026-05-14T08:18:28.800813Z"
}
],
"first_id": "env_019e3bb39b6774d8878cd0b9d237574b",
"has_more": false,
"last_id": "env_019e2590d33f711fabf42f2857cecd8a"
}
响应字段
| 字段 | 类型 | 说明 |
|---|
data | array | 环境对象数组 |
first_id | string | 当前页第一条记录的 ID |
last_id | string | 当前页最后一条记录的 ID |
has_more | boolean | 是否还有更多数据可供翻页 |
错误码
| HTTP | type | 说明 |
|---|
| 401 | authentication_error | 认证失败,PAT 无效或过期 |
| 403 | permission_error | 无权访问此资源 |