Backstage
    Preparing search index...

    The request type for CatalogClient.getEntityFacets.

    interface GetEntityFacetsRequest {
        facets: string[];
        filter?: EntityFilterQuery;
    }
    Index

    Properties

    Properties

    facets: string[]

    Dot separated paths for the facets to extract from each entity.

    Example: For an input of ['kind', 'metadata.annotations.backstage.io/orphan'], then the response will be shaped like

    {
    "facets": {
    "kind": [
    { "key": "Component", "count": 22 },
    { "key": "API", "count": 13 }
    ],
    "metadata.annotations.backstage.io/orphan": [
    { "key": "true", "count": 2 }
    ]
    }
    }

    If given, return only entities that match the given patterns.

    If multiple filter sets are given as an array, then there is effectively an OR between each filter set.

    Within one filter set, there is effectively an AND between the various keys.

    Within one key, if there are more than one value, then there is effectively an OR between them.

    Example: For an input of

    [
    { kind: ['API', 'Component'] },
    { 'metadata.name': 'a', 'metadata.namespace': 'b' }
    ]

    This effectively means

    (kind = EITHER 'API' OR 'Component')
    OR
    (metadata.name = 'a' AND metadata.namespace = 'b' )

    Each key is a dot separated path in each object.

    As a value you can also pass in the symbol CATALOG_FILTER_EXISTS (exported from this package), which means that you assert on the existence of that key, no matter what its value is.