Skip to main content

@backstage/core-app-api

Home > @backstage/core-app-api

Core app API used by Backstage apps

Classes

Class

Description

AlertApiForwarder

Base implementation for the AlertApi that simply forwards alerts to consumers.

ApiFactoryRegistry

ApiFactoryRegistry is an ApiFactoryHolder implementation that enables registration of API Factories with different scope.

Each scope has an assigned priority, where factories registered with higher priority scopes override ones with lower priority.

ApiResolver

Handles the actual on-demand instantiation and memoization of APIs out of an ApiFactoryHolder.

AppThemeSelector

Exposes the themes installed in the app, and permits switching the currently active theme.

AtlassianAuth

Implements the OAuth flow to Atlassian products.

BitbucketAuth

Implements the OAuth flow to Bitbucket products.

BitbucketServerAuth

Implements the OAuth flow to Bitbucket Server.

ErrorAlerter

Decorates an ErrorApi by also forwarding error messages to the alertApi with an 'error' severity.

ErrorApiForwarder

Base implementation for the ErrorApi that simply forwards errors to consumers.

FetchMiddlewares

A collection of common middlewares for the FetchApi.

FrontendHostDiscovery

FrontendHostDiscovery is a config driven DiscoveryApi implementation. It uses the app-config to determine the url for a plugin.

GithubAuth

Implements the OAuth flow to GitHub products.

GitlabAuth

Implements the OAuth flow to GitLab products.

GoogleAuth

Implements the OAuth flow to Google products.

LocalStorageFeatureFlags

A feature flags implementation that stores the flags in the browser's local storage.

MicrosoftAuth

Implements the OAuth flow to Microsoft products.

MultipleAnalyticsApi

An implementation of the AnalyticsApi that can be used to forward analytics events to multiple concrete implementations.

NoOpAnalyticsApi

Base implementation for the AnalyticsApi that does nothing.

OAuth2

Implements a generic OAuth2 flow for auth.

OAuthRequestManager

The OAuthRequestManager is an implementation of the OAuthRequestApi.

The purpose of this class and the API is to read a stream of incoming requests of OAuth access tokens from different providers with varying scope, and funnel them all together into a single request for each OAuth provider.

OktaAuth

Implements the OAuth flow to Okta products.

OneLoginAuth

Implements a OneLogin OAuth flow.

SamlAuth

Implements a general SAML based auth flow.

UnhandledErrorForwarder

Utility class that helps with error forwarding.

UrlPatternDiscovery

UrlPatternDiscovery is a lightweight DiscoveryApi implementation. It uses a single template string to construct URLs for each plugin.

VMwareCloudAuth

Implements the OAuth flow for VMware Cloud Services

WebStorage

An implementation of the storage API, that uses the browser's local storage.

Functions

Function

Description

AppRouter(props)

App router and sign-in page wrapper.

createFetchApi(options)

Builds a fetch API, based on the builtin fetch wrapped by a set of optional middleware implementations that add behaviors.

createSpecializedApp(options)

Creates a new Backstage App where the full set of options are required.

FeatureFlagged(props)

Enables or disables rendering of its children based on the state of a given feature flag.

FlatRoutes(props)

A wrapper around a set of routes.

Interfaces

Interface

Description

AppRouterProps

Props for the AppRouter() component.

FetchMiddleware

A middleware that modifies the behavior of an ongoing fetch.

Variables

Variable

Description

ApiProvider

Provides an ApiHolder for consumption in the React tree.

defaultConfigLoader

The default config loader, which expects that config is available at compile-time in process.env.APP_CONFIG. APP_CONFIG should be an array of config objects as returned by the config loader.

It will also load runtime config from the __APP_INJECTED_RUNTIME_CONFIG__ string, which can be rewritten at runtime to contain an additional JSON config object. If runtime config is present, it will be placed first in the config array, overriding other config values.

Type Aliases

Type Alias

Description

ApiFactoryHolder

ApiFactoryScope

Scope type when registering API factories.

ApiProviderProps

Prop types for the ApiProvider component.

AppComponents

A set of replaceable core components that are part of every Backstage app.

AppConfigLoader

A function that loads in the App config that will be accessible via the ConfigApi.

If multiple config objects are returned in the array, values in the earlier configs will override later ones.

AppContext

The central context providing runtime app specific state that plugin views want to consume.

AppIcons

A set of well-known icons that should be available within an app.

AppOptions

The options accepted by createSpecializedApp().

AppRouteBinder

A function that can bind from external routes of a given plugin, to concrete routes of other plugins. See createSpecializedApp().

AuthApiCreateOptions

Generic create options for auth APIs.

BackstageApp

The public API of the output of createSpecializedApp().

BitbucketServerSession

Session information for Bitbucket Server auth.

BitbucketSession

Session information for Bitbucket auth.

BootErrorPageProps

Props for the BootErrorPage component of AppComponents.

ErrorBoundaryFallbackProps

Props for the fallback error boundary.

FeatureFlaggedProps

Props for the FeatureFlagged() component.

FlatRoutesProps

Props for the FlatRoutes() component.

OAuth2CreateOptions

OAuth2 create options.

OAuth2Session

Session information for generic OAuth2 auth.

OAuthApiCreateOptions

Create options for OAuth APIs.

OneLoginAuthCreateOptions

OneLogin auth provider create options.

PopupOptions

Options for login popup

SignInPageProps

Props for the SignInPage component of AppComponents.