How to call an App from another service / app?

I am planning on building a system that requires apps to call each other via http requests and am trying to figure out how to get two apps to call each other. From the API reference ( it seems this may be possible by:

  1. querying the DO api for the desired app
  2. parsing out the ‘live_url’
  3. calling the parsed url

But I wanted to see if there was a best practice somewhere that was different.

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

If the two services are part of the same site, you might consider putting both services in the same application. Service components in the same app can communicate over a local network using the component name as the address. For example, if your app has two services, api and web, web can reach api at http://api:80. Public services will always be exposed internally on port 80. These internal requests don’t count against the bandwidth utilization for an app, while requests from one app to another app’s public URL will.