API v2 feedback

It seems you have opted into the right-to-left layout test instead of the API v2 test. If you visit any observation and scroll to the bottom, you’ll see the option to opt back out of the right-to-left test and restore the original left-to-right layout.

1 Like

How does place autocomplete work in v2 API?

For most calls it seems like v1 query URLs work as drop-in replacements.

[v.1] E.g. for (works):
https://api.inaturalist.org/v1/places/autocomplete?order_by=area&q=oregon

[v2:] It sounds like these calls are missing something:
https://api.inaturalist.org/v2/places/autocomplete?order_by=area&q=oregon
https://api.inaturalist.org/v2/places/autocomplete?q=oregon&order_by=area

{“status”:422,“errors”:[{“path”:“order_by”,“message”:“must be equal to one of the allowed values”,“instancePath”:“/order_by”,“params”:{“allowedValues”:[“admin_and_distance”]}}]}

https://api.inaturalist.org/v2/places/autocomplete?q=oregon
https://api.inaturalist.org/v2/places/autocomplete?q=oregon&fields=all

{“total_results”:0,“page”:1,“per_page”:0,“results”:}

https://api.inaturalist.org/v2/places/autocomplete/oregon

Cannot GET /v2/places/autocomplete/oregon

Actually, it looks like your queries have something extra rather than missing: “/autocomplete” is not used for places in v2.

According to the v2 documents at https://api.inaturalist.org/v2/docs/#/Places/get_places, this query should do what you want: https://api.inaturalist.org/v2/places?q=oregon&order_by=area

2 Likes

edit: I finally read and tested again, and realized the /v2/places endpoint *is* also autocomplete.
Thanks @twainwright for the brief correct answer :magic_wand:
Now fully v2’ed on this API mapping experiment/mobile tool

Is there a general update/roadmap/timeline on the state of API v2 and Python/SQL like clients? At the moment I’m aware of PyInaturalist, but haven’t seen API v2 specific commentary there.

For example, I’d love to be able to assess how often my IDs of different clades are eventually validated (i.e. get research grade) versus are retracted (i.e. I’m convinced I’ve made an erroneous guess). It’d be especially cool if I could check whether they were noted as c.v. guided at the time.

I know iNat has this data, but the current interfaces don’t seem able to supply this data efficiently in response to a query. I know there’s been steady activity in this thread and that my curiosity isn’t the highest priority, but I’d love to see digest-level updates on how the data API is evolving and where it’s headed.

Opening any observation on the identify page currently seems to be broken under v2, but still functions under v1.

URL: https://www.inaturalist.org/observations/identify?test=apiv2
Browser: Firefox

Behaviour: no modal popup opens. Page turns white. This error is present in the browser console:

Uncaught TypeError: can't access property "prefers_community_taxa", a.user.preferences is undefined

1 Like

I came here to say the same. It was working a couple days ago. As of yesterday, nope. I tried with Chrome and Opera in macOS.

2 Likes

Same problem. when I try to open up an observation on identify page, all I get is an empty white screen which is unfortunate since I’d like to make observations for the current IDathon. Safari or Chrome on Mac.

1 Like

Same problem that others have reported - when in the Identify page via web/desktop browser (Chrome/Windows), when I click on an observation, all of the observations disappear and I’m left with a blank field. Hitting the Back button takes me out of the Identify function. This started happening a few days ago.

1 Like

Filed a bug report for this Identify page issue, thanks for reporting!

2 Likes

Given this: enable APIv2 for all users on Identify, WEB-826 (#4774) * enable APIv2 for all users on Identify, WEB-826 * remove APIv2 test group toggles for Identify, can we get an APIv2 status update?