You can call your remote backend from your frontend (Custom UI and UI Kit) via a resolver. The diagram below illustrates the data flow.
To define a remote endpoint for a Forge module, in your manifest.yml
:
endpoint
your app will send remote requests to. For UI modules, this is done using the resolver.endpoint
property of the module that will be making remote requests.endpoint
item with a key
matching the endpoint
name you specified in the previous step.
remote
property to the key that uniquely identifies the remote system the endpoint will communicate with.auth
property.remotes
item with a key matching the remote name you specified in the endpoint, setting the baseUrl to the site URL prefix to prepend to the routes specified in your invokeRemote request.Here's an example of how to setup your manifest:
1 2modules: macro: - key: forge-remote-app-node resource: main resolver: endpoint: remote-macro-node title: forge-remote-app-node description: Invokes a Forge Remote NodeJS Server and renders the result. endpoint: - key: remote-macro-node remote: remote-app-node auth: appUserToken: enabled: true appSystemToken: enabled: true resources: - key: main path: static/hello-remote-world/build permissions: scopes: - read:app-system-token - read:app-user-token remotes: - key: remote-app-node baseUrl: https://forge-remote-refapp-nodejs.services.atlassian.com
You will need to verify the requests received by your remote came from Atlassian and are intended for your app. For more information on how to do this, see Verifying remote requests.
To see a complete list of modules you can use to call your remote, including payload and context properties, see the Forge modules for each product:
Now that you’ve verified the requests and have received your access tokens, you can:
Rate this page: