- Help Topics: 1. A Short Introduction to IGSDB V2 2. What's Changed
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 token
identifier.
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
|
product_id
, while the V2 product detail
endpoint is keyed using token
.