Skip to main content

CatalogApi.getEntityByRef()

Home > @backstage/catalog-client > CatalogApi > getEntityByRef

Gets a single entity from the catalog by its ref (kind, namespace, name) triplet.

Signature:

getEntityByRef(entityRef: string | CompoundEntityRef, options?: CatalogRequestOptions): Promise<Entity | undefined>;

Parameters

ParameterTypeDescription
entityRefstring | CompoundEntityRefA complete entity ref, either on string or compound form
optionsCatalogRequestOptions(Optional) Additional options

Returns:

Promise<Entity | undefined>

The matching entity, or undefined if there was no entity with that ref