What are API Passthroughs?
API Passthroughs serve as proxies for APIs within Frends, allowing users to define a Target URL. When the API is called, the request is forwarded to the specified Target URL.
Note: Passthroughs are exclusively available on Cross-Platform Agents.
Note: The initial release in 5.7 does not have authentication support, the target endpoint will have to support it or you will have to use a Process. Frends 5.8 API Access Policys provide support for authentication to API Passthroughs
Target Configuration
Users can configure a Target URL to utilize environment variables. Additionally, it can be set to relay the BasePath, OperationPath, and QueryParameters provided in the request.
Examples:
API Operation:
/api/time/v1/time
Request:/api/time/v1/time?locale=fi
Target:{{#env.Target.Server}}/{{#api.BasePath}}/datetime/{{#api.QueryParameters.locale}}
Resolved Target:https://example.com/api/time/v1/datetime/fi
API Operation:
/api/time/v1/time/{locale}/{format}
Request:/api/time/v1/time/fi/5
Target:https://domain.com/timeapi/{{#api.OperationPath.locale}}?format={{#api.OperationPath.format}}
Resolved Target:https://domain.com/timeapi/fi?format=5
Cross-Origin Resource Sharing (CORS)
CORS can be enabled for a Passthrough by providing a comma-separated list to the Allowed Origins field.
Header Configuration
Headers can be configured for the Passthrough request before forwarding it to the Target.
Header options include:
Add: Appends the Header value to an existing Header name. If the Header doesn't exist, it adds it.
Overwrite: Overwrites the Header name with the provided Header value.
Remove: Removes the Header name if it exists.
Creating/Modifying API Passthroughs
API Passthroughs can be created by accessing the API Management page and clicking the "Create Passthrough API" button. Existing Passthroughs can be modified by selecting "Modify Passthrough API" in the same location.
Deleting API Passthroughs
API Passthroughs can be deleted by accessing the action menu (...) for a specific operation.
API Process and API Passthrough Conflicts
It is not possible to have a linked API Process and a Passthrough for the same operation simultaneously.
When conflicts arise:
Example 1: If both an API Process and a Passthrough are configured for the same operation, and the Passthrough is generated by default, the API Process will take priority.
Example 2: If both an API Process and a Passthrough are configured for the same operation, and the Passthrough is not generated by default, the API Passthrough will take priority.