Custom UI bridge

Rate this page:

requestJira

The requestJira bridge method enables custom UI apps to call the Jira Cloud platform REST API as the current user.

To use the requestJira bridge method, you need to define a custom UI resolver using @forge/resolver at version 0.2.0 or later. You don't need to define any functions in the resolver.

Function signature

1
2
3
4
5
6
7
8
9
function requestJira(
  path: string,
  options?: RequestInit
): Promise<{
  status: number;
  ok: boolean;
  statusText: string;
  body: { [key in string | number]: any } | string | null;
}>;

Arguments

Returns

  • A Promise that resolves with the REST API response.

Example

1
2
3
4
5
import { requestJira } from '@forge/bridge';

requestJira('/rest/api/3/issue/ISSUE-1').then((response) => {
  console.log(response);
});

Rate this page: