ECR: usage patterns

This topic applies to the ecr dataset.

You can keep the data of an entity in your own systems and keep it up to date with the stream, or look the data up through the API when you need it. You can choose per entity. For example, you can keep Timeseries or GeographicLocation locally and look up Observations on demand.

Getting reference data

For most entities you can read all available data with the latest service:

https://api-qa.ihsmarkit.com/ecr/Bank/latest
https://api-qa.ihsmarkit.com/ecr/Concept/latest
https://api-qa.ihsmarkit.com/ecr/ConversionMethod/latest
https://api-qa.ihsmarkit.com/ecr/DistributionMethod/latest
https://api-qa.ihsmarkit.com/ecr/Frequency/latest
https://api-qa.ihsmarkit.com/ecr/GeographicLocation/latest
https://api-qa.ihsmarkit.com/ecr/Industry/latest
https://api-qa.ihsmarkit.com/ecr/Scale/latest
https://api-qa.ihsmarkit.com/ecr/SeriesType/latest
https://api-qa.ihsmarkit.com/ecr/Source/latest
https://api-qa.ihsmarkit.com/ecr/Unit/latest

Getting Timeseries

Because of the number of Timeseries, filter the request, both to limit the size of the response and to get faster results.

To look up specific Timeseries, filter by mnemonic or by a combination of other filters:

https://api-qa.ihsmarkit.com/ecr/Timeseries/latest?mnemonic=MNEMONIC1,MNEMONIC2
https://api-qa.ihsmarkit.com/ecr/Timeseries/latest?bank=%40USPRICE&economicConcept=16106&geographicLocation=257

To look up all Timeseries you are entitled to:

  1. Look up the Banks you are entitled to: https://api-qa.ihsmarkit.com/ecr/Bank/latest
  2. Look up the Timeseries of each Bank: https://api-qa.ihsmarkit.com/ecr/Timeseries/latest?bank=BANK_ID

Some Banks hold many Timeseries. Set a limit and request the following pages with after:

https://api-qa.ihsmarkit.com/ecr/Timeseries/latest?bank=BANK_ID&limit=10000&envelope=true&after=AFTER_VALUE

Getting Observations

Observation and Timeseries share the same id values, so you find the Observations by looking up the Timeseries. Request the Observations from the timeseries service with the ids of the Timeseries that you found:

https://api-qa.ihsmarkit.com/ecr/Observation/timeseries?id=ID1,ID2&limit=10000&envelope=true

Tip: A request can contain up to 1000 ids.

A request for Observations can match more records than one response holds. Request the next pages by repeating the request with the after value from the envelope.

Keeping local data up to date

If you store ECR data locally, use the stream to receive updates:

https://api-qa.ihsmarkit.com/ecr/stream

Each message holds the updates of one entity, so you can ignore the messages of entities that you do not store.