UI Kit components
UI Kit hooks
Forge bridge APIs
Jira bridge APIs
Upgrade UI Kit versions
Previous versions

invoke

The invoke bridge method enables custom UI apps to run backend FaaS functions hosted by Atlassian.

To use the invoke bridge method, you need to define your functions using the Forge UI resolver.

Function signature

1
2
function invoke(
  functionKey: string,
  payload?: { [key in number | string]: any }
): Promise<{ [key: string]: any } | void>;

Arguments

  • functionKey: A string identifier for the resolver function to invoke with this method. This string should exactly match the functionKey in one of your resolver function definitions.
  • payload: Data that is passed into the resolver function.

Returns

  • A Promise that resolves with the data returned from the invoked function.

Example

1
2
import { invoke } from '@forge/bridge';

invoke('getText', { example: 'my-invoke-variable' }).then((data) => console.log(data));

Rate this page: