Skip to main content
Version: Next

@backstage/frontend-plugin-api

Home > @backstage/frontend-plugin-api

Core API used by Backstage frontend plugins.

Functions

Function

Description

AnalyticsContext(options)

Provides components in the child react tree an Analytics Context, ensuring all analytics events captured within the context have relevant attributes.

createApiFactory(factory)

Used to infer types for a standalone ApiFactory that isn't immediately passed to another function.

createApiFactory(api, instance)

Used to infer types for a standalone ApiFactory that isn't immediately passed to another function.

createApiRef(config)

Creates a reference to an API.

createExtension(options)

Creates a new extension definition for installation in a Backstage app.

createExtensionBlueprint(options)

Creates a new extension blueprint that encapsulates the creation of extensions of particular kinds.

createExtensionBlueprintParams(params)

Wraps a plain blueprint parameter object in an opaque ExtensionBlueprintParams object.

This is used in the definition of the defineParams option of ExtensionBlueprint.

createExtensionDataRef()

createExtensionInput(extensionData, config)

createExternalRouteRef(config)

Creates a route descriptor, to be later bound to a concrete route by the app. Used to implement cross-plugin route references.

createFrontendFeatureLoader(options)

createFrontendModule(options)

Creates a new module that can be installed in a Backstage app.

createFrontendPlugin(options)

Creates a new plugin that can be installed in a Backstage app.

createRouteRef(config)

Create a RouteRef from a route descriptor.

createSubRouteRef(config)

Create a SubRouteRef from a route descriptor.

createSwappableComponent(options)

Creates a SwappableComponent that can be used to render the component, optionally overridden by the app.

createTranslationMessages(options)

Creates a collection of messages for a given translation ref.

createTranslationRef(config)

createTranslationResource(options)

ExtensionBoundary(props)

useAnalytics()

Gets a pre-configured analytics tracker.

useApi(apiRef)

React hook for retrieving APIs.

useApiHolder()

React hook for retrieving ApiHolder, an API catalog.

useAppNode()

React hook providing access to the current AppNode.

useRouteRef(routeRef)

React hook for constructing URLs to routes.

useRouteRefParams(_routeRef)

React hook for retrieving dynamic params from the current URL.

useTranslationRef(translationRef)

withApis(apis)

Wrapper for giving component an API context.

Interfaces

Interface

Description

AnalyticsContextValue

Analytics context envelope.

AppNode

A node in the AppTree.

AppNodeEdges

The connections from this AppNode to other nodes.

AppNodeInstance

The instance of this AppNode in the AppTree.

AppNodeSpec

The specification for this AppNode in the AppTree.

AppTree

The app tree containing all AppNodes of the app.

AppTreeApi

The API for interacting with the AppTree.

ConfigurableExtensionDataRef

CreateFrontendFeatureLoaderOptions

CreateFrontendModuleOptions

DialogApi

A Utility API for showing dialogs that render in the React tree and return a result.

DialogApiDialog

A handle for an open dialog that can be used to interact with it.

Extension

ExtensionBlueprint

ExtensionBoundaryProps

ExtensionDefinition

ExtensionInput

ExternalRouteRef

Route descriptor, to be later bound to a concrete route by the app. Used to implement cross-plugin route references.

FeatureFlagsApi

The feature flags API is used to toggle functionality to users across plugins and Backstage.

FrontendFeatureLoader

FrontendModule

FrontendPlugin

FrontendPluginInfo

Information about the plugin.

IconsApi

API for accessing app icons.

NavContentComponentProps

The props for the NavContentComponent.

OverridableExtensionDefinition

OverridableFrontendPlugin

A variant of the FrontendPlugin interface that can also be used to install overrides for the plugin.

PluginOptions

RouteRef

Absolute route reference.

RouteResolutionApi

StorageApi

Provides a key-value persistence API.

SubRouteRef

Descriptor of a route relative to an absolute RouteRef.

SwappableComponentsApi

API for looking up components based on component refs.

TranslationMessages

Represents a collection of messages to be provided for a given translation ref.

TranslationMessagesOptions

Options for createTranslationMessages().

TranslationRef

TranslationRefOptions

TranslationResource

TranslationResourceOptions

