Platform(s): API
URLs: https://api.inaturalist.org/v1/observations, https://api.inaturalist.org/v2/observations
Description of need:
I have made 300,000+ annotations, mostly life stages of shield bugs. I do this very carefully, but I (presumably) still make mistakes. As only the observer could remove any incorrect annotations and others can only vote, and I do not get notifications of either action, I would like to be able to find annotations that I made that people disagree with. Given the large amount of annotations I do not think the usual method of downloading all observations through the API and filtering them locally would work, but correct me if I am wrong. Instead,
Feature request details:
I propose adding a parameter annotation_max_score which ideally works in conjunction with annotation_user_id. For example (in observation_query_builder.js):
if ( req.inat.annotation_users || params.annotation_max_score || params.annotation_max_score === 0 ) {
const initialFilters = [];
if ( req.inat.annotation_users ) {
const annotationUserIDs = _.map( req.inat.annotation_users, "id" );
initialFilters.push(
esClient.termFilter( "annotations.user_id", annotationUserIDs )
);
}
if ( params.annotation_max_score || params.annotation_max_score === 0 ) {
initialFilters.push(
{ range: { "annotations.vote_score_short": { gte: params.annotation_max_score } } }
);
}
const nestedQuery = {
nested: {
path: "annotations",
query: {
bool: {
filter: initialFilters
}
}
}
};
searchFilters.push( nestedQuery );
}
Even better would be if one could also select the annotation, e.g. adding annotation_term_id to keep backwards compatibility, but that is perhaps too much to ask.
If I understand correctly, if a parameter for this is added to the V2 API I can handcraft a URL to get the query to work on the Explore page, and the same for the V1 API and the Identify page.