API full-text search of body tags in comments & identifications and return observations

if you’re going to have them set up their own iNat accounts rather than set up a combined organizational account, what you’re describing:

… can still be accomplished:

1 Like

Thanks @pisum
Wouldn’t that only return mentions in observations made by the logged user?

What about mentions in observations made by unknown users which tag the logged user?
Those would be the “help me” mentions, but wouldn’t be returned this way, I think.

as far as i know, as long as your account settings allow it, you can get notifications on any comments and identifications in observations you follow or which you’re mentioned in, regardless of whether you were the observer. for example, you can see in the screenshot below that a user mentions me in a note on an identification for an observation where he is the observer, and i still received a notification in that case:

2 Likes

Thanks @pisum
But I guess that notification worked because you had already participated before in that example observation (you had identified it, so you “got subscribed”).

The API docs about /observations/updates say “returns an array of objects representing new comments and identifications on observations the authenticated user has subscribed to. Requires authentication

Not sure about what “subscribed to” means but I guess all identifiers or commenters are of course subscribed. Probably if you follow an user, you are also subscribed to any of her/his observations.

But what about unknown users asking you to identify their new observations?

i mentioned you on one of my observations: https://www.inaturalist.org/observations/94288383.

can you get the notification from the API?

2 Likes

but how can they be tagged if they are not on iNat? Can’t @mention a not member.

I didn’t mean that: of course they must create an account.
But that doesn’t mean they are willing to install the phone app or login again through the web interface.

Unrelated but very similar:
A friend of mine has some good bird photos which would like to identify.
So I told him to try iNaturalist, installed the app in his phone, created the account and explained how to use the web interface. But he still finds it difficult and is not using it: “too many complicated steps”.

It’s easier for him to fill data in a table (dates, coordinates, image file path) and again, the api can help to upload it all to iNaturalist using his account.

Sorry @pisum it took me a while since I am not at work now.
No, I don’t get the notification from the api.

I have answered your comment. So probably if you mention me again now I will be “subscribed” to that observation and your new comment will be visible to me using the api.

I also made a test observation and mentioned you to see if you can grab that comment (tell me if you are able but I don’t think so).

Thanks a lot for your help testing this

it is possible to do this, but it looks like you have explicitly set the parameter &observations_by=following to get mentions on observations that you’re not actually following yet:

(i don’t know why they implemented this in such a way that you have to explicitly set the parameter, but it is what it is.)

you asked separately whether you can use the SwaggerUI-based API documentation page to test API calls, and you can. just get a JWT from https://www.inaturalist.org/users/api_token, and then copy and paste just the api_token value from that JSON to the appropriate spot on the page:

2 Likes

Thanks for the token tips, I could do it.
And you were right @pisum
I was able to get your mention (then I deleted my answer and unsubscribed to your observation, and re-ran the api call, but I still were getting it).
But the documentation is absolutely counter-intuitive. I wouldn’t ever have tried this if you don’t tell me it works. “following” means “following or not” ???:

So yes it works! Catching users mentions is possible if they are logged in.
Thanks a lot for your help. :+1: :+1: :+1: :+1:

Still, this is only one of the possible use cases (full text search is still needed to catch specific words).
And still, catching a bunch of users’ mentions would be much easier to do that way (not needing to re-run the api under many different user accounts).

workflow-wise, i don’t really understand why you would want to generate one giant spreadsheet for everyone to review. to me, if you’re going to have separate iNat accounts, it makes the most sense (from a workflow and security perspective) for particular user to open whatever your application is, and click a button to generate the spreadsheet just for themselves. then they can fill in the spreadsheet and then upload via a second application or module.

1 Like

Yes, that makes most sense if every single possible identifier that I know does finally create a personal account.
But I will probably end up in a mixed scenario, where some do and some don’t.
For the latter, we would still need to use an institutional account (as you already suggested) and put together institution mentions and taxonomic/geographic searches which might be appropriate for these identifiers.

We’ll think about it. Thanks a lot again.

1 Like

Help please?
Why does this query give me only the ONE result??
I have left hundreds of ‘Supporting ssp’ comments, before iNat updated to plant+ssp=sp yesterday. I would like to find those obs and withdraw where I no longer need to ‘support’ them against iNat.
https://forum.inaturalist.org/t/leading-subspecies-ids-should-change-the-obs-taxon-like-leading-ids-of-other-ranks/139

https://www.inaturalist.org/comments?utf8=✓&q=supporting&commit=Search&mine=true

i don’t know if there’s a great way to get what you’re looking for, but the right side of this page may help: https://jumear.github.io/stirfry/iNatAPIv1_identifications?per_page=200&user_id=dianastuder&rank=subspecies&category=supporting&current=true.

1 Like

Many thanks, that looks promising.

Only 2K … ??? I may be some time.
Looking at it again - yes - I only have to work thru ones where I left my Supporting ssp
comment.

You never fail to impress me with your answer to questions which have floored me.