LAPLink Action
Protocol
VIEN
Contents

Protocol / Request lifecycle

The lifecycle of a request

A request can stop at the preview. For actions that change something, the protocol also defines how they are confirmed, carried out and tracked.

Resolve · Interpreting the request

The website receives a GET, parses the parameters and compares them with its current data. In a browser, the user sees the intended action, the official values and anything that needs fixing. When the website supports JSON, the assistant can add lap=json or send Accept: application/vnd.lap+json.

The status field says whether the request is ready (ready), missing data (needs_input), malformed or not understood (invalid), or temporarily impossible (unavailable).

Reading a response with issues

In the excerpt below, the website understood the request but met a code that does not exist. The issues array points to the parameter involved. The full response can include suggested links so the user can pick a fix.

{
  "status": "needs_input",
  "issues": [
    {
      "code": "unknown_code",
      "param": "to",
      "value": "fb_pgae",
      "message": "No destination with code fb_pgae."
    }
  ]
}

Full response · Response schema

Commit · Carrying it out

When the user confirms, the page sends a POST with the values they saw and an Idempotency-Key header. The provider checks data, permissions and other conditions again. If an official value has changed, the website answers changed with a fresh preview.

If the connection drops and the same request is sent again with the same key, the action must still happen only once.

Receipt · Tracking the result

After accepting a propose or execute action, the website issues a receipt URL. committed means the request was recorded. Execution can continue through executing before reaching done or failed. Opening the receipt again only reads the current state.