Data Consumer performs HTTP request to external service by using Marketplace External Proxy Service (Marketplace EPS) tunnel REST API call. This call will be authenticated, processed, recorded via Technical Account for billing purposes and redirected to external service. The response from external service will be returned to the Data Consumer in its original form and with the same HTTP response code and same response header as if you would call the external service REST API directly. If external service failed with an error, this error will be propagated back to the Data Consumer in its original form.
To post a successful call to proxy tunnel, consumer has to perform a call in the following format:
An example of a typical proxy tunnel workflow:
- Consumer posts a request to https://p.hereapi.com/tunnel/dataservice.company-name.com/locations/v1/topcities/50
- For this call, Data Consumer uses HERE Account credentials.
- Marketplace EPS authenticates the user and inspects dataservice.company-name.com part, also known as Service Provider domain, to validate this domain previously provisioned.
- Marketplace EPS inspects locations/v1/topcities/50 part, also known as Service Provider resource, and checks if the customer has access to this resource in a specified domain. If they do not have access - then an error returns. If they do have access - we proceed with step 4.
- Marketplace EPS combines domain and path and prepares a request to execute, such as https://dataservice.company-name.com/locations/v1/topcities50. At the same time, EPS extracts Data Provider's API key stored in a database and appends it to a request in case of simple API key-based authentication). In case the API key that was previously provisioned is "DEADBEEF" then the resulting request will be https://dataservice.company-name.com/locations/v1/topcities/50?api_key=DEADBEEF
- Request is performed and response is read.
- Response is recorded and submitted to Technical Account to perform proper billing and analytics. This is a background operation and does not affect call latency.
- Response is forwarded back to a consumer with original payload and HTTP headers. It includes even a case when response is failed. In this case of failure - HTTP response code with error payload is returned.