API service calls

Here we explain how you can call other API services when running locally.

Setup

There are a few things needed for your local environment to be able to call a deployed API services.

  1. Enable the BaaS setting in VS Code called "Enable Local Environment".
  2. Make sure that you are using a workspace file for your projects. It is not enough to just open a folder. If it says "(Workspace)" in the titlebar after the filename, then you are using a workspace.
  3. Log on to the tenant you want to call.

Execution

Nothing else is needed. The runtime automatically picks up the "baas.env" file from your workspace folder and use that to connect.

So, running locally uses the exact same code as the deployed version.

For examples on how to do calls against API, refer to the code examples.