Skip to main content

DiscoveryService.getExternalBaseUrl()

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

Returns the external HTTP base backend URL for a given plugin, without a trailing slash.

The returned URL should point to an external endpoint for the plugin, such that it is reachable from the Backstage frontend and other external services. The returned URL should be usable for example as a callback / webhook URL.

The returned URL should be stable and in general not change unless other static or external configuration is changed. Changes should not come as a surprise to an operator of the Backstage backend.

For example, asking for the URL for catalog may return something like https://backstage.example.com/api/catalog

Signature:

getExternalBaseUrl(pluginId: string): Promise<string>;

Parameters

ParameterTypeDescription
pluginIdstring

Returns:

Promise<string>