1

Topic: featureID not working?

The following query should return all the recent hedgehog records for our record centre:

https://data.nbn.org.uk/api/taxonObservations?featureID=3374725&startYear=2000&ptvk=NBNSYS0000005078

but I just get an empty list. (Adding spatialRelationship=overlap doesn't make any difference). If I replace the featureID with gridRef, i.e.

https://data.nbn.org.uk/api/taxonObservations?gridRef=TL1234&startYear=2000&ptvk=NBNSYS0000005078

I get three records for that 1km square. The query

https://data.nbn.org.uk/api/features/3374725

seems to suggest that I'm using the right featureID for our record centre, so am I doing something wrong or is there a problem with using featureID?

Thanks, Keith

2

Re: featureID not working?

I may have answered my own question. I obtained the 3374725 from running

https://data.nbn.org.uk/api/features/siteBoundaries

and looking for ourselves in the "name" field and then using the associated "featureID" value (3374725) as the "featureID" value in the api call to obtain the records.

Wrong!

What I should have used for the "featureID" in the api call was not the "featureID" but instead the "identifier" field value (GA00094220). So the following seems to return the recent hedgehog records for our record centre:

https://data.nbn.org.uk/api/taxonObservations?featureID=GA00094220&startYear=2000&ptvk=NBNSYS0000005078

Thus rather led astray by the assumption that the featureID returned from one call was the same thing as the featureID expected by the next call...!

3

Re: featureID not working?

Hi, sorry that is a bit confusing will try and get the documentation updated to try and make this a bit clearer

Matt Debont
Application Developer
Joint Nature Conservation Committee, Monkstone House, City Road, Peterborough PE1 1JY, UK