Skip to main content

DiscoveryService

Home > @backstage/backend-plugin-api > DiscoveryService

The DiscoveryService is used to provide a mechanism for backend plugins to discover the endpoints for itself or other backend plugins.

See the service documentation for more details.

Signature:

export interface DiscoveryService 

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 as simple as a URL pattern using the pluginId, but could also have overrides for individual plugins, or query a separate discovery service.

Methods

MethodDescription
getBaseUrl(pluginId)Returns the internal HTTP base URL for a given plugin, without a trailing slash.
getExternalBaseUrl(pluginId)Returns the external HTTP base backend URL for a given plugin, without a trailing slash.