> ## 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` を明示的に指定せずに作成されたセッションでは、作成者の個人用デフォルトが優先され、それが未設定の場合にこの設定が適用されます。

<h2 id="permissions">
  権限
</h2>

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

<h2 id="request-fields">
  リクエストフィールド
</h2>

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

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

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

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

<h2 id="outposts-only-organizations">
  Outposts 専用の組織
</h2>

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

<h2 id="errors">
  エラー
</h2>

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

<h2 id="example">
  使用例
</h2>

```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.yaml PUT /v3beta1/organizations/{org_id}/default-platform
openapi: 3.1.0
info:
  description: Service User 認証および RBAC に対応した Devin v3 API
  title: Devin API v3
  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:
        - description: '組織ID（プレフィックス: org-）'
          in: path
          name: org_id
          required: true
          schema:
            example: org-abc123def456
            title: Org Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrgDefaultPlatformUpdateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrgDefaultPlatformResponse'
          description: 成功レスポンス
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: 認証されていません
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: アクセスが禁止されています
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: 見つかりません
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: 競合
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: 処理できないコンテンツ
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: リクエストが多すぎます
components:
  schemas:
    OrgDefaultPlatformUpdateRequest:
      description: |-
        新しいセッションに適用される、組織のデフォルトの配置先を設定します。

        ``platform`` と ``outpost_pool_id`` は、多くても一方のみを指定してください。デフォルトを解除するには、両方を
        null として送信してください（例：``{}``）。
      properties:
        outpost_pool_id:
          anyOf:
            - maxLength: 128
              type: string
            - type: 'null'
          description: 組織で利用可能な共有アウトポストプールの ID。
          title: Outpost Pool Id
        platform:
          anyOf:
            - maxLength: 128
              type: string
            - type: 'null'
          description: >-
            組織に設定されたホスト型プラットフォームのラベル（例：'linux'、'windows'、'macos'）または共有アウトポストプールの名前。大文字と小文字は区別されず、名前が両方に一致する場合はプラットフォームが優先されます。認識されない値は
            400 エラーで拒否され、利用可能なプラットフォームとアウトポストプールが一覧表示されます。
          title: Platform
      title: OrgDefaultPlatformUpdateRequest
      type: object
    OrgDefaultPlatformResponse:
      description: 新しいセッションに適用される、組織のデフォルトの配置先。
      properties:
        outpost_pool_id:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            新しいセッションのデフォルトの実行先となるアウトポストプール。デフォルトがホスト型プラットフォームの場合、または未設定の場合は
            Null。
          title: Outpost Pool Id
        outpost_pool_name:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            デフォルトのアウトポストプールの名前。デフォルトがアウトポストプールでない場合、または組織でそのプールが利用できなくなった場合は
            Null。
          title: Outpost Pool Name
        platform:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            新しいセッションのデフォルトの実行先となるホスト型プラットフォームのラベル（例：'linux'、'windows'）。デフォルトがアウトポストプールの場合、または未設定の場合は
            Null。
          title: Platform
      required:
        - platform
        - outpost_pool_id
        - outpost_pool_name
      title: OrgDefaultPlatformResponse
      type: object
    ProblemDetail:
      description: >-
        v3 API 用の RFC 9457 application/problem+json エラーボディ。


        detail は後方互換性のため、レガシーな {"detail": ...}
        ボディから引き継がれます。その他のメンバーは追加式です。errors にはフィールドレベルのバリデーションエラーが含まれます（422
        の場合のみ）。
      properties:
        detail:
          anyOf:
            - type: string
            - type: 'null'
          description: この事象に固有の、人が読める説明。
          title: Detail
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          description: ブロックされた操作の拒否理由を示す機械可読コード（例："user_frozen"、"migrated_session"）。
          title: Error Code
        errors:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          description: フィールド単位のバリデーションエラー（422 レスポンスのみ）。
          title: Errors
        instance:
          anyOf:
            - type: string
            - type: 'null'
          description: この発生箇所の URI 参照（リクエストパス）。
          title: Instance
        status:
          description: HTTP ステータスコード。
          title: Status
          type: integer
        title:
          description: 問題タイプを人が読める短い要約。
          title: Title
          type: string
        type:
          default: about:blank
          description: 問題タイプを識別する URI 参照。
          title: Type
          type: string
      required:
        - title
        - status
      title: ProblemDetail
      type: object
  securitySchemes:
    bearerAuth:
      description: 'サービスユーザーの認証情報（接頭辞: cog_）'
      scheme: bearer
      type: http

````

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