Add an action to the end of the list

kind defaults to forward, which needs a url. A notify needs an alertChannelId naming one of the workspace's alert channels. A subrequest needs an apiRequestId naming one of the workspace's saved requests, plus a slotMapping covering every field that request declares. Create the saved request it sends with createSavedRequest (over a connection from createConnection) and pass its id as apiRequestId.

A kind the plan does not include is refused with code: kind_not_available. A forward url is checked against the same SSRF policy the dispatcher enforces at connect time, so a private or internal address is refused here; a subrequest is checked the same way against its connection's base URL.

A notify action needs Pro; forward and call actions work on every plan.

POST
/api/v1/endpoints/{endpointId}/actions
AuthorizationBearer <token>

API key in the Authorization header: Authorization: Bearer wv_live_…. Keys are created on the API keys page in the app, shown once, and scoped to your workspace. A key acts for the person who created it: each call needs the operation's scope (x-wv-scope) and is limited to what that person's role allows now. X-Api-Key: wv_live_… is accepted as a fallback for tools that can't set Authorization.

In: header

Path Parameters

endpointId*string

The endpoint id (also the capture token in its URL).

Formatuuid

Query Parameters

dryRun?boolean

true runs the operation and then undoes it: nothing is stored, sent or queued. A call that would be refused answers exactly as it would without dryRun; one that would succeed answers 200 with dryRun, the status it would have returned, a plain-language summary of what it would do, and the result it would have returned. A dry run never needs approval.

Defaultfalse

Header Parameters

Idempotency-Key?string

1 to 255 printable ASCII characters you choose, kept 24 hours per key. Sending the same request again with the same value returns the first answer (with Idempotent-Replayed: true) instead of running again. The same value with a different request is 422 idempotency_key_reused; while the first is still running, 409 idempotency_in_progress.

Lengthlength <= 255
Approval-Id?string

The approval a 202 approval_required answer gave. Send exactly the same request again (method, path, query and body) with this header once the person has approved: it runs once. Refusals: 404 approval_not_found, 409 approval_pending, approval_declined, approval_expired or approval_used, 422 approval_mismatch (a different request), 412 version_mismatch (the target changed after the approval was asked), 409 reach_changed (the change now reaches more than the person approved).

Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

{
  "dryRun": true,
  "status": 0,
  "summary": "string",
  "reach": {
    "kind": "endpoint",
    "targetId": "cbca1126-180e-4334-9df8-cf82289d378b",
    "targetName": "string",
    "classes": [
      "routing"
    ],
    "live": true,
    "asks": true,
    "differences": [
      {
        "field": "string",
        "class": "routing",
        "before": "string",
        "after": "string"
      }
    ],
    "links": [
      {
        "kind": "string",
        "total": 0,
        "liveTotal": 0,
        "items": [
          {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
            "name": "string",
            "live": true
          }
        ]
      }
    ],
    "endpoints": {
      "total": 0,
      "liveTotal": 0,
      "items": [
        {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "name": "string",
          "live": true,
          "arrivals24h": 0
        }
      ]
    },
    "arrivals24h": 0,
    "alertEvents": [
      "string"
    ],
    "routineNotices": true,
    "newDestination": "string",
    "text": "string",
    "fingerprint": "string"
  },
  "result": null
}
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "kind": "forward",
  "name": "string",
  "position": 0,
  "url": "string",
  "isActive": true,
  "suspendedByPlan": true,
  "condition": {},
  "conditionDescription": "string",
  "signing": {
    "signed": true,
    "setAt": "2019-08-24T14:15:22Z"
  },
  "ruleCount": 0,
  "alertChannelId": "48f8dcc3-fd9c-427f-bf34-54017ef3c9a6",
  "alertChannelName": "string",
  "messageTemplate": "string",
  "channelUnavailable": true,
  "apiRequestId": "6ecc081a-ed69-4059-83bc-ec5b8abdbb90",
  "apiRequestName": "string",
  "slotMapping": {
    "property1": "string",
    "property2": "string"
  },
  "requestUnavailable": true,
  "successStatusCodes": "string",
  "successCondition": {},
  "successDescription": "string",
  "includeInReplays": true,
  "warnBeforeDuplicate": true,
  "etag": "string"
}
{
  "code": "approval_required",
  "approvalId": "23bbe807-dea1-4601-b208-07fd1aaad2b6",
  "status": "pending",
  "risk": "confirm",
  "summary": "string",
  "reach": {
    "kind": "endpoint",
    "targetId": "cbca1126-180e-4334-9df8-cf82289d378b",
    "targetName": "string",
    "classes": [
      "routing"
    ],
    "live": true,
    "asks": true,
    "differences": [
      {
        "field": "string",
        "class": "routing",
        "before": "string",
        "after": "string"
      }
    ],
    "links": [
      {
        "kind": "string",
        "total": 0,
        "liveTotal": 0,
        "items": [
          {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
            "name": "string",
            "live": true
          }
        ]
      }
    ],
    "endpoints": {
      "total": 0,
      "liveTotal": 0,
      "items": [
        {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "name": "string",
          "live": true,
          "arrivals24h": 0
        }
      ]
    },
    "arrivals24h": 0,
    "alertEvents": [
      "string"
    ],
    "routineNotices": true,
    "newDestination": "string",
    "text": "string",
    "fingerprint": "string"
  },
  "approveUrl": "http://example.com",
  "expiresAt": "2019-08-24T14:15:22Z",
  "detail": "string"
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "string",
  "traceId": "string"
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "string",
  "traceId": "string"
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "string",
  "traceId": "string"
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "string",
  "traceId": "string"
}
Empty
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "string",
  "traceId": "string"
}

On this page