Port Blueprints API

The Blueprints API from Port — 7 operation(s) for blueprints.

OpenAPI Specification

port-blueprints-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Port Action Runs Blueprints API
  version: '1.0'
tags:
- name: Blueprints
paths:
  /v1/blueprints/{blueprint_identifier}/permissions:
    get:
      summary: Get a blueprint's permissions
      tags:
      - Blueprints
      description: This route allows you to retrieve the permissions of a blueprint.<br/><br/>To learn more about permissions, check out the [documentation](https://docs.port.io/build-your-software-catalog/set-catalog-rbac/examples).
      parameters:
      - schema:
          type: string
          minLength: 1
        in: path
        name: blueprint_identifier
        required: true
        description: The identifier of the blueprint to operate on.
      security:
      - bearer:
        - read:blueprints
      responses:
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                properties:
                  ok:
                    const: false
                  error:
                    type: string
                  message:
                    type: string
                required:
                - ok
                - error
                additionalProperties: false
        '404':
          description: A resource with the provided identifier was not found
          content:
            application/json:
              schema:
                properties:
                  ok:
                    const: false
                  error:
                    type: string
                  message:
                    type: string
                required:
                - ok
                - error
                - message
                additionalProperties: false
                description: A resource with the provided identifier was not found
    patch:
      summary: Update a blueprint's permissions
      tags:
      - Blueprints
      description: This route allows you to update the permissions of a blueprint.<br/><br/>To learn more about permissions, check out the [documentation](https://docs.port.io/build-your-software-catalog/set-catalog-rbac/examples).
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                entities:
                  type: object
                  properties:
                    read:
                      type: object
                      properties:
                        users:
                          type: array
                          items:
                            type: string
                          description: List of users (email addresses) that are allowed to perform the action.
                        teams:
                          type: array
                          items:
                            type: string
                          description: List of teams that are allowed to perform the action.
                        roles:
                          type: array
                          items:
                            type: string
                          description: List of roles that are allowed to perform the action.
                        ownedByTeam:
                          type: boolean
                        policy:
                          type: object
                          properties:
                            combinator:
                              enum:
                              - and
                              - or
                              description: The combinator to use for the rules.
                            rules:
                              type: array
                              items:
                                anyOf:
                                - type: object
                                  title: Date Rule
                                  properties:
                                    property:
                                      oneOf:
                                      - type: string
                                      - type: object
                                        properties:
                                          property:
                                            type: string
                                          context:
                                            type: string
                                            enum:
                                            - user
                                            - userTeams
                                        required:
                                        - property
                                        - context
                                    operator:
                                      enum:
                                      - between
                                      - notBetween
                                      - '='
                                    value:
                                      type: object
                                      oneOf:
                                      - type: object
                                        title: Date Range
                                        properties:
                                          from:
                                            type: string
                                            format: date-time
                                          to:
                                            type: string
                                            format: date-time
                                        required:
                                        - from
                                        - to
                                      - type: object
                                        title: Date Preset
                                        properties:
                                          preset:
                                            type: string
                                            enum:
                                            - today
                                            - tomorrow
                                            - yesterday
                                            - lastDay
                                            - lastWeek
                                            - last2Weeks
                                            - lastMonth
                                            - last3Months
                                            - last6Months
                                            - last12Months
                                            - last2Years
                                            - last3Years
                                            - nextDay
                                            - nextWeek
                                            - next2Weeks
                                            - nextMonth
                                            - next3Months
                                            - next6Months
                                            - next12Months
                                        required:
                                        - preset
                                      - type: object
                                        properties:
                                          property:
                                            type: string
                                          context:
                                            type: string
                                            enum:
                                            - user
                                            - userTeams
                                        required:
                                        - property
                                        - context
                                  required:
                                  - property
                                  - operator
                                  - value
                                  additionalProperties: false
                                - type: object
                                  title: Empty Rule
                                  oneOf:
                                  - type: object
                                    title: Empty Rule
                                    properties:
                                      operator:
                                        enum:
                                        - isEmpty
                                        - isNotEmpty
                                      property:
                                        type: string
                                    required:
                                    - operator
                                    - property
                                    additionalProperties: false
                                - type: object
                                  title: Number Rule
                                  properties:
                                    property:
                                      oneOf:
                                      - type: string
                                      - type: object
                                        properties:
                                          property:
                                            type: string
                                          context:
                                            type: string
                                            enum:
                                            - user
                                            - userTeams
                                        required:
                                        - property
                                        - context
                                    operator:
                                      enum:
                                      - '>'
                                      - '>='
                                      - <
                                      - <=
                                    value:
                                      anyOf:
                                      - type: number
                                        title: number
                                      - type: string
                                        format: date-time
                                        title: date-time
                                      - type: object
                                        properties:
                                          property:
                                            type: string
                                          context:
                                            type: string
                                            enum:
                                            - user
                                            - userTeams
                                        required:
                                        - property
                                        - context
                                  required:
                                  - property
                                  - operator
                                  - value
                                  additionalProperties: false
                                - type: object
                                  title: Expired Rule
                                  oneOf:
                                  - type: object
                                    title: Expired Rule
                                    properties:
                                      operator:
                                        enum:
                                        - isExpired
                                        - isNotExpired
                                      property:
                                        type: string
                                    required:
                                    - operator
                                    - property
                                    additionalProperties: false
                                - type: object
                                  title: String Rule
                                  oneOf:
                                  - type: object
                                    title: String Rule
                                    properties:
                                      property:
                                        oneOf:
                                        - type: string
                                        - type: object
                                          properties:
                                            property:
                                              type: string
                                            context:
                                              type: string
                                              enum:
                                              - user
                                              - userTeams
                                          required:
                                          - property
                                          - context
                                      operator:
                                        enum:
                                        - '='
                                        - '!='
                                        - containsAny
                                        - contains
                                        - doesNotContains
                                        - beginsWith
                                        - doesNotBeginsWith
                                        - endsWith
                                        - doesNotEndsWith
                                        - in
                                        - notIn
                                      value:
                                        anyOf:
                                        - type: 'null'
                                          title: 'null'
                                        - type: string
                                          title: string
                                        - type: number
                                          title: number
                                        - type: boolean
                                          title: boolean
                                        - type: string
                                          format: date-time
                                          title: date-time
                                        - type: array
                                          items:
                                            type: string
                                          title: array
                                        - type: array
                                          items:
                                            type: number
                                          title: array
                                        - type: array
                                          items:
                                            type: boolean
                                          title: array
                                        - type: array
                                          items:
                                            type: string
                                            format: date-time
                                          title: array
                                        - type: object
                                          properties:
                                            property:
                                              type: string
                                            context:
                                              type: string
                                              enum:
                                              - user
                                              - userTeams
                                          required:
                                          - property
                                          - context
                                    additionalProperties: false
                                    required:
                                    - property
                                    - operator
                                    - value
                                - type: object
                                  title: Relation Rule
                                  properties:
                                    operator:
                                      enum:
                                      - relatedTo
                                    blueprint:
                                      type: string
                                    value:
                                      anyOf:
                                      - type: string
                                        title: string
                                      - type: array
                                        items:
                                          type: string
                                        title: array
                                    direction:
                                      enum:
                                      - upstream
                                      - downstream
                                    required:
                                      type: boolean
                                  additionalProperties: false
                                  required:
                                  - operator
                                  - value
                                  - blueprint
                                - type: object
                                  title: Property schema rule
                                  properties:
                                    propertySchema:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                        format:
                                          type: string
                                        items:
                                          type: object
                                          properties:
                                            type:
                                              type: string
                                            format:
                                              type: string
                                          required:
                                          - type
                                      required:
                                      - type
                                      additionalProperties: false
                                    operator:
                                      enum:
                                      - '='
                                      - '!='
                                      - contains
                                    value:
                                      anyOf:
                                      - type: 'null'
                                        title: 'null'
                                      - type: string
                                        title: string
                                      - type: number
                                        title: number
                                      - type: boolean
                                        title: boolean
                                  required:
                                  - operator
                                  - propertySchema
                                  additionalProperties: false
                                - type: object
                                  title: matchAny Rule
                                  anyOf:
                                  - type: object
                                    properties:
                                      property:
                                        oneOf:
                                        - type: object
                                          properties:
                                            path:
                                              type: array
                                              items:
                                                anyOf:
                                                - type: string
                                                - type: object
                                                  properties:
                                                    relation:
                                                      type: string
                                                    maxHops:
                                                      type: number
                                                      minimum: 1
                                                      maximum: 15
                                            fromBlueprint:
                                              type: string
                                          required:
                                          - path
                                          additionalProperties: false
                                        - oneOf:
                                          - type: string
                                          - type: object
                                            properties:
                                              property:
                                                type: string
                                              context:
                                                type: string
                                                enum:
                                                - user
                                                - userTeams
                                            required:
                                            - property
                                            - context
                                      operator:
                                        type: string
                                        enum:
                                        - matchAny
                                      value:
                                        anyOf:
                                        - type: array
                                          items:
                                            type: string
                                        - oneOf:
                                          - type: string
                                          - type: object
                                            properties:
                                              property:
                                                type: string
                                              context:
                                                type: string
                                                enum:
                                                - user
                                                - userTeams
                                            required:
                                            - property
                                            - context
                                    required:
                                    - property
                                    - operator
                                    - value
                                    additionalProperties: false
                                - $ref: '#/components/schemas/def-1'
                          required:
                          - combinator
                          - rules
                          additionalProperties: false
                          example:
                            combinator: and
                            rules:
                            - property: $blueprint
                              operator: '='
                              value: service
                            - combinator: or
                              rules:
                              - property: environment
                                operator: '='
                                value: production
                              - property: environment
                                operator: '='
                                value: staging
                      additionalProperties: false
                    register:
                      type: object
                      properties:
                        users:
                          type: array
                          items:
                            type: string
                          description: List of users (email addresses) that are allowed to perform the action.
                        teams:
                          type: array
                          items:
                            type: string
                          description: List of teams that are allowed to perform the action.
                        roles:
                          type: array
                          items:
                            type: string
                          description: List of roles that are allowed to perform the action.
                        ownedByTeam:
                          type: boolean
                          description: If `true`, permissions will be determined by team ownership, rather than by roles or direct assignment to users. Every user will be able to perform actions on entities belonging to their team/s.
                      additionalProperties: false
                      description: Defines who has permissions to create entities of this blueprint.
                    update:
                      type: object
                      properties:
                        users:
                          type: array
                          items:
                            type: string
                          description: List of users (email addresses) that are allowed to perform the action.
                        teams:
                          type: array
                          items:
                            type: string
                          description: List of teams that are allowed to perform the action.
                        roles:
                          type: array
                          items:
                            type: string
                          description: List of roles that are allowed to perform the action.
                        ownedByTeam:
                          type: boolean
                          description: If `true`, permissions will be determined by team ownership, rather than by roles or direct assignment to users. Every user will be able to perform actions on entities belonging to their team/s.
                      additionalProperties: false
                      description: Defines who has permissions to modify entities of this blueprint.
                    unregister:
                      type: object
                      properties:
                        users:
                          type: array
                          items:
                            type: string
                          description: List of users (email addresses) that are allowed to perform the action.
                        teams:
                          type: array
                          items:
                            type: string
                          description: List of teams that are allowed to perform the action.
                        roles:
                          type: array
                          items:
                            type: string
                          description: List of roles that are allowed to perform the action.
                        ownedByTeam:
                          type: boolean
                          description: If `true`, permissions will be determined by team ownership, rather than by roles or direct assignment to users. Every user will be able to perform actions on entities belonging to their team/s.
                      additionalProperties: false
                      description: Defines who has permissions to delete entities of this blueprint.
                    updateProperties:
                      type: object
                      description: Defines who has permissions to modify specific properties in entities of this blueprint.
                      additionalProperties:
                        type: object
                        properties:
                          users:
                            type: array
                            items:
                              type: string
                            description: List of users (email addresses) that are allowed to perform the action.
                          teams:
                            type: array
                            items:
                              type: string
                            description: List of teams that are allowed to perform the action.
                          roles:
                            type: array
                            items:
                              type: string
                            description: List of roles that are allowed to perform the action.
                          ownedByTeam:
                            type: boolean
                            description: If `true`, permissions will be determined by team ownership, rather than by roles or direct assignment to users. Every user will be able to modify properties in entities belonging to their team/s.
                    updateRelations:
                      type: object
                      description: Defines who has permissions to modify specific relations in entities of this blueprint.
                      additionalProperties:
                        type: object
                        properties:
                          users:
                            type: array
                            items:
                              type: string
                            description: List of users (email addresses) that are allowed to perform the action.
                          teams:
                            type: array
                            items:
                              type: string
                            description: List of teams that are allowed to perform the action.
                          roles:
                            type: array
                            items:
                              type: string
                            description: List of roles that are allowed to perform the action.
                          ownedByTeam:
                            type: boolean
                            description: If `true`, permissions will be determined by team ownership, rather than by roles or direct assignment to users. Every user will be able to modify relations in entities belonging to their team/s.
                  additionalProperties: false
              additionalProperties: false
      parameters:
      - schema:
          type: string
          minLength: 1
        in: path
        name: blueprint_identifier
        required: true
        description: The identifier of the blueprint to operate on.
      security:
      - bearer: []
      responses:
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                properties:
                  ok:
                    const: false
                  error:
                    type: string
                  message:
                    type: string
                required:
                - ok
                - error
                additionalProperties: false
        '404':
          description: A resource with the provided identifier was not found
          content:
            application/json:
              schema:
                properties:
                  ok:
                    const: false
                  error:
                    type: string
                  message:
                    type: string
                required:
                - ok
                - error
                - message
                additionalProperties: false
                description: A resource with the provided identifier was not found
        '413':
          description: Request body is too large (limit is 1MiB)
          content:
            application/json:
              schema:
                properties:
                  ok:
                    const: false
                  error:
                    type

# --- truncated at 32 KB (383 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/port/refs/heads/main/openapi/port-blueprints-api-openapi.yml