Create an action
POST/v1/actions
This route allows you to create a new self-service action in your Port account.
To learn more about actions, check out the documentation.
Request
- application/json
Body
required
- Self-service
- jqQuery
- boolean
Array [
- Empty Rule
- Date Rule
- Number Rule
- String Rule
- Relation Rule
- Schema Rule
- MOD1
- MOD2
- MOD2
- MOD2
- MOD3
- MOD4
- MOD5
- MOD6
- MOD7
Array [
]
- MOD1
- MOD2
- MOD2
- MOD3
- MOD4
- MOD5
]
- jqQuery
- array
Array [
]
- Kafka
- Webhook
- GitHub
- GitLab
- Azure DevOps
- Webhook
Possible values: Value must match regular expression ^[A-Za-z0-9@_.:\\/=-]+$
The identifier of the new action.
The title of the new action.
The icon of the new action.
The description of the new action.
trigger
object
required
oneOf
Possible values: [self-service
]
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
object
required
The user inputs of the action.
properties
object
required
property name*
object
Possible values: [string
, number
, boolean
, object
, array
]
Possible values: [date-time
, url
, email
, ipv4
, ipv6
, yaml
, entity
, user
, team
, proto
, markdown
]
When using the entity
format, this is the identifier of the blueprint whose entities will be selectable via this input.
The identifiers of the inputs that this input depends on. This input will be disabled until they have been given a value.
visible
object
The visibility of the input. Resolves to a boolean value (true
= visible).
oneOf
A jq query that resolves to true
or false
, determining the visibility of the input.
boolean
The icon of the input.
dataset
object
Possible values: [and
, or
]
The combinator to use when calculating the rules.
rules
object[]
required
Possible values: >= 1
anyOf
Possible values: [isEmpty
, isNotEmpty
]
Possible values: [between
, notBetween
, =
]
value
object
required
oneOf
Possible values: [today
, tomorrow
, yesterday
, lastWeek
, last2Weeks
, lastMonth
, last3Months
, last6Months
, last12Months
]
Possible values: [>
, >=
, <
, <=
]
value
object
required
oneOf
Possible values: [=
, !=
, containsAny
, contains
, doesNotContains
, beginsWith
, doesNotBeginsWith
, endsWith
, doesNotEndsWith
, in
, notIn
]
value
object
required
anyOf
string
number
boolean
string
string
Possible values: [relatedTo
]
value
object
required
anyOf
string
Possible values: [upstream
, downstream
]
propertySchema
object
required
Possible values: [=
, !=
]
value
object
anyOf
string
number
boolean
required
object
The required inputs' identifier/s. The inputs specified in this array must be given a value when executing the action.
oneOf
string
The order of the inputs. The order of the identifiers in this array will determine the order of the inputs in the UI.
invocationMethod
object
required
Details the action's backend type and details.
oneOf
Possible values: [KAFKA
]
An object containing the action payload.
Possible values: [WEBHOOK
]
The URL of the webhook.
If true
, Port's execution agent will be used to handle invocations of this action.
If true
, the action will be executed synchronously.
The HTTP method of the webhook (POST
, PUT
, PATCH
, or DELETE
).
A JSON object containing the headers to be sent to the webhook in each execution, in "key"
:"value"
pairs.
The body sent to the webhook in each execution. This is where the action payload is specified.
Possible values: [GITHUB
]
The Github organization in which the workflow is located.
The Github repository in which the workflow is located.
The name of the workflow (YAML file) to trigger. The file should be placed under .github/workflows/
.
The action payload to be sent to Github upon execution.
If true
, the action run will update its status automatically based on the workflow's result (pass/fail).
Possible values: [GITLAB
]
The GitLab project in which the pipeline is located.
The GitLab group in which the project is located.
The default ref (branch/tag name) we want the action to use. Default ref can be overridden dynamically by adding "ref" as a user input. If not set, the agent triggers the main
branch.
The action payload to be sent to GitLab upon execution.
Possible values: [AZURE_DEVOPS
]
The name of the webhook resource in the Azure YAML pipeline file.
The Azure DevOps organization in which the pipeline is located.
The action payload to be sent to Azure DevOps upon execution.
If true
, the action will require approval for each execution.
approvalNotification
object
The notification configuration for the approval process. Relevant only if requiredApproval
is set to true
.
oneOf
Possible values: [webhook
]
Possible values: [json
, slack
]
The URL of the webhook.
Possible values: [email
]
If true
, the action will be visible to all users and available for use.
Responses
- 200
Default Response