Relay - inconsistent link_connector_api/
path usage vs. Bunny and other Task APIs
#14
Open
2 of 13 tasks
Milestone
Is this the right issue type?
Summary
This issue represents work on both Upstream and Downstream aspects of Relay, around the inconsistent use of
link_connector_api/
in endpoint paths.Downstream considerations
All of Relay's API endpoints are served from the root path
/
, even for Task API compatible endpoints.This is inconsistent with other Task API implementations, which separate their API surfaces, and put the Task API in particular under the path
link_connector_api/
For improved compatibility with downstream clients, Task API endpoint implementations in Relay should be moved to the path
link_connector_api/
. This also makes it easier for Relay to have other endpoints in future if desirable.Upstream considerations
Both Bunny and Relay are configurable with the Base URL of their Upstream Task APIs, but they behave differently:
Bunny requires both the host and the API base path, e.g. for
link_connector_api
endpoints (which are all Bunny cares about currently) it would require the following config:https://my-task-api.com/link_connector_api/
https://my-relay.com/
Relay requires only the host in its configuration, and auto appends
link_connector_api/
pathThis makes configuring Relay arguably nicer, but also means when combined with the Downstream considerations above, that Relay currently is incompatible with itself; i.e. you can't chain Relays together because the Downstream one will append the wrong path for the endpoints on the Upstream one.
Configuration is also arguably confusing as if you configure it the same way as Bunny for standard Upstream servers, it won't work as the final base API URL would be:
https://my-task-api.com/link_connector_api/link_connector_api/
To combat this, Relay should check if the configured URL ends with the path, and add it if not. And Relay should standardise it's endpoint paths so it's compatible with itself.
Acceptance Criteria
https://my-task-api.com/link_connector_api/
resolves tohttps://my-task-api.com/link_connector_api/
https://my-task-api.com/
resolves tohttps://my-task-api.com/link_connector_api/
link_connector_api/
Tasks
link_connector_api/
path needs appending, and only add it if it doesConfirm creation
The text was updated successfully, but these errors were encountered: