The REST API Mapping function type maps functions to REST API endpoints. It is defined like this:Documentation Index
Fetch the complete documentation index at: https://docs.getmembrane.com/llms.txt
Use this file to discover all available pages before exploring further.
Format
path– The API endpoint pathmethod– HTTP method (GET, POST, PUT, PATCH, DELETE)requestMapping– Request mappingquery– Query parameters mappingheaders– Headers mappingdata– Request body mapping for POST/PUT/PATCHpathParameters– Values for placeholders in the path (e.g.,{projectId})
responseMapping– Mapping to transform the API response
Variables
credentials– Authentication credentials from the current connectionparameters– Function-level and collection-level parameters combined- Function-specific input variables
responseMapping:
response.data– API response dataresponse.headers– API response headersresponse.statusCode– API response status code
Using in Connector Files
When used in connector files, the mapping is written in a separate file named<function-name>.rest.yml (or <function-name>.api.yml).
For example: