> ## 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.

# orgティアまたはrepoティアのブループリントを作成する

> ブループリントを作成します。``type`` は ``repo_name`` から推定されます。

仕様上、これによってビルドが自動的にトリガーされることはありません。呼び出し元は
明示的に ``POST /builds`` を実行する必要があります。

<div id="permissions">
  ## 権限
</div>

組織レベルで `ManageRepoBlueprints` 権限を持つサービスユーザーが必要です。org ティア ブループリントの作成には、`ManageOrgSnapshots` 権限が必要です。

<div id="behavior">
  ## 動作
</div>

org または repo ティアのブループリントを作成します。ブループリントは、Devin セッション用の宣言的な環境設定を定義します。ブループリントを変更してもビルドは自動ではトリガーされません。builds エンドポイントを明示的に呼び出す必要があります。

<Note>
  ブループリントは環境設定とは独立して存在しません。`repo_name` を指定してブループリントを作成すると、**そのリポジトリも環境に追加されます**。事前にリポジトリを登録するための別個のエンドポイントはありません。リポジトリは次回のビルド時に環境へクローンされ、インデックス作成が開始されます。

  逆も同様です。環境からリポジトリを削除すると (UI の **Include in environment** トグル) 、そのリポジトリのすべてのブループリント (すべてのワークスペーススコープを含む) が削除されます。
</Note>

リポジトリ名は、Git 統合を通じて Devin がすでにアクセスできるものである必要があります (例: `owner/repo`) 。不明なリポジトリまたはアクセスできないリポジトリの場合は `404` が返され、ブループリントは作成されません。そのリポジトリとスコープにアクティブなブループリントがすでに存在する場合、リクエストは `409` を返します。代わりに update エンドポイントを使用してください。


## OpenAPI

````yaml ja/v3-openapi.yaml POST /v3beta1/organizations/{org_id}/snapshot-setup/blueprints
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}/snapshot-setup/blueprints:
    post:
      tags:
        - snapshot_setup
      summary: orgティアまたはrepoティアのブループリントを作成する
      description: |-
        ブループリントを作成します。``type`` は ``repo_name`` から推定されます。

        仕様上、これによってビルドが自動的にトリガーされることはありません。呼び出し元は
        明示的に ``POST /builds`` を実行する必要があります。
      operationId: >-
        create_org_blueprint_v3beta1_organizations__org_id__snapshot_setup_blueprints_post
      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/CreateOrgBlueprintBody'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Blueprint'
          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:
    CreateOrgBlueprintBody:
      properties:
        contents:
          anyOf:
            - type: string
            - type: 'null'
          description: ブループリントの初期 YAML 本文（省略可）。
          title: Contents
        repo_name:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            設定すると、そのリポジトリ用の repo ティア
            ブループリントを作成します。省略した場合は、org-wide（org-tier）ブループリントを作成します。
          title: Repo Name
      title: CreateOrgBlueprintBody
      type: object
    Blueprint:
      description: >-
        公開 ``Blueprint`` リソースの形式。


        注: ``type`` 列挙型には今後値が追加される可能性があります。クライアントは未知の値を必ず適切に処理する必要があります。YAML内容は
        ``GET /blueprints/{id}/contents`` で別途取得します。
      properties:
        blueprint_id:
          title: Blueprint Id
          type: string
        created_at:
          title: Created At
          type: integer
        repo_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Repo Name
        type:
          enum:
            - enterprise
            - org
            - repo
          title: Type
          type: string
        updated_at:
          title: Updated At
          type: integer
      required:
        - blueprint_id
        - type
        - repo_name
        - created_at
        - updated_at
      title: Blueprint
      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
        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

````