openapi: 3.0.1
info:
  title: Fractal Blueprints
  description: Fractal Blueprints description
  contact:
    name: Fractal Cloud
    url: https://fractal.cloud/
    email: contact-us@fractal.cloud
  version: v1.0
paths:
  /Blueprints/{resourceGroupId}/{fractalName}/{fractalVersion}:
    post:
      tags:
        - Blueprints
      parameters:
        - name: resourceGroupId
          in: path
          required: true
          schema:
            type: string
        - name: fractalName
          in: path
          required: true
          schema:
            type: string
        - name: fractalVersion
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateBlueprintCommandRequest'
          text/json:
            schema:
              $ref: '#/components/schemas/CreateBlueprintCommandRequest'
          application/*+json:
            schema:
              $ref: '#/components/schemas/CreateBlueprintCommandRequest'
      responses:
        '200':
          description: Success
    put:
      tags:
        - Blueprints
      parameters:
        - name: resourceGroupId
          in: path
          required: true
          schema:
            type: string
        - name: fractalName
          in: path
          required: true
          schema:
            type: string
        - name: fractalVersion
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateBlueprintCommandRequest'
          text/json:
            schema:
              $ref: '#/components/schemas/UpdateBlueprintCommandRequest'
          application/*+json:
            schema:
              $ref: '#/components/schemas/UpdateBlueprintCommandRequest'
      responses:
        '200':
          description: Success
    delete:
      tags:
        - Blueprints
      parameters:
        - name: resourceGroupId
          in: path
          required: true
          schema:
            type: string
        - name: fractalName
          in: path
          required: true
          schema:
            type: string
        - name: fractalVersion
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
    get:
      tags:
        - Blueprints
      parameters:
        - name: resourceGroupId
          in: path
          required: true
          schema:
            type: string
        - name: fractalName
          in: path
          required: true
          schema:
            type: string
        - name: fractalVersion
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
components:
  schemas:
    Component:
      type: object
      properties:
        displayName:
          type: string
          nullable: true
        description:
          type: string
          nullable: true
        type:
          type: string
          nullable: true
        id:
          type: string
          nullable: true
        version:
          type: string
          nullable: true
        parameters:
          type: object
          additionalProperties: {}
          nullable: true
        dependencies:
          uniqueItems: true
          type: array
          items:
            type: string
          nullable: true
        links:
          type: array
          items:
            $ref: '#/components/schemas/ComponentLink'
          nullable: true
        outputFields:
          uniqueItems: true
          type: array
          items:
            type: string
          nullable: true
      additionalProperties: false
    ComponentLink:
      type: object
      properties:
        componentId:
          type: string
          nullable: true
        settings:
          type: object
          additionalProperties: {}
          nullable: true
      additionalProperties: false
    CreateBlueprintCommandRequest:
      type: object
      properties:
        description:
          type: string
          nullable: true
        isPrivate:
          type: boolean
        components:
          type: array
          items:
            $ref: '#/components/schemas/Component'
          nullable: true
      additionalProperties: false
    UpdateBlueprintCommandRequest:
      type: object
      properties:
        resourceGroupId:
          type: string
          nullable: true
        fractalName:
          type: string
          nullable: true
        fractalVersion:
          type: string
          nullable: true
        description:
          type: string
          nullable: true
        isPrivate:
          type: boolean
        components:
          type: array
          items:
            $ref: '#/components/schemas/Component'
          nullable: true
      additionalProperties: false
  securitySchemes:
    Bearer:
      type: apiKey
      description: >-
        JWT Authorization header using the Bearer scheme. Example:
        "Authorization: Bearer {token}"
      name: JWT Authorization
      in: header
security:
  - Bearer: []
