Skip to main content

Environment の更新

Forward API リファレンス。

Description

Updates an Environment's configuration and display information with POST.

パス

POST /api/v1/forward/environments/{id}

リクエストヘッダー

ヘッダー必須説明
AuthorizationはいBearer <PAT または SAT>
Content-Typeはいapplication/json
x-qoder-beta条件付き更新後の config.storage.buckets が空でない場合は必須。値は oss-bucket-2026-09-23。

パス参数

パラメーター型必須説明
idstringはいEnvironment ID。

クエリパラメーター

ParameterTypeRequiredDescription
identity_idstringNoIdentity に属するリソースを操作する場合のみ使用する任意のパラメーターです。PAT では明示的に指定でき、省略時は管理者スコープになります。SAT では Identity スコープのトークンを発行し、このパラメーターを明示的に指定しないでください。指定すると HTTP 400 が返されます。Identity の帰属.

リクエストボディ

フィールド型必須説明
namestringいいえNew name.
descriptionstringいいえNew description.
configEnvironment configNo保存済みの設定全体を置き換えます。指定時は null にできず、明示的な null は 400 を返します。フィールドの詳細は schemas を参照してください。
metadataobjectNoEnvironment metadata to merge. It must not be null; an explicit null returns 400.
config.storage.buckets は最大 7 個です。credential は書き込み専用フィールドで、bucket の name に基づいて保持されます。認証情報を省略するか、取得したマスク済みの値をそのまま返すと、保存済みの認証情報が保持されます。name の変更、credential.type の変更、または null の指定時には、完全な認証情報が必要です。 bucket の削除や "buckets": [] の指定は、その後に作成される Session にのみ影響します。既存の Session は作成時のスナップショットを使用します。詳細は Environment storage を参照してください。

リクエスト例

curl -X POST "https://api.qoder.com/api/v1/forward/environments/env_xxx" \
  -H "Authorization: Bearer $QODER_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"dev-env-updated"}'

レスポンス例

HTTP 200 OK
{
  "id": "env_xxx",
  "type": "environment",
  "name": "dev-env",
  "description": "Development environment",
  "config": {"type": "cloud"},
  "metadata": {"source": "console"},
  "created_at": "2026-07-23T10:00:00Z",
  "updated_at": "2026-07-23T10:00:00Z",
  "identity_id": null
}

レスポンスフィールド

The response is an Environment object.

エラー

HTTPType発生条件
400invalid_request_errorThe request body, path parameters, or query parameters are invalid. SAT が identity_id を明示的に指定した場合も返されます。
400invalid_request_errorconfig.storage.buckets が不正(7 個を超える場合を含む)、x-qoder-beta ヘッダーがない、または保存時の試験マウントが拒否されました。
400invalid_request_errorIf the reserved key created_by is supplied, message is metadata key "created_by" is reserved, identifying the invalid field.
401authentication_error認証トークンがないか、無効です。
403permission_erroridentity_id を指定しない PAT または Admin SAT で Owner mismatch が発生したか、その他の権限が不足しています。
404not_found_errorThe resource does not exist or is not visible. identity_id is invalid, disabled, or does not belong to the caller, or the target resource does not belong to the current Identity scope.
503feature_not_availableアカウントが oss_bucket Beta の利用資格を満たしていません。
503api_error保存時に OSS / STS が一時的に利用できません。再試行できます。
500/502/503api_errorForward または依存サービスでエラーが発生しました。