Skip to main content

UrlPatternDiscovery

Home > @backstage/core-app-api > UrlPatternDiscovery

UrlPatternDiscovery is a lightweight DiscoveryApi implementation. It uses a single template string to construct URLs for each plugin.

Signature:

class UrlPatternDiscovery implements DiscoveryApi 

Implements: DiscoveryApi

Methods

Method

Modifiers

Description

compile(pattern)

static

Creates a new UrlPatternDiscovery given a template. The the only interpolation done for the template is to replace instances of {{pluginId}} with the ID of the plugin being requested.

Example pattern: http://localhost:7007/api/{{ pluginId }}

getBaseUrl(pluginId)