MOD: moved from APEX
When a REST API is defined with ORDS in the database, it will be accessible from any application server you are connecting with using the ords.war file on that server. There is no way to define the REST API to be tied to a specific port. There are a few options that I can think of to solve your problem.
- You would have to do some configuration on the application servers to either block or allow the URL pattern that should be accessible from each application server. This would make sure that only valid network traffic is passing through that URL.
- Add authentication to your REST API and only give the credentials to the users who should be using the API. This would allow the API to be accessible from any application server, but only properly authenticated users would be able to use the API.
- If you use Basic Authentication, you can set up the credentials file in your ORDS configuration directory on the only on the application server that should be used to access the API.
- If you use OAuth Authentication, just give the credentials to the users who should be accessing the API, but they will be able to use any application server to access the API.