Skip to content

Commit c3cbbd9

Browse files
authored
feat(product_catalog): add filter by API ID in the catalog API (#3022)
1 parent c732443 commit c3cbbd9

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

api/product_catalog/v2alpha1/product_catalog_sdk.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1294,6 +1294,9 @@ type PublicCatalogAPIListPublicCatalogProductsRequest struct {
12941294

12951295
// Status: the lists of filtered product status, if empty only products with status public_beta, general_availability, preview, end_of_new_features, end_of_growth, end_of_deployment, end_of_support, end_of_sale, end_of_life or retired will be returned.
12961296
Status []ListPublicCatalogProductsRequestStatus `json:"-"`
1297+
1298+
// APIIDs: filter products by API IDs. Each ID is matched against product-specific identifiers: `dedibox.offer_id` (converted to string), `elastic_metal.offer_id`, `apple_silicon.server_type`, `instance.offer_id`, and `load_balancer.node.offer_id`. Products that do not support API ID filtering are excluded from the results. If empty, no filtering is applied.
1299+
APIIDs []string `json:"-"`
12971300
}
12981301

12991302
type PublicCatalogAPI struct {
@@ -1331,6 +1334,7 @@ func (s *PublicCatalogAPI) ListPublicCatalogProducts(req *PublicCatalogAPIListPu
13311334
parameter.AddToQuery(query, "page_size", req.PageSize)
13321335
parameter.AddToQuery(query, "product_types", req.ProductTypes)
13331336
parameter.AddToQuery(query, "status", req.Status)
1337+
parameter.AddToQuery(query, "api_ids", req.APIIDs)
13341338
parameter.AddToQuery(query, "global", req.Global)
13351339
parameter.AddToQuery(query, "region", req.Region)
13361340
parameter.AddToQuery(query, "zone", req.Zone)

0 commit comments

Comments
 (0)