> ## Documentation Index
> Fetch the complete documentation index at: https://docs.devin.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# 組織のデフォルトプラットフォームを設定する (Devin API)

> v3 組織 API を利用して、組織のデフォルトの Devin セッション配置先をホスト型プラットフォームまたは outpost プールに設定、またはクリアします

新しいセッションに適用される、組織全体のデフォルト配置先を設定します。これは webapp の **Settings > Devin > Default platform** と同じ設定です。`platform` を明示的に指定せずに作成されたセッションでは、作成者の個人用デフォルトが優先され、それが未設定の場合にこの設定が適用されます。

## 権限

組織レベルで `ManageOrgSettings` 権限を持つ[サービスユーザー](https://docs.devin.ai/ja/api-reference/v3/service-users/members-service-users.md)または[パーソナルアクセストークン](https://docs.devin.ai/ja/api-reference/personal-access-tokens.md)が必要です。

## リクエストフィールド

次のいずれか一方のみを送信できます (省略も可) 。

* `platform`: 組織に設定されているホスト型プラットフォームのラベル (例: `linux`、`windows`、`macos`) 、または共有 outpost プールの名前。大文字と小文字は区別されません。名前が両方に一致する場合は、プラットフォームが優先されます。
* `outpost_pool_id`: 組織で利用できる共有 outpost プールの ID。

デフォルトを解除するには、空の JSON オブジェクト (`{}`) を送信するか、両方のフィールドに `null` を指定して送信します。リクエストボディは必須です。

指定できるのは共有 outpost プールのみです。個人用アウトポストでは所有者しかセッションを開始できないため、組織のデフォルトには設定できません。

## Outposts 専用の組織

Enterprise が Outposts 専用モードの場合、受け付けられるのは outpost プールのみです。ホスト型プラットフォームのラベルを指定すると `400` が返されます。

## エラー

* `400`: `platform` が設定済みのプラットフォームや共有 outpost プールのいずれにも一致しない場合、複数の outpost プールに一致する場合、または Outposts 専用の組織でホスト型プラットフォームを指定した場合。あるいは、`outpost_pool_id` が組織で利用可能な共有プールではない場合。エラー本文には、利用可能なプラットフォームと outpost プールの一覧が含まれます。
* `403`: 呼び出し元に `ManageOrgSettings` 権限がない場合。
* `422`: `platform` と `outpost_pool_id` の両方が指定されている場合。

## 使用例

```bash theme={null}
curl -X PUT "https://api.devin.ai/v3beta1/organizations/$ORG_ID/default-platform" \
  -H "Authorization: Bearer $DEVIN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"platform": "gpu-pool"}'
```


## OpenAPI

````yaml ja/v3-openapi.json PUT /v3beta1/organizations/{org_id}/default-platform
openapi: 3.1.0
info:
  title: Devin API v3
  description: サービスユーザー認証とRBACに対応したDevin v3 API
  version: 3.0.0
servers: []
security:
  - bearerAuth: []
paths:
  /v3beta1/organizations/{org_id}/default-platform:
    put:
      tags:
        - organization-settings
      summary: 組織のデフォルトプラットフォームを設定
      description: |-
        新しいセッションに適用される、組織の既定の配置先を設定または解除します。

        ホスト型プラットフォームのラベル、共有アウトポストプール名
        (``platform``)、または共有アウトポストプール ID (``outpost_pool_id``) を受け付けます。
        アウトポストのみを利用する組織では、アウトポストプールのみを指定できます。どちらも送信しない場合は
        既定値を解除します。
      operationId: >-
        handle_update_org_default_platform_v3beta1_organizations__org_id__default_platform_put
      parameters:
        - name: org_id
          in: path
          required: true
          schema:
            type: string
            title: Org Id
            example: org-abc123def456
          description: '組織 ID（プレフィックス: org-）'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrgDefaultPlatformUpdateRequest'
      responses:
        '200':
          description: 成功レスポンス
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrgDefaultPlatformResponse'
        '401':
          description: 認証されていません
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
        '403':
          description: アクセスが禁止されています
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
        '404':
          description: 見つかりません
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
        '409':
          description: 競合
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
        '410':
          description: 削除済み
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
        '422':
          description: 処理できないコンテンツ
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
        '429':
          description: リクエストが多すぎます
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
components:
  schemas:
    OrgDefaultPlatformUpdateRequest:
      properties:
        platform:
          anyOf:
            - type: string
              maxLength: 128
            - type: 'null'
          title: Platform
          description: >-
            組織に設定されたホスト型プラットフォームのラベル（例：'linux', 'windows',
            'macos'）、または共有アウトポストプールの名前を指定します。大文字と小文字は区別されません。名前が両方に一致する場合はプラットフォームが優先されます。認識できない値は
            400 エラーで拒否され、利用可能なプラットフォームとアウトポストプールが列挙されます。
        outpost_pool_id:
          anyOf:
            - type: string
              maxLength: 128
            - type: 'null'
          title: Outpost Pool Id
          description: 組織が利用できる共有アウトポストプールの ID。
      type: object
      title: OrgDefaultPlatformUpdateRequest
      description: >-
        新しいセッションに適用する、組織のデフォルトの実行先を設定します。


        ``platform`` と ``outpost_pool_id``
        は、多くてもどちらか一方のみを送信してください。デフォルトを解除するには、両方を

        null として送信してください（例：``{}``）。
    OrgDefaultPlatformResponse:
      properties:
        platform:
          anyOf:
            - type: string
            - type: 'null'
          title: Platform
          description: >-
            新しいセッションがデフォルトで実行されるホスト型プラットフォームのラベル（例：'linux',
            'windows'）。デフォルトがアウトポストプールの場合、または未設定の場合は Null。
        outpost_pool_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Outpost Pool Id
          description: 新しいセッションがデフォルトで実行されるアウトポストプール。デフォルトがホスト型プラットフォームの場合、または未設定の場合は Null。
        outpost_pool_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Outpost Pool Name
          description: >-
            デフォルトのアウトポストプールの名前。デフォルトがアウトポストプールではない場合、または組織がそのプールを利用できなくなった場合は
            Null。
      type: object
      required:
        - platform
        - outpost_pool_id
        - outpost_pool_name
      title: OrgDefaultPlatformResponse
      description: 新しいセッションに適用される、組織のデフォルトの実行先。
    ProblemDetail:
      properties:
        type:
          type: string
          title: Type
          description: 問題タイプを識別する URI 参照。
          default: about:blank
        title:
          type: string
          title: Title
          description: 問題タイプの、人が読める短い要約。
        status:
          type: integer
          title: Status
          description: HTTP ステータスコード。
        detail:
          anyOf:
            - type: string
            - type: 'null'
          title: Detail
          description: この発生事象に固有の、人が読める説明。
        instance:
          anyOf:
            - type: string
            - type: 'null'
          title: Instance
          description: この発生事象の URI 参照（リクエストパス）。
        errors:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Errors
          description: フィールド単位のバリデーションエラー（422レスポンスの場合のみ）。
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Code
          description: ブロックされた操作の拒否理由を示す機械可読コード（例："user_frozen", "migrated_session"）。
      type: object
      required:
        - title
        - status
      title: ProblemDetail
      description: >-
        v3 API 向けの RFC 9457 application/problem+json エラーボディ。


        detail は後方互換性のため、レガシーな {"detail": ...}
        ボディから引き続き保持されています。その他のメンバーは追加式です。errors にはフィールド単位の検証エラーが格納されます（422
        の場合のみ）。
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'サービスユーザーの credential（プレフィックス: cog_）'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.