Swirrl / datahost-prototypes

Eclipse Public License 1.0
0 stars 0 forks source link

Fix try API button to work on revision page #387

Closed RickMoynihan closed 6 months ago

RickMoynihan commented 7 months ago

e.g. here:

https://dluhc-pmd5-prototype-ui.publishmydata.com/datasets/dataset-series/dataset-release/?series=English-Indices-of-Deprivation&release=2019

Clicking the button gives an empty body.

Image

xdrcft8000 commented 7 months ago

When accessing a series or revision in browser you get a JSON response of the series/revision. e.g. https://dluhc-pmd5-prototype.publishmydata.com/data/English-Indices-of-Deprivation https://dluhc-pmd5-prototype.publishmydata.com/data/English-Indices-of-Deprivation/release/2019/revision/1

Accessing a release doesn't do that: https://dluhc-pmd5-prototype.publishmydata.com/data/English-Indices-of-Deprivation/release/2019 - returns nothing

Adding a slash takes you to the latest revision https://dluhc-pmd5-prototype.publishmydata.com/data/English-Indices-of-Deprivation/release/2019/

For now I've just used a .json extension to make the button work: https://dluhc-pmd5-prototype.publishmydata.com/data/English-Indices-of-Deprivation/release/2019.json - returns json of the release as expected for the button.

But that doesn't feel consistent with series and revision so I thought I'd mention it - not sure what the intended behaviour is