4.5. Product List (Filtering and Pagination)

The API user can view all products in the IGSDBv2 database via the products endpoint.

V1 https://igsdb-v2.herokuapp.com/api/v1/products
V2 https://igsdb-v2.herokuapp.com/api/v2/products

The same products are shown in both endpoints. The main difference is the shape of the data presented (the V1 endpoint has an older, less detailed representation of product data. See V1 and V2 API docs for details).

Filtering

A small set of filters are available to limit the results of a product list. Filters are appended to a query via the conventional GET variable suffix to a URL, e.g. ?id=1234 .

Filter Description Availability Example
type Filter by product type. Valid values are
  • GLAZING
  • SHADING
V1 and V2 https://igsdb-v2.herokuapp.com/api/v2/products?type=GLAZING
subtype Filter by product subtype. Valid values are
  • MONOLITHIC
  • LAMINATE
  • INTERLAYER
  • EMBEDDED_COATING
  • COATED
  • COATING
  • APPLIED_FILM
  • FILM
  • FRITTED_GLASS
  • SANDBLASTED_GLASS
  • ACID_ETCHED_GLASS
  • CHROMOGENIC
  • VENETIAN_BLIND
  • VERTICAL_LOUVER
  • PERFORATED_SCREEN
  • WOVEN_SHADE
  • ROLLER_SHADE
  • CELLULAR_SHADE
  • PLEATED_SHADE
  • ROMAN_SHADE
  • DIFFUSING_SHADE
  • SOLAR_SCREEN
  • SHADE_MATERIAL
  • UNKNOWN
V1 and V2 https://igsdb-v2.herokuapp.com/api/v2/products?subtype=MONOLITHIC
name Search for product names matching string. V1 and V2 https://igsdb-v2.herokuapp.com/api/v2/products?name=clr
min_thickness Filter on minimum thickness. Return products equal to or greater than provided thickness. V1 and V2 https://igsdb-v2.herokuapp.com/api/v2/products?min_thickness=4.5
max_thickness Filter on max thickness. Return products that are less than or equal to the provided thickness. V1 and V2 https://igsdb-v2.herokuapp.com/api/v2/products?max_thickness=2.5
manufacturer_name Filter products with manufacturer name that contains the provided string. V1 and V2 https://igsdb-v2.herokuapp.com/api/v2/products?manufacturer_name=asahi
nfrc_id Filter products with NFRC ID that matches the provided integer. V1 and V2 https://igsdb-v2.herokuapp.com/api/v2/products?nfrc_id=1203
token Filter products with a token name that contains the provided string. V1 and V2 https://igsdb-v2.herokuapp.com/api/v2/products?subtype=MONOLITHIC
id Filter products that match the provided product ID integer. V1 and V2 https://igsdb-v2.herokuapp.com/api/v2/products?id=None
V2 Only Filters
componentId Filter products that match the provided "componentId", an identifier related to the "Building Envelope Database" (See the GraphQL docs for more information). V2 only https://igsdb-v2.herokuapp.com/api/v2/products?component_id=07983375-b91b-4142-b7a5-9b6ac30bea51
data_file_name Filter products with a "data file name" that contains the provided string V2 only https://igsdb-v2.herokuapp.com/api/v2/products?data_file_name=vision
data_file_type Filter products with a "data file type" that matches provided string. Valid values are
  • BSDF_XML
  • THERM
  • IGDB_LEGACY_SUBMISSION_FILE
  • CGDB_LEGACY_SUBMISSION_FILE
  • SPD
  • OTHER
V2 only https://igsdb-v2.herokuapp.com/api/v2/products?data_file_name=vision

Pagination

When an API user requests all products, the entire set of products are returned with no pagination. This is because we store the complete query in a cache so that it can be returned in a reasonable amount of time. The table in the web UI requires all products in one request, so this cache-based response is essential.

We also cache two frequent queries, ?type=GLAZING and ?type=SHADING.

For all other queries that include filtering, we returns results in a paginated way in blocks of 100 products.

Paginated results are returned in the following shape:

{
        "count":806,
        "next":"https://igsdb-v2.herokuapp.com/api/v2/products/?page=2&subtype=MONOLITHIC",
        "previous":null,
        "results":[
            ...product data...
        ]
}

    

As shown above, the top-level properties of the returned JSON data provides information on total results matched and the current page of results.

  • The count field indicates the total number of products that match the query.
  • The next field indicates the URL to the next page of results.
  • The previous field indicates the URL to the previous page of results.
  • The results field contains the products for the current page.