Skip to main content

@backstage/core-app-api

Home > @backstage/core-app-api

Core app API used by Backstage apps

Classes

ClassDescription
AlertApiForwarderBase 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.

ApiResolverHandles the actual on-demand instantiation and memoization of APIs out of an ApiFactoryHolder.
AppThemeSelectorExposes the themes installed in the app, and permits switching the currently active theme.
AtlassianAuthImplements the OAuth flow to Atlassian products.
BitbucketAuthImplements the OAuth flow to Bitbucket products.
BitbucketServerAuthImplements the OAuth flow to Bitbucket Server.
ErrorAlerterDecorates an ErrorApi by also forwarding error messages to the alertApi with an 'error' severity.
ErrorApiForwarderBase implementation for the ErrorApi that simply forwards errors to consumers.
FetchMiddlewaresA collection of common middlewares for the FetchApi.
FrontendHostDiscoveryFrontendHostDiscovery is a config driven DiscoveryApi implementation. It uses the app-config to determine the url for a plugin.
GithubAuthImplements the OAuth flow to GitHub products.
GitlabAuthImplements the OAuth flow to GitLab products.
GoogleAuthImplements the OAuth flow to Google products.
LocalStorageFeatureFlagsA feature flags implementation that stores the flags in the browser's local storage.
MicrosoftAuthImplements the OAuth flow to Microsoft products.
MultipleAnalyticsApiAn implementation of the AnalyticsApi that can be used to forward analytics events to multiple concrete implementations.
NoOpAnalyticsApiBase implementation for the AnalyticsApi that does nothing.
OAuth2Implements 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.

OktaAuthImplements the OAuth flow to Okta products.
OneLoginAuthImplements a OneLogin OAuth flow.
SamlAuthImplements a general SAML based auth flow.
UnhandledErrorForwarderUtility class that helps with error forwarding.
UrlPatternDiscoveryUrlPatternDiscovery is a lightweight DiscoveryApi implementation. It uses a single template string to construct URLs for each plugin.
VMwareCloudAuthImplements the OAuth flow for VMware Cloud Services
WebStorageAn implementation of the storage API, that uses the browser's local storage.

Functions

FunctionDescription
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.
FlatRoutes(props)A wrapper around a set of routes.

Interfaces

InterfaceDescription
AppRouterPropsProps for the AppRouter() component.
FetchMiddlewareA middleware that modifies the behavior of an ongoing fetch.

Variables

VariableDescription
ApiProviderProvides 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.

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

Type Aliases

Type AliasDescription
ApiFactoryHolder
ApiFactoryScopeScope type when registering API factories.
ApiProviderPropsProp types for the ApiProvider component.
AppComponentsA 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.

AppContextThe central context providing runtime app specific state that plugin views want to consume.
AppIconsA set of well-known icons that should be available within an app.
AppOptionsThe options accepted by createSpecializedApp().
AppRouteBinderA function that can bind from external routes of a given plugin, to concrete routes of other plugins. See createSpecializedApp().
AuthApiCreateOptionsGeneric create options for auth APIs.
BackstageAppThe public API of the output of createSpecializedApp().
BitbucketServerSessionSession information for Bitbucket Server auth.
BitbucketSessionSession information for Bitbucket auth.
BootErrorPagePropsProps for the BootErrorPage component of AppComponents.
ErrorBoundaryFallbackPropsProps for the fallback error boundary.
FeatureFlaggedPropsProps for the FeatureFlagged component.
FlatRoutesPropsProps for the FlatRoutes() component.
OAuth2CreateOptionsOAuth2 create options.
OAuth2SessionSession information for generic OAuth2 auth.
OAuthApiCreateOptionsCreate options for OAuth APIs.
OneLoginAuthCreateOptionsOneLogin auth provider create options.
PopupOptionsOptions for login popup
SignInPagePropsProps for the SignInPage component of AppComponents.