Endpoints
Register the API calls a Request step can make from the visitor's browser, by hand or from an OpenAPI, with inputs and visitor attributes in the path and body, then test-call it.
An endpoint is one API call a flow can make. Register it on Autopilot > Endpoints; a Request step on Flows picks one and fills its inputs.
Before you start
- Only an admin can change the catalogue. Members see the list.
- An endpoint on your own API needs that origin verified on Origins; otherwise it targets the site the visitor is on.
- The call carries the visitor's cookies. For a bearer token instead, set
requestHeaderson Reference.
Setting it up
Add endpoint opens the dialog.
- Name is what a Request step lists.
- Method is GET, POST, PUT, PATCH or DELETE.
- Origin is a verified origin or This page's own origin, the site the visitor is on.
- Path is what follows the fixed
/. Insert attribute drops in an input,{{ lead_id }}, or a visitor attribute,{{ user.plan }}, filled when the flow runs. A flow answer reaches the path only through an input bound on the Request step. - Inputs, up to 20, are what a Request step supplies: a Name, a Type (Text, Number, Datetime or True or false) and a Required tick.
- Body template appears for POST, PUT and PATCH: JSON where an input goes bare,
{"email": {{ email }}}, and an attribute in quotes,{"plan": "{{ user.plan }}"}. Format pretty-prints it. - Response fields, up to 20, are read from the JSON answer into the run: a Name and a Path in response such as
data.id.
Names are lowercase letters, digits and underscores, starting with a letter, each used once; user and answers are reserved. A bare placeholder must name an input.
Import from OpenAPI reads an OpenAPI 3 file, JSON or YAML, up to 2 MB, by File URL or Upload a file. Load routes lists every GET, POST, PUT, PATCH and DELETE operation; other methods are skipped. Tick the routes a flow may call and pick the Origin; a server matching a verified origin is preselected. Path and required query parameters become inputs, the body's first-level scalar properties become inputs and the body template, and the first success response's properties become response fields, one level deep. A route with the same method and path is updated, name kept. Nothing is deleted.
The send icon on a row opens Send a test call. Fill the inputs, type a value for each attribute the endpoint reads (there is no visitor here), pick an origin if the endpoint targets the page's own, and send. The call leaves your browser with your own session, never through ARCY. You see the HTTP status, the time taken and every response field's value.
What it changes
- A Request step sends the call from the visitor's browser with their session. Only the outcome and HTTP status reach Pulse.
- Editing or re-importing an endpoint changes every step using it.
- Used by names the flows calling it. Delete is refused while any does.
When it goes wrong
Delete is disabled. The tooltip names the flows still calling it. Remove their Request step, then delete.
HTTP 401 on a test call. Your API refused the cookie session. The dialog shows the requestHeaders snippet to add.
A test call did not reach the server. Your browser blocked it. Allow this dashboard's origin in your API's CORS rules, with credentials. Visitors on your site are unaffected.
A response field is missing from the result. Its path does not match the JSON your API returned.
Import fails. The file is not valid JSON or YAML, is Swagger 2.0, or has no paths. Export an OpenAPI 3 document.