Namespaces

Namespace

Description

ExtensionBoundary

FeatureFlagState

SessionState

Variables

Variable

Description

alertApiRef

The ApiRef of AlertApi.

analyticsApiRef

The API reference of AnalyticsApi.

AnalyticsImplementationBlueprint

Creates analytics implementations.

ApiBlueprint

Creates utility API extensions.

appLanguageApiRef

AppRootElementBlueprint

Creates extensions that render a React element at the app root, outside of the app layout. This is useful for example for shared popups and similar.

AppRootWrapperBlueprint

Creates a extensions that render a React wrapper at the app root, enclosing the app layout. This is useful for example for adding global React contexts and similar.

appThemeApiRef

The ApiRef of AppThemeApi.

appTreeApiRef

The ApiRef of AppTreeApi.

atlassianAuthApiRef

Provides authentication towards Atlassian APIs.

bitbucketAuthApiRef

Provides authentication towards Bitbucket APIs.

bitbucketServerAuthApiRef

Provides authentication towards Bitbucket Server APIs.

configApiRef

The ApiRef of ConfigApi.

coreExtensionData

dialogApiRef

The ApiRef of DialogApi.

discoveryApiRef

The ApiRef of DiscoveryApi.

errorApiRef

The ApiRef of ErrorApi.

ErrorDisplay

featureFlagsApiRef

The ApiRef of FeatureFlagsApi.

FeatureFlagState

Enum representing the state of a feature flag (inactive/active).

fetchApiRef

The ApiRef of FetchApi.

githubAuthApiRef

Provides authentication towards GitHub APIs.

gitlabAuthApiRef

Provides authentication towards GitLab APIs.

googleAuthApiRef

Provides authentication towards Google APIs and identities.

IconBundleBlueprint

iconsApiRef

The ApiRef of IconsApi.

identityApiRef

The ApiRef of IdentityApi.

microsoftAuthApiRef

Provides authentication towards Microsoft APIs and identities.

NavContentBlueprint

Creates an extension that replaces the entire nav bar with your own component.

NavItemBlueprint

Creates extensions that make up the items of the nav bar.

NotFoundErrorPage

oauthRequestApiRef

The ApiRef of OAuthRequestApi.

oktaAuthApiRef

Provides authentication towards Okta APIs.

oneloginAuthApiRef

Provides authentication towards OneLogin APIs.

openshiftAuthApiRef

Provides authentication towards OpenShift APIs and identities.

PageBlueprint

Createx extensions that are routable React page components.

Progress

RouterBlueprint

routeResolutionApiRef

The ApiRef of RouteResolutionApi.

SessionState

Session state values passed to subscribers of the SessionApi.

SignInPageBlueprint

Creates an extension that replaces the sign in page.

storageApiRef

The ApiRef of StorageApi.

SwappableComponentBlueprint

Blueprint for creating swappable components from a SwappableComponentRef and a loader

swappableComponentsApiRef

The ApiRef of SwappableComponentsApi.

ThemeBlueprint

Creates an extension that adds/replaces an app theme.

translationApiRef

TranslationBlueprint

Creates an extension that adds translations to your app.

vmwareCloudAuthApiRef

Provides authentication towards VMware Cloud APIs and identities.

Type Aliases

Type Alias

Description

AlertApi

The alert API is used to report alerts to the app, and display them to the user.

AlertMessage

Message handled by the AlertApi.

AnalyticsApi

The Analytics API is used to track user behavior in a Backstage instance.

AnalyticsEvent

Represents an event worth tracking in an analytics system that could inform how users of a Backstage instance are using its features.

AnalyticsEventAttributes

A structure allowing other arbitrary metadata to be provided by analytics event emitters.

AnalyticsImplementation

Analytics implementations are used to track user behavior in a Backstage instance.

AnalyticsImplementationFactory

AnalyticsTracker

Represents a tracker with methods that can be called to track events in a configured analytics service.

AnyApiFactory

Catch-all ApiFactory type.

AnyApiRef

Catch-all ApiRef type.

AnyExtensionDataRef

AnyRouteRefParams

Catch-all type for route params.

ApiFactory

Describes type returning API implementations.

ApiHolder

