get_primary_identifier

get_primary_identifier(prefix, identifier=None, /, **kwargs)[source]

Get the primary identifier for an entity.

Parameters:
  • prefix (str | Reference | ReferenceTuple) – The name of the resource

  • identifier (str | None) – The identifier to look up

  • kwargs (Unpack[GetOntologyKwargs])

Returns:

the canonical identifier based on alt id lookup

Return type:

str

Returns the original identifier if there are no alts available or if there’s no mapping.