Load list column from API endpoint

Call an API endpoint that returns a list of results, collected into a single list-typed column accessible to subsequent RowAction ingredients (e.g. for use with ForEachListElement)

Ingredient Family: rowActionsIngredients

Outline Display: Add list column {{newColumn}} from the list-returning endpoint named {{endpoint}} of {{apiName}}, called with the mapping: {{mapping}}{{maxResults:
Max results: {{maxResults}}}}

Details

Nothing runs over the returned rows here: the list lands in one column, so a later step decides what to do with it – iterate it with ForEachListElement, check it with a Require over ANY/ALL, turn it into JSON with Table data to JSON, or map it out. Use Call list API endpoint when every element gets the same action right away instead. maxResults truncates what the call returned before the column is added, so a broad call cannot load an unbounded list; it composes with the endpoint’s own paging exactly as the Call list API endpoint tool’s cap does, cutting down the page the api sent rather than asking for a smaller one. A call that does not go through fails the action rather than aborting the page it was triggered from, and the column is never added: a refusal is never answered with an empty list. If the api’s provider requires a login and no credential is connected for this caller in this context, the step fails with a not-connected message naming connecting the service as the fix, and nothing is sent. A call the api refuses with HTTP 401 or 403 fails as unauthorized (sign in to that service again); any other refusal, and a host that cannot be reached, fail as a malfunction. In each case the rest of the pipeline does not run. The mapping may be omitted when the row already carries the endpoint’s arguments under their own names: an argument no entry names is filled from the row’s column of that name, so a mapping spells only what it renames or computes. A file or point argument is never filled that way and always needs its own entry. Inside a tool’s row action an argument no column supplies is not an error: it becomes a new argument of the tool, described from the endpoint argument it feeds, so a name meant to match a column and missing it silently grows an argument the caller must fill.

Local scope

The parent slot binds these (look up the slot in the parent to see how):

  • $table – The table to act on

Names introduced within this component’s knobs:

  • inputTable – request shape of endpoint (chosen under apiName)
  • outputTable – response shape of endpoint (chosen under apiName)
  • mappingResult – empty table populated by ingredients

Settings

Required

  • apiName : API connection
    the API the endpoint is part of
    Set this to the name of any top-level api: item (or the inline api: block on a service/authenticator).

  • endpoint : endpoint of apiName
    the list-returning endpoint to call
    Set this to the Name of an entry under wrappedEndpoints: on the referenced api: item, or to the name of a raw endpoints: entry that has no hand-written wrapper: every such endpoint automatically gets an identity wrapper of the same name (each parameter an argument, each response field revealed, with any character other than letters, digits, _, and - in a name replaced by an underscore, so the flattened path payload.note becomes payload_note). Do not write identity wrappers by hand; write a wrappedEndpoints: entry only to restrict or reshape an endpoint, and note that doing so replaces its automatic wrapper.

  • mapping : ingredient slot of mappingIngredientsList($table, mappingResult, inputTable) (many, until inputTable = mappingResult)
    How to map available field values to the endpoint’s inputs

  • newColumn : new column (type: list of outputTable’s full row type)
    The name of the new list column to create

Optional

  • maxResults : constant value (type: integer; optional)
    Maximum number of list items the new column may hold. Caps result size so a broad call cannot load an unbounded list. Leave it unset for no cap: the column then holds the whole page the api sent, which the endpoint’s own paging inputs already bound.