Provides lookup of APIs through their ApiRefs.

ApiRef

API reference.

ApiRefConfig

API reference configuration - holds an ID of the referenced API.

AppLanguageApi

AppTheme

Describes a theme provided by the app.

AppThemeApi

The AppThemeApi gives access to the current app theme, and allows switching to other options that have been registered as a part of the App.

AuthProviderInfo

Information about the auth provider.

AuthRequestOptions

Configuration of an authentication request.

BackstageIdentityApi

This API provides access to the user's identity within Backstage.

BackstageIdentityResponse

Token and Identity response, with the users claims in the Identity.

BackstageUserIdentity

User identity information within Backstage.

ConfigApi

The Config API is used to provide a mechanism to access the runtime configuration of the system.

CreateExtensionBlueprintOptions

CreateExtensionOptions

CreateSwappableComponentOptions

Options for creating an SwappableComponent.

DiscoveryApi

The discovery API is used to provide a mechanism for plugins to discover the endpoint to use to talk to their backend counterpart.

ErrorApi

The error API is used to report errors to the app, and display them to the user.

ErrorApiError

Mirrors the JavaScript Error class, for the purpose of providing documentation and optional fields.

ErrorApiErrorContext

Provides additional information about an error that was posted to the application.

ErrorDisplayProps

ExtensionAttachTo

ExtensionAttachToSpec

ExtensionBlueprintDefineParams

A function used to define a parameter mapping function in order to facilitate advanced parameter typing for extension blueprints.

ExtensionBlueprintParameters

ExtensionBlueprintParams

An opaque type that represents a set of parameters to be passed to a blueprint.

ExtensionDataContainer

ExtensionDataRef

ExtensionDataRefToValue

ExtensionDataValue

ExtensionDefinitionAttachTo

Specifies where an extension should attach in the extension tree.

ExtensionDefinitionParameters

ExtensionFactoryMiddleware

FeatureFlag

Feature flag descriptor.

FeatureFlagConfig

Feature flag configuration.

FeatureFlagsSaveOptions

Options to use when saving feature flags.

FeatureFlagState

FetchApi

A wrapper for the fetch API, that has additional behaviors such as the ability to automatically inject auth information where necessary.

FrontendFeature

FrontendPluginInfoOptions

Options for providing information for a plugin.

IconComponent

IconComponent is the common icon type used throughout Backstage when working with and rendering generic icons, including the app system icons.

IdentityApi

The Identity API used to identify and get information about the signed in user.

NavContentComponent

A component that renders the nav bar content, to be passed to the NavContentBlueprint.

NotFoundErrorPageProps

OAuthApi

This API provides access to OAuth 2 credentials. It lets you request access tokens, which can be used to act on behalf of the user when talking to APIs.

OAuthRequestApi

Provides helpers for implemented OAuth login flows within Backstage.

OAuthRequester

Function used to trigger new auth requests for a set of scopes.

OAuthRequesterOptions

Describes how to handle auth requests. Both how to show them to the user, and what to do when the user accesses the auth request.

OAuthScope

An array of scopes, or a scope string formatted according to the auth provider, which is typically a space separated list.

OpenIdConnectApi

This API provides access to OpenID Connect credentials. It lets you request ID tokens, which can be passed to backend services to prove the user's identity.

PendingOAuthRequest

An pending auth request for a single auth provider. The request will remain in this pending state until either reject() or trigger() is called.

PortableSchema

ProfileInfo

Profile information of the user.

ProfileInfoApi

This API provides access to profile information of the user from an auth provider.

ProgressProps

ResolvedExtensionInput

Convert a single extension input into a matching resolved input.

ResolvedExtensionInputs

Converts an extension input map into a matching collection of resolved inputs.

RouteFunc

TS magic for handling route parameters.

SessionApi

The SessionApi provides basic controls for any auth provider that is tied to a persistent session.

SessionState

SignInPageProps

Props for the SignInPage component.

StorageValueSnapshot

A snapshot in time of the current known value of a storage key.

SwappableComponentRef

TranslationApi

TranslationFunction

TranslationSnapshot

TypesToApiRefs

Wraps a type with API properties into a type holding their respective ApiRefs.