Links

API Connectors

Overview

The rule logic you define will run on your end user's browser. You may want certain network requests in your rule logic to be performed from Feathery's servers instead for security reasons, such as hiding authorization information from the user. To do so, you can leverage API connectors, which allow you to run API requests securely from Feathery's servers.
To create a connector, go to API Connectors on the Logic page and define the API you would like your rule to use.
Then, go to your rule code and make a network request to the API connector via the feathery.http interface. Allowed methods include GET, PATCH, POST, PUT, and DELETE.
You can use it likefeathery.http.GET(<url>, <data>, <headers>) where data is the request body and headers are additional headers you'd like to pass in the request.
Note that for write requests, only application/json types are supported currently. To use other request types like multipart/form-data, you should call fetch from your rule directly.

Example

You're looking to fetch a list of dog breeds via https://dog.ceo/api/breeds/list/all from Feathery's servers. First, create the API connector.
Then, use the feathery.http interface to access the API connector from your logic rule.