Skip to main content

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

Body

required

    identifier stringrequired

    Possible values: Value must match regular expression ^[A-Za-z0-9@_.:\\/=-]+$

    The identifier of the new action.

    title string

    The title of the new action.

    icon string

    The icon of the new action.

    description string

    The description of the new action.

    trigger

    object

    required

    oneOf

    type stringrequired

    Possible values: [self-service]

    blueprintIdentifier string

    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.

    operation stringrequired

    Possible values: [CREATE, DELETE, DAY-2]

    The operation type of the action.

    userInputs

    object

    required

    The user inputs of the action.

    properties

    object

    required

    property name*

    object

    type required

    Possible values: [string, number, boolean, object, array]

    format

    Possible values: [date-time, url, email, ipv4, ipv6, yaml, entity, user, team, proto, markdown]

    blueprint string

    When using the entity format, this is the identifier of the blueprint whose entities will be selectable via this input.

    dependsOn string[]

    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

    jqQuery stringrequired

    A jq query that resolves to true or false, determining the visibility of the input.

    icon string

    The icon of the input.

    dataset

    object

    combinator stringrequired

    Possible values: [and, or]

    The combinator to use when calculating the rules.

    rules

    object[]

    required

    Possible values: >= 1

  • Array [

  • anyOf

    operator required

    Possible values: [isEmpty, isNotEmpty]

    property stringrequired
  • ]

  • required

    object

    The required inputs' identifier/s. The inputs specified in this array must be given a value when executing the action.

    oneOf

    jqQuery stringrequired
    order 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

    type stringrequired

    Possible values: [KAFKA]

    payload object

    An object containing the action payload.

    requiredApproval boolean

    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

    type stringrequired

    Possible values: [webhook]

    format string

    Possible values: [json, slack]

    url urirequired

    The URL of the webhook.

    publish boolean

    If true, the action will be visible to all users and available for use.

Responses

Default Response

Loading...