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.
POST /v1/environments
新しいクラウド実行 Environment を作成し、Agent セッションをホスティングします。
ヘッダー
| ヘッダーフィールド | 値 | 必須 | 説明 |
|---|
| Authorization | Bearer $QODER_PAT | はい | 個人アクセストークン |
| Content-Type | application/json | はい | リクエストボディの形式 |
リクエストボディ
| フィールド | 型 | 必須 | 説明 |
|---|
name | string | はい | Environment 名、その識別に使用 |
description | string | いいえ | Environment の説明 |
config | object | はい | Environment 設定オブジェクト |
config.type | string | はい | 固定値 "cloud" |
config.networking | object | いいえ | ネットワークアクセス設定 |
config.networking.type | string | いいえ | ネットワークタイプ: "unrestricted"(無制限)、"limited"(制限)、"allowlist"(ホワイトリスト) |
config.networking.allowed_hosts | array | いいえ | アクセスを許可するホストリスト(allowlist タイプのみ必要) |
config.networking.allow_package_managers | boolean | いいえ | パッケージマネージャーのネットワークアクセスを許可するか |
config.packages | object | いいえ | 事前インストールパッケージ設定 |
config.packages.apt | array | いいえ | 事前インストールが必要な apt パッケージリスト |
config.packages.pip | array | いいえ | 事前インストールが必要な pip パッケージリスト |
config.packages.npm | array | いいえ | 事前インストールが必要な npm パッケージリスト |
metadata | object | いいえ | カスタムメタデータのキーバリュー |
リクエスト例
curl -s -X POST 'https://openapi.qoder.sh/api/v1/cloud/environments' \
-H 'Authorization: Bearer $QODER_PAT' \
-H 'Content-Type: application/json' \
-d '{
"name": "doc-test-env",
"config": {
"type": "cloud",
"networking": {
"type": "limited"
},
"packages": {
"apt": ["curl"]
}
}
}'
レスポンス例
{
"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 | string | Environment の一意識別子、env_ プレフィックス |
type | string | リソースタイプ、固定値 "environment" |
name | string | Environment 名 |
description | string | Environment の説明 |
status | string | Environment ステータス("ready" など) |
config | object | Environment 設定 |
created_at | string | 作成時刻(ISO 8601 形式) |
updated_at | string | 最終更新時刻(ISO 8601 形式) |
エラーコード
| HTTP ステータスコード | エラータイプ | 説明 |
|---|
| 400 | invalid_request_error | リクエストパラメータ無効(config.type フィールドの欠落など) |
| 401 | authentication_error | 認証失敗、PAT が無効または期限切れ |
| 403 | permission_error | この操作を実行する権限がない |
| 409 | conflict_error | 同名の Environment が既に存在 |