
Security News
Deno 2.4 Brings Back deno bundle, Improves Dependency Management and Observability
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
@forge/api
Advanced tools
API methods exposed during runtime in Forge
apps. These include methods to simplify common actions such as making
REST requests to Atlassian products.
See developer.atlassian.com/platform/forge/ for documentation and tutorials explaining Forge.
In your Forge
app, include the following:
import API from '@forge/api';
The API exposes the following methods:
Fetches data from an HTTP server.
fetch(url: string, options?: any) => Promise<object>
Makes a request to the Jira REST API.
requestJira(url: string, options?: any) => Promise<object>
Makes a request to the Confluence REST API.
requestConfluence(url: string, options?: any) => Promise<object>
Use this method to call an Atlassian API as the app developer. The method adds an Authorization
header for the app
developer to a chained fetch call.
asApp() => { requestJira: Fetch, requestConfluence: Fetch }
Use this method to call an Atlassian API as the person using the app. The method adds an Authorization
header for the
request user to a chained requestJira
or requestConfluence
call.
If the user initiating the request has not granted permission to any sites, or the request is not made through a user interaction (such as, using a trigger) the request is made without a valid Authorization header.
If the API returns a 401
and there is not a valid Authorization
header, then an Error
is thrown.
asUser() => { requestJira: Fetch, requestConfluence: Fetch }
Make an authenticated call to the Jira myself API as the user of the app.
const getUserDisplayName = async (): Promise<string> => {
// See https://developer.atlassian.com/cloud/jira/platform/rest/v3/#api-rest-api-3-myself-get
const response = API
.asUser()
.requestJira(`/rest/api/3/myself`);
const json = await response.json();
return json.displayName;
};
See Get help for how to get help and provide feedback.
FAQs
Forge API methods
The npm package @forge/api receives a total of 19,216 weekly downloads. As such, @forge/api popularity was classified as popular.
We found that @forge/api demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.