Skip to main content

AtlassianRestClient

@appfire/fuse-auth-coreDocs


@appfire/fuse-auth-core / AtlassianRestClient

Class: AtlassianRestClient

Represents a client for making RESTful requests to Atlassian APIs.

Constructors

new AtlassianRestClient()

new AtlassianRestClient(atlassianApp): AtlassianRestClient

Creates an instance of AtlassianRestClient.

Parameters

atlassianApp: AtlassianApp

The AtlassianApp instance used for authentication and API configuration.

Returns

AtlassianRestClient

Defined in

products/atlassian/atlassian.restclient.ts:18

Methods

getApp()

getApp(): AtlassianApp

Returns

AtlassianApp

Defined in

products/atlassian/atlassian.restclient.ts:25


requestAsApp()

requestAsApp\<T>(apiPath, method, data): Promise\<AxiosResponse\<T, any>>

Makes a RESTful request to an Atlassian API as an app.

Type Parameters

T

Parameters

apiPath: string

The path of the API endpoint.

method: string

The HTTP method for the request.

data: object

The request payload data.

Returns

Promise\<AxiosResponse\<T, any>>

A Promise that resolves to the AxiosResponse object.

Defined in

products/atlassian/atlassian.restclient.ts:64


requestAsUser()

requestAsUser\<T>(apiPath, method, data, userAccountId): Promise\<AxiosResponse\<T, any>>

Makes a RESTful request to an Atlassian API on behalf of a user.

Type Parameters

T

Parameters

apiPath: string

The path of the API endpoint.

method: string

The HTTP method for the request.

data: object

The request payload data.

userAccountId: string

The ID of the user account.

Returns

Promise\<AxiosResponse\<T, any>>

A Promise that resolves to the AxiosResponse object.

Defined in

products/atlassian/atlassian.restclient.ts:37