Skip to main content

Check out Port for yourself 

Execute a self-service action

POST 

https://api.port.io/v1/actions/:action_identifier/runs

This route allows you to execute a self-service action, thus creating an action run.

To learn more about action runs, check out the documentation.

Request

Path Parameters

    action_identifier stringrequired

    Possible values: non-empty

    The identifier of the action you want to execute.

Query Parameters

    run_as email

    The executing user of the action. If not provided, the action will be run on behalf of the user/machine who initiated the action (identified by the bearer token used to execute this route).

Bodyrequired

    propertiesobjectrequired

    The action's user inputs, in "key":"value" pairs, where the key is the input's identifier and the value is the input's value.

    entitystring

    The identifier of the entity that the action will be executed on, if relevant.

Responses

Executed successfully.

Schema
    okanyrequired

    Possible values: [true]

    run object
    idstringrequired
    blueprint object
    identifierstringrequired
    titlestring | nullnullable
    iconstring | nullnullable
    deletedboolean
    entity object
    identifierstringrequired
    titlestring | nullnullable
    iconstring | nullnullable
    deletedboolean
    action objectrequired
    identifierstringrequired
    titlestring | nullnullable
    iconstring | nullnullable
    deletedboolean
    propertiesobjectrequired
    endedAtstring<date-time>
    sourcestring | objectrequired
    requiredApproval booleanobjectrequired
    typestringrequired

    Possible values: [ALL, ANY]

    statusstringrequired
    statusLabelstring | nullnullable
    linkstring[]
    summarystring
    approval objectnull
    descriptionstring
    userIdstring | nullnullable
    statestring
    payload objectnull
    typestring
    urlstring<uri>
    agentboolean
    synchronizedboolean
    methodstring
    headers object
    RUN_IDstring
    body object
    port_context object
    runIdstring
    responseundefined[]
    createdBystring
    updatedBystring
    createdAtstring<date-time>
    updatedAtstring<date-time>

Authorization: Authorization

name: Authorizationtype: apiKeyin: header
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://api.port.io/v1/actions/:action_identifier/runs");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "<Authorization>");
var content = new StringContent("{\n \"properties\": {},\n \"entity\": \"string\"\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Request Collapse all
Base URL
https://api.port.io
Auth
Parameters
— pathrequired
— query
Body required
{
  "properties": {},
  "entity": "string"
}
ResponseClear

Click the Send API Request button above and see the response here!