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

# Creare un blueprint di livello org o repo

> Crea un blueprint. ``type`` viene dedotto da ``repo_name``.

Secondo le specifiche, questo non attiva mai automaticamente una build: i chiamanti devono
eseguire esplicitamente ``POST /builds``.

<div id="permissions">
  ## Autorizzazioni
</div>

Richiede un utente di servizio con l'autorizzazione `ManageRepoBlueprints` a livello dell'organizzazione. La creazione di blueprint a livello org richiede l'autorizzazione `ManageOrgSnapshots`.

<div id="behavior">
  ## Comportamento
</div>

Crea un blueprint di livello org o repo. Un blueprint definisce la configurazione dichiarativa dell'ambiente per le sessioni di Devin. La modifica di un blueprint non attiva automaticamente una build: devi chiamare esplicitamente l'endpoint builds.


## OpenAPI

````yaml it/v3-openapi.yaml POST /v3beta1/organizations/{org_id}/snapshot-setup/blueprints
openapi: 3.1.0
info:
  description: API Devin v3 con autenticazione utente di servizio e RBAC
  title: Devin API v3
  version: 3.0.0
servers: []
security:
  - bearerAuth: []
paths:
  /v3beta1/organizations/{org_id}/snapshot-setup/blueprints:
    post:
      tags:
        - snapshot_setup
      summary: Creare un blueprint di livello org o repo
      description: >-
        Crea un blueprint. ``type`` viene dedotto da ``repo_name``.


        Secondo le specifiche, questo non attiva mai automaticamente una build:
        i chiamanti devono

        eseguire esplicitamente ``POST /builds``.
      operationId: >-
        create_org_blueprint_v3beta1_organizations__org_id__snapshot_setup_blueprints_post
      parameters:
        - description: 'ID dell''organizzazione (prefisso: 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: Risposta riuscita
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Errore di convalida
components:
  schemas:
    CreateOrgBlueprintBody:
      properties:
        contents:
          anyOf:
            - type: string
            - type: 'null'
          description: Corpo YAML iniziale facoltativo per il blueprint.
          title: Contents
        repo_name:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Se impostato, crea un blueprint di livello repo per quel repository.
            Se omesso, crea un blueprint org-wide (a livello org).
          title: Repo Name
      title: CreateOrgBlueprintBody
      type: object
    Blueprint:
      description: >-
        Forma pubblica della risorsa ``Blueprint``.


        Note: l'enum ``type`` potrebbe estendersi in futuro; i client DEVONO
        gestire correttamente

        i valori sconosciuti. Il contenuto YAML viene recuperato separatamente
        tramite

        ``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
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    bearerAuth:
      description: 'Credenziale dell''utente del servizio (prefisso: cog_)'
      scheme: bearer
      type: http

````