using-backstage-catalog
Installation
SKILL.md
Backstage Catalog Patterns
When to use this skill
- Plugin needs to fetch a specific entity by its ref (e.g. a Group, Component, or User)
- Plugin needs to query entities with filters (e.g. all Components owned by a team, all Groups of a given type)
- Plugin needs to register a new catalog location, refresh an entity, or unregister one programmatically
- This applies to both frontend and backend code; the entry points differ but the operations are the same
Choose the right pattern
Frontend (in a frontend plugin component)
| Situation | Pattern | Reference |
|---|---|---|
| Fetch one entity by ref | useApi(catalogApiRef).getEntityByRef(ref) |
references/fetch-by-ref.md (Frontend section) |
| Query entities with filters | useApi(catalogApiRef).getEntities({ filter }) |
references/query-entities.md (Frontend section) |
| Register / refresh / unregister a location | useApi(catalogApiRef).addLocation / refreshEntity / removeLocationById |
references/register-entity.md (Frontend section) |