Improvements brought by the new HDA

If you'd like to know what's new in the new version of our HDA, this article is for you.

Alexandre avatar
Written by Alexandre
Updated over a week ago

Context


As part of the transition to WEkEO 2.0, the Harmonised Data Access (HDA) also has undergone a significant evolution. The most significant changes to the API are

  • Synchronous jobs for search and download

  • Faster search results with pagination

  • Simplified syntax / structure of the search request

What are the visible improvements?


  • The HDA query provided in the WEkEO catalog, which can be used with the HDA API, the HDA python client, or the WEkEO Climetlab plugin, has been significantly simplified.

Old HDA request syntax (click me)

{
"datasetld": "EO:EUM:DAT:METOP:GLB-SST-NC",
"dateRangeSelectValues": [
{
"name":"position",
"start":"2016-07-11T05:58:00.000Z",
"end":"2016-07-12T00:00.000Z",
}
],
"stringChoiceValues":[
{
"name":"sat",
"value":"Metop-B"
},
{
"name":"type",
"value":"OSSTGLBN"
}
]
}

New HDA request syntax (click me)

{
"dataset_id": "EO:EUM:DAT:METOP:GLB-SST-NC",
"dtstart": "2016-07-11T00:00:00.000Z",
"dtend": "2016-07-12T00:00:00.000Z",
"sat": "Metop-B",
"type": "OSSTGLBN"
}

  • The HDA python library makes the HDA API transparent for you and makes programmatic search and download easier.

  • The WEkEO Climetlab plugin further makes the download of data and the different data formats transparent for you and allows easier working with and display of data.

  • In the WEkEO Catalogue, there's no longer a need to order products before downloading them.

What will change for you?


  • In older .hdarc versions, a URL was indicated. You must delete this URL if your .hdarc still contains it. This way, you won't encounter any errors with the new version of HDA.

  • You can, and should gradually, utilize the simplified search query with the HDA Python library. But keep in mind that old requests will still be usable with the new version of HDA.

  • For those using the "raw" HDA API, this new version will require you to use a new API to obtain or refresh a token.

    So here are the 2 steps you'll need:

    • Command curl to request a token:

      curl -X POST -H 'Content-Type: application/json' -d '{"username":"USERNAME","password":"PASSWORD"}' https://gateway.prod.wekeo2.eu/hda-broker/gettoken

      where USERNAME and PASSWORD must be replaced with your credentials.

    • Command curl to refresh a token:

      curl -d "refresh_token=${REFRESH_TOKEN}" https://gateway.prod.wekeo2.eu/hda-broker/refreshtoken

      where the REFRESH_TOKEN is provided by the first call to “gettoken”.

And here's a complete example of how to use these 2 commands (click me)

  • First : request a token

$ REFRESH_TOKEN=$(curl -X POST -H 'Content-Type: application/json' -d '{"username":"USERNAME","password":"PASSWORD"}' https://gateway.prod.wekeo2.eu/hda-broker/gettoken | jq -r '.refresh_token')
$ echo $REFRESH_TOKEN
0fc5cf1d-d146-3239-b0f0-6862613a0521
  • Second : refresh the token

$ curl -d "refresh_token=${REFRESH_TOKEN}" https://gateway.prod.wekeo2.eu/hda-broker/refreshtoken

{"access_token":"b5343fe4-8134-316f-a0e4-c6cc2fefb88a","refresh_token":"c781a70a-91d9-34d2-9cae-ea030a076927","scope":"openid","id_token":"eyJ4NXQiOiJNell4TW1Ga09HWXdNV0kwWldObU5EY3hOR1l3WW1NNFpUQTNNV0kyTkRBelpHUXpOR00wWkdSbE5qSmtPREZrWkRSaU9URmtNV0ZoTXpVMlpHVmxOZyIsImtpZCI6Ik16WXhNbUZrT0dZd01XSTBaV05tTkRjeE5HWXdZbU00WlRBM01XSTJOREF6WkdRek5HTTBaR1JsTmpKa09ERmtaRFJpT1RGa01XRmhNelUyWkdWbE5nX1JTMjU2IiwiYWxnIjoiUlMyNTYifQ.eyJhdF9oYXNoIjoiVlRlYTQxQ25sU0wwV2lVdjdwNDRMdyIsInN1YiI6ImplYW4tbHVjLmdhdXRoaWVyIiwiYW1yIjpbInJlZnJlc2hfdG9rZW4iXSwiaXNzIjoiaHR0cHM6XC9cL2lkZW50aXR5LnByb2Qud2VrZW8yLmV1XC9vYXV0aDJcL3Rva2VuIiwiZ3JvdXBzIjpbIkludGVybmFsXC9hZG1pbiIsIkludGVybmFsXC9ldmVyeW9uZSIsImFkbWluIiwiQXBwbGljYXRpb25cL2hkYS1hZG1pbiJdLCJnaXZlbl9uYW1lIjoiamVhbi1sdWMiLCJhdWQiOiJTRDcwTnJObDVSRGV3QURUNnd1VEVESmtEZUVhIiwibmJmIjoxNzA3MzI2MTY4LCJhenAiOiJTRDcwTnJObDVSRGV3QURUNnd1VEVESmtEZUVhIiwibmFtZSI6ImplYW4tbHVjLmdhdXRoaWVyIiwiZXhwIjoxNzA3MzI5NzY4LCJpYXQiOjE3MDczMjYxNjgsImZhbWlseV9uYW1lIjoiZ2F1dGhpZXIiLCJlbWFpbCI6ImplYW4tbHVjLmdhdXRoaWVyQHNvcHJhc3RlcmlhLmNvbSJ9.Ak5XaFVa6A3XqhfDZS2w7AGFm4TKyJOqFtByS0Q4dMAAP_bxnHEt-Ea2TI3epMxxrJqxxoNhPb4XGpTy84HEKrb0IVtkSzR4bVT7CJu5WhA49DAcBR9ECwDcw6oK4lWBs3h6n9DQh-clVzb-Q2wfp5uYRsov24Qw1pGSnwuyzopfogU0XJ8L8xEGvcdS_n9z1EXGk3E-3lPZHxbjjRcrTPXNvW6phC_HfxjXNDtwssBL-zFGFKu_F35FnYeTQ9x1PnHjj1LsiGucbQj0TvFY38PfdewT2-ItRHnfi6_b46jT8KtA3oHsdQRlDGiln4zXEE3CkXMXVWI4rscRVA1akA","token_type":"Bearer","expires_in":3600}

💡 WEkEO Pro Tip: here's a link to the HDA broker documentation. It contains detailed information on the use and features of this service.

What's next?


If you encounter any issue by following the notebook, please contact the WEkEO Support.

Feel free to check these articles that might be of interest for you:

We are user-driven and we implement users' suggestions, so feel free to contact us:

  • through a chat session available in the bottom right corner of the page

  • via e-mail to our support team (supportATwekeo.eu)

Did this answer your question?