4.2. V1 and V2 API

When IGSDBv1 was released, an API was provided to gives users a json representation of a product list or product detail. The product detail was keyed by product_id.

With the introduction of v2, the IGSDB data model's complexity has increased, and with it the representation of a product in the API.

For example, products in the IGSDBv2 are now keyed by human-readable and URL-capable slug-like string, which we call the product token. Using a token allows for a more user-friendly way to reference a product in the API. A token like clr-3 is easier to remember that an integer value. These tokens can be used as unique identifiers in other systems as well, such as when submitting files to the LBNL Checkertool for inclusion in the IGSDB.

Products now have the concept of a composition, and more information is provided via the optical_data and integrated_spectral_averages_summary dictionaries.

The IGSDBv2 supports both the older v1 representation of a product as well as the newer representation.

IGSDBv1 API

To access the older v1 representation of a list of products or a product detail, the following endpoints should be used:

Product list https://igsdb-v2.herokuapp.com/api/v1/products
Product detail https://igsdb-v2.herokuapp.com/api/v1/products/( product_id )
Schema https://igsdb-v2.herokuapp.com/api/v1/schema

IGSDBv2 API

To access the newer v2 representation of a list of products or a product detail, the following endpoints should be used:

Product list https://igsdb-v2.herokuapp.com/api/v2/products
Product detail https://igsdb-v2.herokuapp.com/api/v2/products/( token )
Schema https://igsdb-v2.herokuapp.com/api/v2/schema
Note that in V1 the product detail endpoint is keyed using product_id, while the V2 product detail endpoint is keyed using token.