Connectors
A connector is a server-side call to an outside API. Your script names it; the server makes the request with credentials the user configured. The secrets never reach your code.
"connectors": [{
"name": "orders",
"upstream": "{{settings.api_url}}",
"method": "GET",
"headers": { "Authorization": "Bearer {{secret.api_token}}" }
}]Placeholders
- settings.x and secret.x: values from the user's configuration.
- param.x: a value your script passes at call time. Use this so one connector can serve several endpoints.
- basicAuth(settings.x, secret.y): builds an HTTP Basic header from two fields.
When a connector's whole address is one placeholder, it is used exactly as entered. If part of the address is fixed text, the placeholder is URL-encoded. Make the setting hold the whole endpoint address when you want it used verbatim. Header values are never URL-encoded (a value with a line break is refused), and only successful responses are cached.
A connector is a disclosed channel to an outside service: users see the addresses it can reach when they install.