openapi: 3.1.0
info:
title: Port Action Runs Actions API
version: '1.0'
tags:
- name: Actions
paths:
/v1/actions:
post:
summary: Create an action/automation
tags:
- Actions
description: This route allows you to create a new self-service action or automation in your Port account.
To learn more about actions and automations, check out the [documentation](https://docs.port.io/actions-and-automations/).
requestBody:
content:
application/json:
schema:
type: object
properties:
identifier:
type: string
pattern: ^(?!\.{1,2}$)[\p{L}0-9@_.+:=-]+$
description: The identifier of the action.
title:
type: string
description: The title of the action.
icon:
type: string
description: The icon of the action.
description:
type: string
description: The description of the action.
trigger:
oneOf:
- type: object
description: The trigger definition of the action.
properties:
operation:
type: string
enum:
- DAY-2
- DELETE
description: The [operation type](https://docs.port.io/create-self-service-experiences/setup-ui-for-action/#basic-details) of the action.
type:
type: string
enum:
- self-service
blueprintIdentifier:
type: string
description: The identifier of the blueprint that the action is associated with.
Note that this is optional, as actions do not have to be tied directly to a blueprint.
userInputs:
oneOf:
- type: object
title: Default order
description: Use this option when you don't want to define a custom order/steps for the user inputs.
properties:
properties:
type: object
propertyNames:
pattern: ^[A-Za-z0-9@_=\\-]+$
additionalProperties:
type: object
properties:
type:
enum:
- string
- number
- boolean
- object
- array
title: Type
description: The type of the input.
jqQuery:
type: 'null'
format:
enum:
- date-time
- url
- email
- ipv4
- ipv6
- yaml
- entity
- user
- team
- proto
- markdown
- multi-line
- labeled-url
title: Format
description: The format of the input.
blueprint:
type: string
title: Blueprint
description: When using the `entity` format, this is the identifier of the blueprint whose entities will be selectable via this input.
dependsOn:
type: array
items:
type: string
title: Depends On
description: The identifiers of the inputs that this input depends on. This input will be disabled until they have been given a value.
visible:
oneOf:
- $ref: '#/components/schemas/def-0'
description: A [jq query](https://stedolan.github.io/jq/manual/) that resolves to `true` or `false`, determining the visibility of the input.
title: jqQuery
- type: boolean
description: A boolean value determining the visibility of the input.
title: boolean
title: Visible
description: The visibility of the input. Resolves to a boolean value (`true` = visible).
icon:
type: string
title: Icon
description: The icon of the input.
dataset:
$ref: '#/components/schemas/def-2'
title: Dataset
description: The dataset to use for entity selection inputs.
sort:
type: object
title: Sort
description: Relevant only for `Entity selection` inputs (`type` = `string` and `format` = `entity`).
This input allows you to sort the entities in the dropdown by a specific property.
properties:
property:
type: string
title: Property
description: The property by which to sort the entities.
order:
type: string
enum:
- ASC
- DESC
title: Order
description: The order in which to sort the entities.
required:
- property
- order
required:
- type
titles:
type: object
propertyNames:
pattern: ^[A-Za-z0-9@_=\\-]+$
additionalProperties:
type: object
properties:
title:
type: string
maxLength: 140
minLength: 1
description:
type: string
maxLength: 1000
visible:
anyOf:
- type: boolean
- $ref: '#/components/schemas/def-0'
required:
oneOf:
- $ref: '#/components/schemas/def-0'
description: A jq query that runs on the action's inputs and resolves to a boolean value (`true` = required).
title: jqQuery
- type: array
description: The identifiers of the required inputs.
items:
type: string
title: array
required:
- properties
additionalProperties: false
- type: object
title: Custom order
description: Use this option when you want to define a custom order for the user inputs.
properties:
properties:
type: object
propertyNames:
pattern: ^[A-Za-z0-9@_=\\-]+$
additionalProperties:
type: object
properties:
type:
enum:
- string
- number
- boolean
- object
- array
title: Type
description: The type of the input.
jqQuery:
type: 'null'
format:
enum:
- date-time
- url
- email
- ipv4
- ipv6
- yaml
- entity
- user
- team
- proto
- markdown
- multi-line
- labeled-url
title: Format
description: The format of the input.
blueprint:
type: string
title: Blueprint
description: When using the `entity` format, this is the identifier of the blueprint whose entities will be selectable via this input.
dependsOn:
type: array
items:
type: string
title: Depends On
description: The identifiers of the inputs that this input depends on. This input will be disabled until they have been given a value.
visible:
oneOf:
- $ref: '#/components/schemas/def-0'
description: A [jq query](https://stedolan.github.io/jq/manual/) that resolves to `true` or `false`, determining the visibility of the input.
title: jqQuery
- type: boolean
description: A boolean value determining the visibility of the input.
title: boolean
title: Visible
description: The visibility of the input. Resolves to a boolean value (`true` = visible).
icon:
type: string
title: Icon
description: The icon of the input.
dataset:
$ref: '#/components/schemas/def-2'
title: Dataset
description: The dataset to use for entity selection inputs.
sort:
type: object
title: Sort
description: Relevant only for `Entity selection` inputs (`type` = `string` and `format` = `entity`).
This input allows you to sort the entities in the dropdown by a specific property.
properties:
property:
type: string
title: Property
description: The property by which to sort the entities.
order:
type: string
enum:
- ASC
- DESC
title: Order
description: The order in which to sort the entities.
required:
- property
- order
required:
- type
required:
oneOf:
- $ref: '#/components/schemas/def-0'
description: A jq query that runs on the action's inputs and resolves to a boolean value (`true` = required).
title: jqQuery
- type: array
description: The identifiers of the required inputs.
items:
type: string
title: array
titles:
type: object
propertyNames:
pattern: ^[A-Za-z0-9@_=\\-]+$
additionalProperties:
type: object
properties:
title:
type: string
maxLength: 140
minLength: 1
description:
type: string
maxLength: 1000
visible:
anyOf:
- type: boolean
- $ref: '#/components/schemas/def-0'
order:
type: array
items:
type: string
required:
- properties
- order
additionalProperties: false
- type: object
title: Custom steps
description: Use this option when you want to define custom steps for the user inputs.
properties:
properties:
type: object
propertyNames:
pattern: ^[A-Za-z0-9@_=\\-]+$
additionalProperties:
type: object
properties:
type:
enum:
- string
- number
- boolean
- object
- array
title: Type
description: The type of the input.
jqQuery:
type: 'null'
format:
enum:
- date-time
- url
- email
- ipv4
- ipv6
- yaml
- entity
- user
- team
- proto
- markdown
- multi-line
- labeled-url
title: Format
description: The format of the input.
blueprint:
type: string
title: Blueprint
description: When using the `entity` format, this is the identifier of the blueprint whose entities will be selectable via this input.
dependsOn:
type: array
items:
type: string
title: Depends On
description: The identifiers of the inputs that this input depends on. This input will be disabled until they have been given a value.
visible:
oneOf:
- $ref: '#/components/schemas/def-0'
description: A [jq query](https://stedolan.github.io/jq/manual/) that resolves to `true` or `false`, determining the visibility of the input.
title: jqQuery
- type: boolean
description: A boolean value determining the visibility of the input.
title: boolean
title: Visible
description: The visibility of the input. Resolves to a boolean value (`true` = visible).
icon:
type: string
title: Icon
description: The icon of the input.
dataset:
$ref: '#/components/schemas/def-2'
title: Dataset
description: The dataset to use for entity selection inputs.
sort:
type: object
title: Sort
description: Relevant only for `Entity selection` inputs (`type` = `string` and `format` = `entity`).
This input allows you to sort the entities in the dropdown by a specific property.
properties:
property:
type: string
title: Property
description: The property by which to sort the entities.
order:
type: string
enum:
- ASC
- DESC
title: Order
description: The order in which to sort the entities.
required:
- property
- order
required:
- type
required:
oneOf:
- $ref: '#/components/schemas/def-0'
description: A jq query that runs on the action's inputs and resolves to a boolean value (`true` = required).
title: jqQuery
- type: array
description: The identifiers of the required inputs.
items:
type: string
title: array
titles:
type: object
propertyNames:
pattern: ^[A-Za-z0-9@_=\\-]+$
additionalProperties:
type: object
properties:
title:
type: string
maxLength: 140
minLength: 1
description:
type: string
maxLength: 1000
visible:
anyOf:
- type: boolean
- $ref: '#/components/schemas/def-0'
steps:
type: array
description: The steps of the user inputs. Each step is an object containing its title and the order of its properties.
items:
type: object
properties:
title:
type: string
description: The title of the step.
order:
type: array
description: The order of the properties in the step - an array of property identifiers.
items:
type: string
visible:
oneOf:
- $ref: '#/components/schemas/def-0'
description: A [jq query](https://stedolan.github.io/jq/manual/) that resolves to `true` or `false`, determining the visibility of the step.
title: jqQuery
- type: boolean
description: A boolean value determining the visibility of the step.
title: boolean
title: Visible
description: The visibility of the step. Resolves to a boolean value (`true` = visible).
required:
- title
additionalProperties: false
required:
- properties
- steps
additionalProperties: false
description: The [user inputs](https://docs.port.io/create-self-service-experiences/setup-ui-for-action/user-inputs/) of the action.
actionCardButtonText:
type: string
maxLength: 15
minLength: 1
pattern: ^[^\s].*[^\s]$
executeActionButtonText:
type: string
maxLength: 15
minLength: 1
pattern: ^[^\s].*[^\s]$
condition:
type: object
description: Filters used to include/exclude specific entities from the action.
additionalProperties: false
properties:
type:
type: string
enum:
- SEARCH
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'
combinator:
type: string
enum:
- and
- or
required:
- type
- rules
- combinator
dependencies:
condition:
- blueprintIdentifier
required:
- type
- userInputs
- operation
additionalProperties: false
title: Self-service (DAY-2/DELETE)
- type: object
description: The trigger definition of the action.
properties:
operation:
type: string
enum:
- CREATE
description: The [operation type](https://docs.port.io/create-self-service-experiences/setup-ui-for-action/#basic-details) of the action.
type:
type: string
enum:
- self-service
blueprintIdentifier:
type: string
description: The identifier of the blueprint that the action is associated with.
Note that this is optional, as actions do not have to be tied directly to a blueprint.
userInputs:
oneOf:
- type: object
title: Default order
description: Use this option when you don't want to define a custom order/steps for the user inputs.
properties:
properties:
type: object
propertyNames:
pattern: ^[A-Za-z0-9@_=\\-]+$
additionalProperties:
type: object
properties:
type:
enum:
- string
- number
- boolean
- object
- array
title: Type
description: The type of the input.
jqQuery:
type: 'null'
format:
enum:
- date-time
- url
- email
- ipv4
- ipv6
- yaml
- entity
- user
- team
- proto
- markdown
- multi-line
- labeled-url
title: Format
description: The format of the input.
blueprint:
type: string
title: Blueprint
description: When using the `entity` format, this is the identifier of the blueprint whose entities will be selectable via this input.
dependsOn:
type: array
items:
type: string
title: Depends On
description: The identifiers of the inputs that this input depends on. This input will be disabled until they have been given a value.
visible:
oneOf:
- $ref: '#/components/schemas/def-0'
description: A [jq query](https://stedolan.github.io/jq/manual/) that resolves to `true` or `false`, determining the visibility of the input.
title: jqQuery
- type: boolean
description: A boolean value determining the visibility of the input.
title: boolean
title: Visible
description: The visibility of the input. Resolves to a boolean value (`true` = visible).
icon:
type: string
title: Icon
description: The icon of the input.
dataset:
$ref: '#/components/schemas/def-2'
title: Dataset
description: The dataset to use for entity selection inputs.
sort:
type: object
title: Sort
description: Relevant only for `Entity selection` inputs (`type` = `string` and `format` = `entity`).
This input allows you to sort the entities in the dropdown by a specific property.
properties:
property:
type: string
title: Property
description: The property by which to sort the entities.
order:
type: string
enum:
- ASC
- DESC
title: Order
description: The order in which to sort the entities.
required:
- property
- order
required:
- type
titles:
type: object
propertyNames:
pattern: ^[A-Za-z0-9@_=\\-]+$
additionalProperties:
type: object
properties:
title:
type: string
maxLength: 140
minLength: 1
description:
type: string
maxLength: 1000
visible:
anyOf:
- type: boolean
- $ref: '#/components/schemas/def-0'
required:
oneOf:
- $ref: '#/components/schemas/def-0'
description: A jq query that runs on the action's inputs and resolves to a boolean value (`true` = required).
title: jqQuery
- type: array
description: The identifiers of the required inputs.
items:
type: string
title: array
required:
- properties
additionalProperties: false
- type: object
title: Custom order
description: Use this option when you want to define a custom order for the user inputs.
properties:
properties:
type: object
propertyNames:
pattern: ^[A-Za-z0-9@_=\\-]+$
additionalProperties:
type: object
properties:
type:
enum:
- string
- number
- boolean
- object
- array
title: Type
description: The type of the input.
jqQuery:
type: 'null'
format:
enum:
- date-time
- url
- email
- ipv4
- ipv6
- yaml
- entity
- user
- team
- proto
- markdown
- multi-line
- labeled-url
title: Format
description: The format of the input.
blueprint:
type: string
title: Blueprint
description: When using the `entity` format, this is the identifier of the blueprint whose entities will be selectable via this input.
dependsOn:
type: array
items:
type: string
title: Depends On
description: The identifiers of the inputs that this input depends on. This input will be disabled until they have been given a value.
visible:
oneOf:
- $ref: '#/components/schemas/def-0'
description: A [jq query](https://stedolan.github.io/jq/manual/) that resolves to `true` or `false`, determining the visibility of the input.
title: jqQuery
- type: boolean
description: A boolean value determining the visibility of the input.
title: boolean
title: Visible
description: The visibility of the input. Resolves to a boolean value (`true` = visible).
icon:
type: string
title: Icon
description: The icon of the input.
dataset:
$ref: '#/components/schemas/def-2'
title: Dataset
description: The dataset to use for entity selection inputs.
sort:
type: object
title: Sort
description: Relevant only for `Entity selection` inputs (`type` = `string` and `format` = `entity`).
This input allows you to sort the entities in the dropdown by a specific property.
properties:
property:
type: string
title: Property
description: The property by which to sort the entities.
order:
type: string
enum:
- ASC
- DESC
title: Order
description: The order in which to sort the entities.
required:
- property
- order
required:
- type
required:
oneOf:
- $ref: '#/components/schemas/def-0'
description: A jq query that runs on the action's inputs and resolves to a boolean value (`true` = required).
title: jqQuery
- type: array
description: The identifiers of the required inputs.
items:
type: string
title: array
titles:
type: object
propertyNames:
pattern: ^[A-Za-z0-9@_=\\-]+$
additionalProperties:
type: object
properties:
title:
type: string
maxLength: 140
minLength: 1
description:
type: string
maxLength: 1000
visible:
anyOf:
- type: boolean
- $ref: '#/components/schemas/def-0'
order:
type: array
items:
type: string
required:
- properties
- order
additionalProperties: false
- type: object
title: Custom steps
description: Use this option when you want to define custom steps for the user inputs.
properties:
properties:
type: object
propertyNames:
pattern: ^[A-Za-z0-9@_=\\-]+$
additionalProperties:
type: object
properties:
type:
enum:
- string
- number
- boolean
- object
- array
title: Type
description: The type of the input.
jqQuery:
type: 'null'
format:
enum:
- date-time
- url
- email
- ipv4
- ipv6
- yaml
- entity
- user
- team
- proto
- markdown
- multi-line
- labeled-url
title: Format
description: The format of the input.
blueprint:
type: string
title: Blueprint
description: When using the `entity` format, this is the identifier of the blueprint whose entities will be selectable via this input.
dependsOn:
type: array
items:
type: string
title: Depends On
description: The identifiers of the inputs that this input depends on. This input will be disabled until they have been given a value.
visible:
oneOf:
- $ref: '#/components/schemas/def-0'
description: A [jq query](https://stedolan.github.io/jq/manual/) that resolves to `true` or `false`, determining the visibility of the input.
title: jqQuery
- type: boolean
description: A boolean value determining the visibility of the input.
title: boolean
title: Visible
description: The visibility of the input. Resolves to a boolean value (`true` = visible).
icon:
type: string
title: Icon
description: The icon of the input.
dataset:
$ref: '#/components/schemas/def-2'
title: Dataset
description: The dataset to use for entity selection inputs.
sort:
type: object
title: Sort
description: Relevant only for `Entity selection` inputs (`type` = `string` and `format` = `entity`).
This input allows you to sort the entities in the dropdown by a specific property.
properties:
property:
type: string
title: Property
description: The property by which to sort the entities.
order:
type: string
enum:
- ASC
- DESC
title: Order
description: The order in which to sort the entities.
required:
- property
- order
required:
- type
required:
oneOf:
- $ref: '#/components/schemas/def-0'
description: A jq query that runs on the action's inputs and resolves to a boolean value (`true` = required).
title: jqQuery
- type: array
description: The identifiers of the required inputs.
items:
type: string
title: array
titles:
type: object
propertyNames:
pattern: ^[A-Za-z0-9@_=\\-]+$
additionalProperties:
type: object
properties:
title:
type: string
maxLength: 140
minLength: 1
description:
type: string
maxLength: 1000
visible:
anyOf:
- type: boolean
- $ref: '#/components/schemas/def-0'
steps:
type: array
description: The steps of the user inputs. Each step is an object containing its title and the order of its properties.
items:
type: object
properties:
title:
type: string
description: The title of the step.
order:
type: array
description: The order of the properties in the step - an array of property identifiers.
items:
type: string
visible:
oneOf:
- $ref: '#/components/schemas/def-0'
description: A [jq query](https://stedolan.github.io/jq/manual/) that resolves to `true` or `false`, determining the visibility of the step.
title: jqQuery
- type: boolean
description: A boolean value determining the visibility of the step.
title: boolean
title: Visible
description: The visibility of the step. Resolves to a boolean value (`true` = visible).
required:
- title
additionalProperties: false
required:
- properties
- steps
additionalProperties: false
description: The [user inputs](https://docs.port.io/create-self-service-experiences/setup-ui-for-action/user-inputs/) of the action.
actionCardButtonText:
type: string
maxLength: 15
minLength: 1
pattern: ^[^\s].*[^\s]$
executeActionButtonText:
type: string
maxLength: 15
minLength: 1
pattern: ^[^\s].*[^\s]$
required:
- type
- userInputs
- operation
additionalProperties: false
title: Self-service (CREATE)
- type: object
description: The trigger definition of the action.
properties:
type:
type: string
enum:
- automation
event:
description: The [event](https://docs.port.io/actions-and-automations/define-automations/setup-trigger) that triggers the action.
oneOf:
- type: object
properties:
type:
type: string
enum:
- ENTITY_CREATED
blueprintIdentifier:
type: string
description: The identifier of the blueprint whose entities will trigger the automation.
required:
- type
- blueprintIdentifier
additionalProperties: false
title: Entity created
- type: object
properties:
type:
type: string
enum:
- ENTITY_UPDATED
blueprintIdentifier:
type: string
description: The identifier of the blueprint whose entities will trigger the automation.
required:
- type
- blueprintIdentifier
additionalProperties: false
title: Entity updated
- type: object
properties:
type:
type: string
enum:
- ENTITY_DELETED
blueprintIdentifier:
type: string
description: The identifier of the blueprint whose entities will trigger the automation.
required:
- type
- blueprintIdentifier
additionalProperties: false
title: Entity deleted
- type: object
properties:
type:
type: string
enum:
- TIMER_PROPERTY_EXPIRED
blueprintIdentifier:
type: string
description: The identifier of the blueprint whose entities will trigger the automation.
propertyIdentifier:
type: string
description: The identifier of the timer property in the specified blueprint.
required:
- type
- blueprintIdentifier
- propertyIdentifier
additionalProperties: false
title: Timer property expired
- type: object
properties:
type:
type: string
enum:
- ANY_ENTITY_CHANGE
blueprintIdentifier:
type: string
description: The identifier of the blueprint whose entities will trigger the automation.
required:
- type
- blueprintIdentifier
additionalProperties: false
title: Any entity change
- type: object
properties:
type:
type: string
enum:
- RUN_CREATED
actionIdentifier:
type: string
required:
- type
- actionIdentifier
additionalProperties: false
title: Run created
- type: object
properties:
type:
type: string
enum:
- RUN_UPDATED
actionIdentifier:
type: string
required:
- type
- actionIdentifier
additionalProperties: false
title: Run updated
- type: object
properties:
type:
type: string
enum:
- ANY_RUN_CHANGE
actionIdentifier:
type: string
required:
- type
- actionIdentifier
additionalProperties: false
title: Any run change
condition:
description: Filters used to include/exclude specific entities from the automation.
oneOf:
- type: object
properties:
type:
type: string
enum:
- JQ
expressions:
type: array
items:
type: string
description: An array of [jq expressions](https://docs.port.io/search-and-query/structure-and-syntax) used to filter entities.
Read more [here](https://docs.port.io/actions-and-automations/define-automations/setup-trigger#conditions).
combinator:
type: string
enum:
- and
- or
required:
- type
- expressions
additionalProperties: false
title: JQ
required:
- type
- event
additionalProperties: false
title: Automation
invocationMethod:
description: Details the action's backend type and details.
oneOf:
- type: object
properties:
type:
type: string
enum:
- KAFKA
payload:
description: An object containing the [action payload](https://docs.port.io/create-self-service-experiences/setup-backend/#define-the-actions-payload).
oneOf:
- type: array
- type: object
required:
- type
additionalProperties: false
title: Kafka
- type: object
properties:
type:
type: string
enum:
- WEBHOOK
url:
type: string
description: The URL of the webhook.
agent:
oneOf:
- type: boolean
- type: string
description: If `true`, Port's [execution agent](https://docs.port.io/create-self-service-experiences/setup-backend/webhook/port-execution-agent/) will be used to handle invocations of this action.
synchronized:
oneOf:
- type: boolean
- type: string
description: If `true`, the action will be executed [synchronously](https://docs.port.io/create-self-service-experiences/setup-backend/webhook/#sync-vs-async-execution).
method:
type: string
description: The HTTP method of the webhook (`POST`, `PUT`, `PATCH`, or `DELETE`).
headers:
type: object
additionalProperties:
type: string
description: A JSON object containing the headers to be sent to the webhook in each execution, in `"key"`:`"value"` pairs.
body:
oneOf:
- type: array
- type: object
description: The body sent to the webhook in each execution. This is where the [action payload](https://docs.port.io/create-self-service-experiences/setup-backend/#define-the-actions-payload) is specified.
required:
- type
- url
additionalProperties: false
title: Webhook
- type: object
properties:
type:
type: string
enum:
- GITHUB
org:
type: string
repo:
type: string
workflow:
type: string
workflowInputs:
type: object
reportWorkflowStatus:
oneOf:
- type: boolean
- type: string
required:
- type
- org
- repo
- workflow
additionalProperties: false
title: GitHub
- type: object
properties:
type:
type: string
enum:
- INTEGRATION_ACTION
installationId:
type: string
integrationActionType:
type: string
enum:
- dispatch_workflow
integrationActionExecutionProperties:
type: object
required:
- type
- installationId
- integrationActionType
- integrationActionExecutionProperties
additionalProperties: false
title: Integration Action
- type: object
properties:
type:
type: string
enum:
- GITLAB
projectName:
type: string
groupName:
type: string
defaultRef:
type: string
pipelineVariables:
type: object
required:
- type
- projectName
- groupName
additionalProperties: false
title: GitLab
- type: object
properties:
type:
type: string
enum:
- AZURE_DEVOPS
webhook:
type: string
org:
type: string
payload:
oneOf:
- type: array
- type: object
required:
- type
- webhook
- org
additionalProperties: false
title: Azure DevOps
- type: object
properties:
type:
type: string
enum:
- UPSERT_ENTITY
blueprintIdentifier:
type: string
mapping:
type: object
properties:
identifier:
type: string
title:
type: string
team:
oneOf:
- type: string
- type: array
items:
type: string
icon:
type: string
properties:
type: object
relations:
type: object
additionalProperties:
oneOf:
- type: string
- type: array
items:
type: string
- type: 'null'
required: []
required:
- type
- blueprintIdentifier
- mapping
additionalProperties: false
title: Upsert Entity
requiredApproval:
description: Determines whether the action requires approval before execution.
Choose `ALL` to require all specified users to approve the action, or `ANY` to require only one.
oneOf:
- type: object
properties:
type:
type: string
enum:
- ANY
- ALL
required:
- type
additionalProperties: false
title: User/s
- type: boolean
title: boolean
approvalNotification:
type: object
description: The notification configuration for the approval process. Relevant only if `requiredApproval` is set to `true`.
properties:
type:
type: string
enum:
- webhook
- email
default: email
oneOf:
- type: object
properties:
type:
type: string
enum:
- webhook
format:
type: string
enum:
- json
- slack
url:
type: string
format: uri
required:
- type
- url
additionalProperties: false
title: Webhook
- type: object
properties:
type:
type: string
enum:
- email
required:
- type
additionalProperties: false
title: Email
required:
- type
publish:
type: boolean
description: Only relevant for **automations**. If `false`, the automation will be inactive (will not be triggered).
allowAnyoneToViewRuns:
type: boolean
description: Whether members can view the runs of this action.
additionalProperties: false
required:
- identifier
- trigger
- invocationMethod
required: true
security:
- bearer:
- create:actions
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: string
message:
type: string
required:
- ok
- error
additionalProperties: false
description: Request body is too large (limit is 1MiB)
'422':
description: The json provided does not match the route's schema
content:
application/json:
schema:
properties:
ok:
const: false
error:
type: string
message:
type: string
required:
- ok
- error
- message
additionalProperties: false
description: The json provided does not match the route's schema
get:
summary: Get actions/automations
tags:
- Actions
description: 'This route allows you to fetch one or more self-service actions and/or automations in your Port account.
The call will perform a logical `AND` between all query parameters below, and return all actions and automations that match the criteria.
To learn more about actions and automations, check out the [documentation](https://docs.port.io/actions-and-automations/).
:::info Version parameter
Set the `version` parameter to `v2` for the latest version of the API.:::'
parameters:
- schema:
type: array
items:
type: string
in: query
name: action_identifier
required: false
description: The identifier/s of the action/s and/or automation/s you want to fetch.
- schema:
type: array
items:
type: string
in: query
name: blueprint_identifier
required: false
description: The identifier/s of the blueprint/s whose actions/automations you wish to fetch.
- schema:
type: array
items:
type: string
enum:
- DAY-2
- DELETE
- CREATE
in: query
name: operation
required: false
description: The [operation type/s](https://docs.port.io/create-self-service-experiences/setup-ui-for-action/#basic-details) of the action/s you want to fetch. Relevant only for self-service actions.
- schema:
type: boolean
in: query
name: published
required: false
description: Only relevant for **automations**. If `true`, only published automations will be fetched.
- schema:
type: string
enum:
- self-service
- automation
in: query
name: trigger_type
required: false
- schema:
type: array
items:
type: string
enum:
- ENTITY_CREATED
- ENTITY_UPDATED
- ENTITY_DELETED
- TIMER_PROPERTY_EXPIRED
- ANY_ENTITY_CHANGE
- RUN_CREATED
- RUN_UPDATED
- ANY_RUN_CHANGE
in: query
name: trigger_event
required: false
description: The event/s that triggered the automation/s you want to fetch. Relevant only for automations.
- schema:
type: array
items:
type: string
in: query
name: trigger_event_action_identifier
required: false
- schema:
type: string
enum:
- v1
- v2
in: query
name: version
required: false
description: Specifies the API version to use. Please use `v2` for the latest version of the API.
security:
- bearer:
- read:actions
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
/v1/actions/{action_identifier}:
put:
summary: Change an action/automation
tags:
- Actions
description: This route allows you to change the details of an existing self-service action or automation in your Port account.
To learn more about actions and automations, check out the [documentation](https://docs.port.io/actions-and-automations/).
requestBody:
content:
application/json:
schema:
type: object
properties:
identifier:
type: string
pattern: ^(?!\.{1,2}$)[\p{L}0-9@_.+:=-]+$
description: The identifier of the action.
title:
type: string
description: The title of the action.
icon:
type: string
description: The icon of the action.
description:
type: string
description: The description of the action.
trigger:
oneOf:
- type: object
description: The trigger definition of the action.
properties:
operation:
type: string
enum:
- DAY-2
- DELETE
description: The [operation type](https://docs.port.io/create-self-service-experiences/setup-ui-for-action/#basic-details) of the action.
type:
type: string
enum:
- self-service
blueprintIdentifier:
type: string
description: The identifier of the blueprint that the action is associated with.
Note that this is optional, as actions do not have to be tied directly to a blueprint.
userInputs:
oneOf:
- type: object
title: Default order
description: Use this option when you don't want to define a custom order/steps for the user inputs.
properties:
properties:
type: object
propertyNames:
pattern: ^[A-Za-z0-9@_=\\-]+$
additionalProperties:
type: object
properties:
type:
enum:
- string
- number
- boolean
- object
- array
title: Type
description: The type of the input.
jqQuery:
type: 'null'
format:
enum:
- date-time
- url
- email
- ipv4
- ipv6
- yaml
- entity
- user
- team
- proto
- markdown
- multi-line
- labeled-url
title: Format
description: The format of the input.
blueprint:
type: string
title: Blueprint
description: When using the `entity` format, this is the identifier of the blueprint whose entities will be selectable via this input.
dependsOn:
type: array
items:
type: string
title: Depends On
description: The identifiers of the inputs that this input depends on. This input will be disabled until they have been given a value.
visible:
oneOf:
- $ref: '#/components/schemas/def-0'
description: A [jq query](https://stedolan.github.io/jq/manual/) that resolves to `true` or `false`, determining the visibility of the input.
title: jqQuery
- type: boolean
description: A boolean value determining the visibility of the input.
title: boolean
title: Visible
description: The visibility of the input. Resolves to a boolean value (`true` = visible).
icon:
type: string
title: Icon
description: The icon of the input.
dataset:
$ref: '#/components/schemas/def-2'
title: Dataset
description: The dataset to use for entity selection inputs.
sort:
type: object
title: Sort
description: Relevant only for `Entity selection` inputs (`type` = `string` and `format` = `entity`).
This input allows you to sort the entities in the dropdown by a specific property.
properties:
property:
type: string
title: Property
description: The property by which to sort the entities.
order:
type: string
enum:
- ASC
- DESC
title: Order
description: The order in which to sort the entities.
required:
- property
- order
required:
- type
titles:
type: object
propertyNames:
pattern: ^[A-Za-z0-9@_=\\-]+$
additionalProperties:
type: object
properties:
title:
type: string
maxLength: 140
minLength: 1
description:
type: string
maxLength: 1000
visible:
anyOf:
- type: boolean
- $ref: '#/components/schemas/def-0'
required:
oneOf:
- $ref: '#/components/schemas/def-0'
description: A jq query that runs on the action's inputs and resolves to a boolean value (`true` = required).
title: jqQuery
- type: array
description: The identifiers of the required inputs.
items:
type: string
title: array
required:
- properties
additionalProperties: false
- type: object
title: Custom order
description: Use this option when you want to define a custom order for the user inputs.
properties:
properties:
type: object
propertyNames:
pattern: ^[A-Za-z0-9@_=\\-]+$
additionalProperties:
type: object
properties:
type:
enum:
- string
- number
- boolean
- object
- array
title: Type
description: The type of the input.
jqQuery:
type: 'null'
format:
enum:
- date-time
- url
- email
- ipv4
- ipv6
- yaml
- entity
- user
- team
- proto
- markdown
- multi-line
- labeled-url
title: Format
description: The format of the input.
blueprint:
type: string
title: Blueprint
description: When using the `entity` format, this is the identifier of the blueprint whose entities will be selectable via this input.
dependsOn:
type: array
items:
type: string
title: Depends On
description: The identifiers of the inputs that this input depends on. This input will be disabled until they have been given a value.
visible:
oneOf:
- $ref: '#/components/schemas/def-0'
description: A [jq query](https://stedolan.github.io/jq/manual/) that resolves to `true` or `false`, determining the visibility of the input.
title: jqQuery
- type: boolean
description: A boolean value determining the visibility of the input.
title: boolean
title: Visible
description: The visibility of the input. Resolves to a boolean value (`true` = visible).
icon:
type: string
title: Icon
description: The icon of the input.
dataset:
$ref: '#/components/schemas/def-2'
title: Dataset
description: The dataset to use for entity selection inputs.
sort:
type: object
title: Sort
description: Relevant only for `Entity selection` inputs (`type` = `string` and `format` = `entity`).
This input allows you to sort the entities in the dropdown by a specific property.
properties:
property:
type: string
title: Property
description: The property by which to sort the entities.
order:
type: string
enum:
- ASC
- DESC
title: Order
description: The order in which to sort the entities.
required:
- property
- order
required:
- type
required:
oneOf:
- $ref: '#/components/schemas/def-0'
description: A jq query that runs on the action's inputs and resolves to a boolean value (`true` = required).
title: jqQuery
- type: array
description: The identifiers of the required inputs.
items:
type: string
title: array
titles:
type: object
propertyNames:
pattern: ^[A-Za-z0-9@_=\\-]+$
additionalProperties:
type: object
properties:
title:
type: string
maxLength: 140
minLength: 1
description:
type: string
maxLength: 1000
visible:
anyOf:
- type: boolean
- $ref: '#/components/schemas/def-0'
order:
type: array
items:
type: string
required:
- properties
- order
additionalProperties: false
- type: object
title: Custom steps
description: Use this option when you want to define custom steps for the user inputs.
properties:
properties:
type: object
propertyNames:
pattern: ^[A-Za-z0-9@_=\\-]+$
additionalProperties:
type: object
properties:
type:
enum:
- string
- number
- boolean
- object
- array
title: Type
description: The type of the input.
jqQuery:
type: 'null'
format:
enum:
- date-time
- url
- email
- ipv4
- ipv6
- yaml
- entity
- user
- team
- proto
- markdown
- multi-line
- labeled-url
title: Format
description: The format of the input.
blueprint:
type: string
title: Blueprint
description: When using the `entity` format, this is the identifier of the blueprint whose entities will be selectable via this input.
dependsOn:
type: array
items:
type: string
title: Depends On
description: The identifiers of the inputs that this input depends on. This input will be disabled until they have been given a value.
visible:
oneOf:
- $ref: '#/components/schemas/def-0'
description: A [jq query](https://stedolan.github.io/jq/manual/) that resolves to `true` or `false`, determining the visibility of the input.
title: jqQuery
- type: boolean
description: A boolean value determining the visibility of the input.
title: boolean
title: Visible
description: The visibility of the input. Resolves to a boolean value (`true` = visible).
icon:
type: string
title: Icon
description: The icon of the input.
dataset:
$ref: '#/components/schemas/def-2'
title: Dataset
description: The dataset to use for entity selection inputs.
sort:
type: object
title: Sort
description: Relevant only for `Entity selection` inputs (`type` = `string` and `format` = `entity`).
This input allows you to sort the entities in the dropdown by a specific property.
properties:
property:
type: string
title: Property
description: The property by which to sort the entities.
order:
type: string
enum:
- ASC
- DESC
title: Order
description: The order in which to sort the entities.
required:
- property
- order
required:
- type
required:
oneOf:
- $ref: '#/components/schemas/def-0'
description: A jq query that runs on the action's inputs and resolves to a boolean value (`true` = required).
title: jqQuery
- type: array
description: The identifiers of the required inputs.
items:
type: string
title: array
titles:
type: object
propertyNames:
pattern: ^[A-Za-z0-9@_=\\-]+$
additionalProperties:
type: object
properties:
title:
type: string
maxLength: 140
minLength: 1
description:
type: string
maxLength: 1000
visible:
anyOf:
- type: boolean
- $ref: '#/components/schemas/def-0'
steps:
type: array
description: The steps of the user inputs. Each step is an object containing its title and the order of its properties.
items:
type: object
properties:
title:
type: string
description: The title of the step.
order:
type: array
description: The order of the properties in the step - an array of property identifiers.
items:
type: string
visible:
oneOf:
- $ref: '#/components/schemas/def-0'
description: A [jq query](https://stedolan.github.io/jq/manual/) that resolves to `true` or `false`, determining the visibility of the step.
title: jqQuery
- type: boolean
description: A boolean value determining the visibility of the step.
title: boolean
title: Visible
description: The visibility of the step. Resolves to a boolean value (`true` = visible).
required:
- title
additionalProperties: false
required:
- properties
- steps
additionalProperties: false
description: The [user inputs](https://docs.port.io/create-self-service-experiences/setup-ui-for-action/user-inputs/) of the action.
actionCardButtonText:
type: string
maxLength: 15
minLength: 1
pattern: ^[^\s].*[^\s]$
executeActionButtonText:
type: string
maxLength: 15
minLength: 1
pattern: ^[^\s].*[^\s]$
condition:
type: object
description: Filters used to include/exclude specific entities from the action.
additionalProperties: false
properties:
type:
type: string
enum:
- SEARCH
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'
combinator:
type: string
enum:
- and
- or
required:
- type
- rules
- combinator
dependencies:
condition:
- blueprintIdentifier
required:
- type
- userInputs
- operation
additionalProperties: false
title: Self-service (DAY-2/DELETE)
- type: object
description: The trigger definition of the action.
properties:
operation:
type: string
enum:
- CREATE
description: The [operation type](https://docs.port.io/create-self-service-experiences/setup-ui-for-action/#basic-details) of the action.
type:
type: string
enum:
- self-service
blueprintIdentifier:
type: string
description: The identifier of the blueprint that the action is associated with.
Note that this is optional, as actions do not have to be tied directly to a blueprint.
userInputs:
oneOf:
- type: object
title: Default order
description: Use this option when you don't want to define a custom order/steps for the user inputs.
properties:
properties:
type: object
propertyNames:
pattern: ^[A-Za-z0-9@_=\\-]+$
additionalProperties:
type: object
properties:
type:
enum:
- string
- number
- boolean
- object
- array
title: Type
description: The type of the input.
jqQuery:
type: 'null'
format:
enum:
- date-time
- url
- email
- ipv4
- ipv6
- yaml
- entity
- user
- team
- proto
- markdown
- multi-line
- labeled-url
title: Format
description: The format of the input.
blueprint:
type: string
title: Blueprint
description: When using the `entity` format, this is the identifier of the blueprint whose entities will be selectable via this input.
dependsOn:
type: array
items:
type: string
title: Depends On
description: The identifiers of the inputs that this input depends on. This input will be disabled until they have been given a value.
visible:
oneOf:
- $ref: '#/components/schemas/def-0'
description: A [jq query](https://stedolan.github.io/jq/manual/) that resolves to `true` or `false`, determining the visibility of the input.
title: jqQuery
- type: boolean
description: A boolean value determining the visibility of the input.
title: boolean
title: Visible
description: The visibility of the input. Resolves to a boolean value (`true` = visible).
icon:
type: string
title: Icon
description: The icon of the input.
dataset:
$ref: '#/components/schemas/def-2'
title: Dataset
description: The dataset to use for entity selection inputs.
sort:
type: object
title: Sort
description: Relevant only for `Entity selection` inputs (`type` = `string` and `format` = `entity`).
This input allows you to sort the entities in the dropdown by a specific property.
properties:
property:
type: string
title: Property
description: The property by which to sort the entities.
order:
type: string
enum:
- ASC
- DESC
title: Order
description: The order in which to sort the entities.
required:
- property
- order
required:
- type
titles:
type: object
propertyNames:
pattern: ^[A-Za-z0-9@_=\\-]+$
additionalProperties:
type: object
properties:
title:
type: string
maxLength: 140
minLength: 1
description:
type: string
maxLength: 1000
visible:
anyOf:
- type: boolean
- $ref: '#/components/schemas/def-0'
required:
oneOf:
- $ref: '#/components/schemas/def-0'
description: A jq query that runs on the action's inputs and resolves to a boolean value (`true` = required).
title: jqQuery
- type: array
description: The identifiers of the required inputs.
items:
type: string
title: array
required:
- properties
additionalProperties: false
- type: object
title: Custom order
description: Use this option when you want to define a custom order for the user inputs.
properties:
properties:
type: object
propertyNames:
pattern: ^[A-Za-z0-9@_=\\-]+$
additionalProperties:
type: object
properties:
type:
enum:
- string
- number
- boolean
- object
- array
title: Type
description: The type of the input.
jqQuery:
type: 'null'
format:
enum:
- date-time
- url
- email
- ipv4
- ipv6
- yaml
- entity
- user
- team
- proto
- markdown
- multi-line
- labeled-url
title: Format
description: The format of the input.
blueprint:
type: string
title: Blueprint
description: When using the `entity` format, this is the identifier of the blueprint whose entities will be selectable via this input.
dependsOn:
type: array
items:
type: string
title: Depends On
description: The identifiers of the inputs that this input depends on. This input will be disabled until they have been given a value.
visible:
oneOf:
- $ref: '#/components/schemas/def-0'
description: A [jq query](https://stedolan.github.io/jq/manual/) that resolves to `true` or `false`, determining the visibility of the input.
title: jqQuery
- type: boolean
description: A boolean value determining the visibility of the input.
title: boolean
title: Visible
description: The visibility of the input. Resolves to a boolean value (`true` = visible).
icon:
type: string
title: Icon
description: The icon of the input.
dataset:
$ref: '#/components/schemas/def-2'
title: Dataset
description: The dataset to use for entity selection inputs.
sort:
type: object
title: Sort
description: Relevant only for `Entity selection` inputs (`type` = `string` and `format` = `entity`).
This input allows you to sort the entities in the dropdown by a specific property.
properties:
property:
type: string
title: Property
description: The property by which to sort the entities.
order:
type: string
enum:
- ASC
- DESC
title: Order
description: The order in which to sort the entities.
required:
- property
- order
required:
- type
required:
oneOf:
- $ref: '#/components/schemas/def-0'
description: A jq query that runs on the action's inputs and resolves to a boolean value (`true` = required).
title: jqQuery
- type: array
description: The identifiers of the required inputs.
items:
type: string
title: array
titles:
type: object
propertyNames:
pattern: ^[A-Za-z0-9@_=\\-]+$
additionalProperties:
type: object
properties:
title:
type: string
maxLength: 140
minLength: 1
description:
type: string
maxLength: 1000
visible:
anyOf:
- type: boolean
- $ref: '#/components/schemas/def-0'
order:
type: array
items:
type: string
required:
- properties
- order
additionalProperties: false
- type: object
title: Custom steps
description: Use this option when you want to define custom steps for the user inputs.
properties:
properties:
type: object
propertyNames:
pattern: ^[A-Za-z0-9@_=\\-]+$
additionalProperties:
type: object
properties:
type:
enum:
- string
- number
- boolean
- object
- array
title: Type
description: The type of the input.
jqQuery:
type: 'null'
format:
enum:
- date-time
- url
- email
- ipv4
- ipv6
- yaml
- entity
- user
- team
- proto
- markdown
- multi-line
- labeled-url
title: Format
description: The format of the input.
blueprint:
type: string
title: Blueprint
description: When using the `entity` format, this is the identifier of the blueprint whose entities will be selectable via this input.
dependsOn:
type: array
items:
type: string
title: Depends On
description: The identifiers of the inputs that this input depends on. This input will be disabled until they have been given a value.
visible:
oneOf:
- $ref: '#/components/schemas/def-0'
description: A [jq query](https://stedolan.github.io/jq/manual/) that resolves to `true` or `false`, determining the visibility of the input.
title: jqQuery
- type: boolean
description: A boolean value determining the visibility of the input.
title: boolean
title: Visible
description: The visibility of the input. Resolves to a boolean value (`true` = visible).
icon:
type: string
title: Icon
description: The icon of the input.
dataset:
$ref: '#/components/schemas/def-2'
title: Dataset
description: The dataset to use for entity selection inputs.
sort:
type: object
title: Sort
description: Relevant only for `Entity selection` inputs (`type` = `string` and `format` = `entity`).
This input allows you to sort the entities in the dropdown by a specific property.
properties:
property:
type: string
title: Property
description: The property by which to sort the entities.
order:
type: string
enum:
- ASC
- DESC
title: Order
description: The order in which to sort the entities.
required:
- property
- order
required:
- type
required:
oneOf:
- $ref: '#/components/schemas/def-0'
description: A jq query that runs on the action's inputs and resolves to a boolean value (`true` = required).
title: jqQuery
- type: array
description: The identifiers of the required inputs.
items:
type: string
title: array
titles:
type: object
propertyNames:
pattern: ^[A-Za-z0-9@_=\\-]+$
additionalProperties:
type: object
properties:
title:
type: string
maxLength: 140
minLength: 1
description:
type: string
maxLength: 1000
visible:
anyOf:
- type: boolean
- $ref: '#/components/schemas/def-0'
steps:
type: array
description: The steps of the user inputs. Each step is an object containing its title and the order of its properties.
items:
type: object
properties:
title:
type: string
description: The title of the step.
order:
type: array
description: The order of the properties in the step - an array of property identifiers.
items:
type: string
visible:
oneOf:
- $ref: '#/components/schemas/def-0'
description: A [jq query](https://stedolan.github.io/jq/manual/) that resolves to `true` or `false`, determining the visibility of the step.
title: jqQuery
- type: boolean
description: A boolean value determining the visibility of the step.
title: boolean
title: Visible
description: The visibility of the step. Resolves to a boolean value (`true` = visible).
required:
- title
additionalProperties: false
required:
- properties
- steps
additionalProperties: false
description: The [user inputs](https://docs.port.io/create-self-service-experiences/setup-ui-for-action/user-inputs/) of the action.
actionCardButtonText:
type: string
maxLength: 15
minLength: 1
pattern: ^[^\s].*[^\s]$
executeActionButtonText:
type: string
maxLength: 15
minLength: 1
pattern: ^[^\s].*[^\s]$
required:
- type
- userInputs
- operation
additionalProperties: false
title: Self-service (CREATE)
- type: object
description: The trigger definition of the action.
properties:
type:
type: string
enum:
- automation
event:
description: The [event](https://docs.port.io/actions-and-automations/define-automations/setup-trigger) that triggers the action.
oneOf:
- type: object
properties:
type:
type: string
enum:
- ENTITY_CREATED
blueprintIdentifier:
type: string
description: The identifier of the blueprint whose entities will trigger the automation.
required:
- type
- blueprintIdentifier
additionalProperties: false
title: Entity created
- type: object
properties:
type:
type: string
enum:
- ENTITY_UPDATED
blueprintIdentifier:
type: string
description: The identifier of the blueprint whose entities will trigger the automation.
required:
- type
- blueprintIdentifier
additionalProperties: false
title: Entity updated
- type: object
properties:
type:
type: string
enum:
- ENTITY_DELETED
blueprintIdentifier:
type: string
description: The identifier of the blueprint whose entities will trigger the automation.
required:
- type
- blueprintIdentifier
additionalProperties: false
title: Entity deleted
- type: object
properties:
type:
type: string
enum:
- TIMER_PROPERTY_EXPIRED
blueprintIdentifier:
type: string
description: The identifier of the blueprint whose entities will trigger the automation.
propertyIdentifier:
type: string
description: The identifier of the timer property in the specified blueprint.
required:
- type
- blueprintIdentifier
- propertyIdentifier
additionalProperties: false
title: Timer property expired
- type: object
properties:
type:
type: string
enum:
- ANY_ENTITY_CHANGE
blueprintIdentifier:
type: string
description: The identifier of the blueprint whose entities will trigger the automation.
required:
- type
- blueprintIdentifier
additionalProperties: false
title: Any entity change
- type: object
properties:
type:
type: string
enum:
- RUN_CREATED
actionIdentifier:
type: string
required:
- type
- actionIdentifier
additionalProperties: false
title: Run created
- type: object
properties:
type:
type: string
enum:
- RUN_UPDATED
actionIdentifier:
type: string
required:
- type
- actionIdentifier
additionalProperties: false
title: Run updated
- type: object
properties:
type:
type: string
enum:
- ANY_RUN_CHANGE
actionIdentifier:
type: string
required:
- type
- actionIdentifier
additionalProperties: false
title: Any run change
condition:
description: Filters used to include/exclude specific entities from the automation.
oneOf:
- type: object
properties:
type:
type: string
enum:
- JQ
expressions:
type: array
items:
type: string
description: An array of [jq expressions](https://docs.port.io/search-and-query/structure-and-syntax) used to filter entities.
Read more [here](https://docs.port.io/actions-and-automations/define-automations/setup-trigger#conditions).
combinator:
type: string
enum:
- and
- or
required:
- type
- expressions
additionalProperties: false
title: JQ
required:
- type
- event
additionalProperties: false
title: Automation
invocationMethod:
description: Details the action's backend type and details.
oneOf:
- type: object
properties:
type:
type: string
enum:
- KAFKA
payload:
description: An object containing the [action payload](https://docs.port.io/create-self-service-experiences/setup-backend/#define-the-actions-payload).
oneOf:
- type: array
- type: object
required:
- type
additionalProperties: false
title: Kafka
- type: object
properties:
type:
type: string
enum:
- WEBHOOK
url:
type: string
description: The URL of the webhook.
agent:
oneOf:
- type: boolean
- type: string
description: If `true`, Port's [execution agent](https://docs.port.io/create-self-service-experiences/setup-backend/webhook/port-execution-agent/) will be used to handle invocations of this action.
synchronized:
oneOf:
- type: boolean
- type: string
description: If `true`, the action will be executed [synchronously](https://docs.port.io/create-self-service-experiences/setup-backend/webhook/#sync-vs-async-execution).
method:
type: string
description: The HTTP method of the webhook (`POST`, `PUT`, `PATCH`, or `DELETE`).
headers:
type: object
additionalProperties:
type: string
description: A JSON object containing the headers to be sent to the webhook in each execution, in `"key"`:`"value"` pairs.
body:
oneOf:
- type: array
- type: object
description: The body sent to the webhook in each execution. This is where the [action payload](https://docs.port.io/create-self-service-experiences/setup-backend/#define-the-actions-payload) is specified.
required:
- type
- url
additionalProperties: false
title: Webhook
- type: object
properties:
type:
type: string
enum:
- GITHUB
org:
type: string
repo:
type: string
workflow:
type: string
workflowInputs:
type: object
reportWorkflowStatus:
oneOf:
- type: boolean
- type: string
required:
- type
- org
- repo
- workflow
additionalProperties: false
title: GitHub
- type: object
properties:
type:
type: string
enum:
- INTEGRATION_ACTION
installationId:
type: string
integrationActionType:
type: string
enum:
- dispatch_workflow
integrationActionExecutionProperties:
type: object
required:
- type
- installationId
- integrationActionType
- integrationActionExecutionProperties
additionalProperties: false
title: Integration Action
- type: object
properties:
type:
type: string
enum:
- GITLAB
projectName:
type: string
groupName:
type: string
defaultRef:
type: string
pipelineVariables:
type: object
required:
- type
- projectName
- groupName
additionalProperties: false
title: GitLab
- type: object
properties:
type:
type: string
enum:
- AZURE_DEVOPS
webhook:
type: string
org:
type: string
payload:
oneOf:
- type: array
- type: object
required:
- type
- webhook
- org
additionalProperties: false
title: Azure DevOps
- type: object
properties:
type:
type: string
enum:
- UPSERT_ENTITY
blueprintIdentifier:
type: string
mapping:
type: object
properties:
identifier:
type: string
title:
type: string
team:
oneOf:
- type: string
- type: array
items:
type: string
icon:
type: string
properties:
type: object
relations:
type: object
additionalProperties:
oneOf:
- type: string
- type: array
items:
type: string
- type: 'null'
required: []
required:
- type
- blueprintIdentifier
- mapping
additionalProperties: false
title: Upsert Entity
requiredApproval:
description: Determines whether the action requires approval before execution.
Choose `ALL` to require all specified users to approve the action, or `ANY` to require only one.
oneOf:
- type: object
properties:
type:
type: string
enum:
- ANY
- ALL
required:
- type
additionalProperties: false
title: User/s
- type: boolean
title: boolean
approvalNotification:
type: object
description: The notification configuration for the approval process. Relevant only if `requiredApproval` is set to `true`.
properties:
type:
type: string
enum:
- webhook
- email
default: email
oneOf:
- type: object
properties:
type:
type: string
enum:
- webhook
format:
type: string
enum:
- json
- slack
url:
type: string
format: uri
required:
- type
- url
additionalProperties: false
title: Webhook
- type: object
properties:
type:
type: string
enum:
- email
required:
- type
additionalProperties: false
title: Email
required:
- type
publish:
type: boolean
description: Only relevant for **automations**. If `false`, the automation will be inactive (will not be triggered).
allowAnyoneToViewRuns:
type: boolean
description: Whether members can view the runs of this action.
additionalProperties: false
required:
- identifier
- trigger
- invocationMethod
required: true
parameters:
- schema:
type: string
minLength: 1
in: path
name: action_identifier
required: true
description: The identifier of the action/automation you want to operate on.
security:
- bearer:
- update:actions
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: string
message:
type: string
required:
- ok
- error
additionalProperties: false
description: Request body is too large (limit is 1MiB)
'422':
description: The json provided does not match the route's schema
content:
application/json:
schema:
properties:
ok:
const: false
error:
type: string
message:
type: string
required:
- ok
- error
- message
additionalProperties: false
description: The json provided does not match the route's schema
get:
summary: Get an action/automation
tags:
- Actions
description: This route allows you to fetch the details of a self-service action or automation.
To learn more about actions and automations, check out the [documentation](https://docs.port.io/actions-and-automations/).
parameters:
- schema:
type: string
minLength: 1
in: path
name: action_identifier
required: true
description: The identifier of the action/automation you want to operate on.
security:
- bearer:
- read:actions
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
delete:
summary: Delete an action/automation
tags:
- Actions
description: This route allows you to delete a self-service action or automation.
To learn more about actions and automations, check out the [documentation](https://docs.port.io/actions-and-automations/).
parameters:
- schema:
type: string
minLength: 1
in: path
name: action_identifier
required: true
description: The identifier of the action/automation you want to operate on.
security:
- bearer:
- delete:actions
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: string
message:
type: string
required:
- ok
- error
additionalProperties: false
description: Request body is too large (limit is 1MiB)
'422':
description: The json provided does not match the route's schema
content:
application/json:
schema:
properties:
ok:
const: false
error:
type: string
message:
type: string
required:
- ok
- error
- message
additionalProperties: false
description: The json provided does not match the route's schema
/v1/blueprints/{blueprint_identifier}/actions:
post:
summary: This route is deprecated since November 20th 2024
tags:
- Actions
description: This route is deprecated since November 20th 2024
requestBody:
content:
application/json:
schema:
type: object
nullable: true
parameters:
- schema: object
in: path
name: type
required: true
- schema: true
in: path
name: nullable
required: true
deprecated: true
security:
- bearer:
- create:actions
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: string
message:
type: string
required:
- ok
- error
additionalProperties: false
description: Request body is too large (limit is 1MiB)
'422':
description: The json provided does not match the route's schema
content:
application/json:
schema:
properties:
ok:
const: false
error:
type: string
message:
type: string
required:
- ok
- error
- message
additionalProperties: false
description: The json provided does not match the route's schema
put:
summary: This route is deprecated since November 20th 2024
tags:
- Actions
description: This route is deprecated since November 20th 2024
requestBody:
content:
application/json:
schema:
type: object
nullable: true
parameters:
- schema: object
in: path
name: type
required: true
- schema: true
in: path
name: nullable
required: true
deprecated: true
security:
- bearer:
- update:actions
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: string
message:
type: string
required:
- ok
- error
additionalProperties: false
description: Request body is too large (limit is 1MiB)
'422':
description: The json provided does not match the route's schema
content:
application/json:
schema:
properties:
ok:
const: false
error:
type: string
message:
type: string
required:
- ok
- error
- message
additionalProperties: false
description: The json provided does not match the route's schema
get:
summary: This route is deprecated since November 20th 2024
tags:
- Actions
description: This route is deprecated since November 20th 2024
parameters:
- schema: object
in: path
name: type
required: true
- schema: true
in: path
name: nullable
required: true
deprecated: true
security:
- bearer:
- read:actions
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
/v1/blueprints/{blueprint_identifier}/actions/{action_identifier}:
put:
summary: This route is deprecated since November 20th 2024
tags:
- Actions
description: This route is deprecated since November 20th 2024
requestBody:
content:
application/json:
schema:
type: object
nullable: true
parameters:
- schema: object
in: path
name: type
required: true
- schema: true
in: path
name: nullable
required: true
deprecated: true
security:
- bearer:
- update:actions
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: string
message:
type: string
required:
- ok
- error
additionalProperties: false
description: Request body is too large (limit is 1MiB)
'422':
description: The json provided does not match the route's schema
content:
application/json:
schema:
properties:
ok:
const: false
error:
type: string
message:
type: string
required:
- ok
- error
- message
additionalProperties: false
description: The json provided does not match the route's schema
get:
summary: This route is deprecated since November 20th 2024
tags:
- Actions
description: This route is deprecated since November 20th 2024
parameters:
- schema: object
in: path
name: type
required: true
- schema: true
in: path
name: nullable
required: true
deprecated: true
security:
- bearer:
- read:actions
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
delete:
summary: This route is deprecated since November 20th 2024
tags:
- Actions
description: This route is deprecated since November 20th 2024
parameters:
- schema: object
in: path
name: type
required: true
- schema: true
in: path
name: nullable
required: true
deprecated: true
security:
- bearer:
- delete:actions
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: string
message:
type: string
required:
- ok
- error
additionalProperties: false
description: Request body is too large (limit is 1MiB)
'422':
description: The json provided does not match the route's schema
content:
application/json:
schema:
properties:
ok:
const: false
error:
type: string
message:
type: string
required:
- ok
- error
- message
additionalProperties: false
description: The json provided does not match the route's schema
/v1/actions/{action_identifier}/permissions:
get:
summary: Get an action's permissions
tags:
- Actions
description: This route allows you to fetch the permissions of a self-service action.
To learn more about action RBAC, check out the [documentation](https://docs.port.io/actions-and-automations/create-self-service-experiences/set-self-service-actions-rbac/).
parameters:
- schema:
type: string
minLength: 1
in: path
name: action_identifier
required: true
description: The identifier of the action/automation you want 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
patch:
summary: Update an action's permissions
tags:
- Actions
description: This route allows you to update the permissions of a self-service action.
To learn more about action RBAC, check out the [documentation](https://docs.port.io/actions-and-automations/create-self-service-experiences/set-self-service-actions-rbac/).
requestBody:
content:
application/json:
schema:
type: object
properties:
execute:
type: object
description: An object used to define who can execute the action.
properties:
users:
type: array
items:
type: string
description: The email addresses of the users who can execute the action.
roles:
type: array
items:
type: string
description: The roles that can execute the action.
teams:
type: array
items:
type: string
description: The names of the teams whose members can execute the action.
ownedByTeam:
type: boolean
description: Relevant only for [DAY-2/DELETE actions](https://docs.port.io/actions-and-automations/create-self-service-experiences/setup-ui-for-action/#basic-details). If `true`, any member of the team that the entity belongs to can execute the action.
policy:
type:
- object
- 'null'
properties:
queries:
type: object
description: One or more queries to fetch data from your software catalog.
minProperties: 1
additionalProperties:
$ref: '#/components/schemas/def-1'
conditions:
type: array
items:
type: string
minLength: 1
minItems: 1
description: '`JQ` expressions that run against the provided queries, and resolve to a boolean value (`true` = allowed to execute).'
required:
- queries
- conditions
additionalProperties: false
description: An optional custom policy the determines if action execution is allowed.
See instructions and examples [here](https://docs.port.io/actions-and-automations/create-self-service-experiences/set-self-service-actions-rbac/dynamic-permissions/#instructions).
additionalProperties: false
approve:
type: object
description: An object used to define who can approve the action.
properties:
users:
type: array
items:
type: string
description: The email addresses of the users who can approve the action.
roles:
type: array
items:
type: string
description: The roles that can approve the action.
teams:
type: array
items:
type: string
description: The names of the teams whose members can approve the action.
policy:
type:
- object
- 'null'
properties:
queries:
type: object
description: One or more queries to fetch data from your software catalog.
minProperties: 1
additionalProperties:
$ref: '#/components/schemas/def-1'
conditions:
type: array
items:
type: string
minLength: 1
minItems: 1
description: '`JQ` expressions that run against the provided queries, and resolve to a boolean value (`true` = allowed to execute).'
required:
- queries
- conditions
additionalProperties: false
description: An optional custom policy the determines who can approve the action.
See instructions and examples [here](https://docs.port.io/actions-and-automations/create-self-service-experiences/set-self-service-actions-rbac/dynamic-permissions/#instructions).
additionalProperties: false
additionalProperties: false
parameters:
- schema:
type: string
minLength: 1
in: path
name: action_identifier
required: true
description: The identifier of the action/automation you want 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: string
message:
type: string
required:
- ok
- error
additionalProperties: false
description: Request body is too large (limit is 1MiB)
'422':
description: The json provided does not match the route's schema
content:
application/json:
schema:
properties:
ok:
const: false
error:
type: string
message:
type: string
required:
- ok
- error
- message
additionalProperties: false
description: The json provided does not match the route's schema
components:
schemas:
def-1:
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
title: /schemas/entitiesQuery
def-2:
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: Expired Rule
oneOf:
- type: object
title: Expired Rule
properties:
operator:
enum:
- isExpired
- isNotExpired
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
- $ref: '#/components/schemas/def-0'
- type: object
properties:
property:
type: string
context:
type: string
enum:
- user
- userTeams
required:
- property
- context
required:
- property
- operator
- value
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
- $ref: '#/components/schemas/def-0'
- 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
- $ref: '#/components/schemas/def-0'
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
- $ref: '#/components/schemas/def-0'
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-2'
required:
- combinator
- rules
additionalProperties: false
title: /schemas/entitiesQueryWithJqQuery
def-0:
type: object
properties:
jqQuery:
type: string
description: A [jq query](https://stedolan.github.io/jq/manual/) that resolves to `true` or `false`, determining the visibility of the input.
required:
- jqQuery
additionalProperties: false
title: /schemas/userInputs/jqQuery
securitySchemes:
bearer:
type: apiKey
name: Authorization
in: header