Skip to main content

DiscoveryApi

Home > @backstage/core-plugin-api > DiscoveryApi

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

Signature:

export type DiscoveryApi = {
getBaseUrl(pluginId: string): Promise<string>;
};

Remarks

The purpose of the discovery API is to allow for many different deployment setups and routing methods through a central configuration, instead of letting each individual plugin manage that configuration.

Implementations of the discovery API can be a simple as a URL pattern using the pluginId, but could also have overrides for individual plugins, or query a separate discovery service.