0

I want to request a third party API on Web APP. The API example is https://api.pinesapsapi.com/request.

Can I change the URL and build a different URL with any of the external platforms or AWS?

The basic reason of the URL changing is to keep the API Url private with my developers.

Is this possible?

For Example: https://api.pinesapsapi.com/request should look something like https://api.xhatdffsdkj.com/request or any other generic URL

1 Answer 1

0

If you're looking for an AWS service to specifically do this your best best would be using API Gateway.

Configure a REST API that uses a single method of /{proxy+} and configure it with HTTP_PROXY. You can then add a custom domain name to your API Gateway setup and have it proxy to this other other domain.

Alternatively you would be looking at using a proxy based solution to forward the requests to the endpoint (such as NGINX or HAProxy running on a host such as EC2).

7
  • Is it necessary to add proxy? Jul 11, 2020 at 17:54
  • For which solution are you talking about? :). You don't need the EC2 proxy if you use API Gateway Jul 11, 2020 at 17:57
  • Is there other platforms to use Custom Url? Basically what I want is the when i call the custom Url => then custom url should call the third-party API => Fetch data from there and send it back to me... There reason behind this is to keep the api base url confidential... Jul 11, 2020 at 17:57
  • I am not using their ec2 instance Jul 11, 2020 at 17:58
  • You could also use CloudFront but it is a CDN, you'd need to disable any caching and ensure the correct host header is forwarded to the target endpoint. Jul 11, 2020 at 17:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.