GIScience / ohsome-now-stats-service

This is the REST service for the ohsomeNow stats.
https://stats.now.ohsome.org/api/
GNU Affero General Public License v3.0
4 stars 1 forks source link

support user stats for other Tasking Manager instances #48

Open Hagellach37 opened 7 months ago

Hagellach37 commented 7 months ago

OSM Perú is hosting their own TM instance and would like to integrate the user stats endpoint of the ohsomeNow stats API. They can't use the existing endpoint as it would not give the correct numbers. For their projects they use the hashtags osmpe-project-*.

Problem:

Potential Solution:

mmerdes commented 7 months ago

An influencing factor for the solution might be if we expect this to happen more often. Will other OSM subcommunities ask for such an integration or do we expect just this new one for the foreseeable future?

Hagellach37 commented 7 months ago

There are at least a dozen active instances of the Tasking Manager out there. The OSM Wiki lists a few of them, but I'm not sure if all of these are actually operational:

https://wiki.openstreetmap.org/wiki/Tasking_Manager

kresp0 commented 7 months ago

We are also affected by this issue. Our hashtag will be EUthmappers-project-*

ElJocho commented 6 months ago

@Hagellach37 do we want an endpoint which has the hashtag parameter, or do we want to connect the token to the hashtag internally, so that the token does not grant unrestricted user queries to whoever holds any token? I think once we start distributing more keys we cannot guarantee them not leaking to unauthorized users.

Hagellach37 commented 6 months ago

I think the expected behavior here is that once you have the token, you will get stats for any user.

For the existing endpoint this means that you need to be able to pass the hashtag filter as a parameter.

We don't want to connect tokens to specific hashtags in our code.

ElJocho commented 5 months ago

940835a now introduced hashtag parameter for topic endpoint -> this will enable different Tasking Manager instances to supply their own hashtag in the future

The authorization for this endpoint will probably be handled based on the origin request url - thus will not concern service code itself.

I will keep this issue open until we can provide a way for users to give us their TM instance urls