Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support user stats for other Tasking Manager instances #48

Open
Hagellach37 opened this issue Nov 22, 2023 · 6 comments
Open

support user stats for other Tasking Manager instances #48

Hagellach37 opened this issue Nov 22, 2023 · 6 comments
Labels
blocked can not be worked on right now enhancement New feature or request good first issue Good for newcomers question Further information is requested

Comments

@Hagellach37
Copy link
Contributor

Hagellach37 commented Nov 22, 2023

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:

  • the current user stats endpoint only considers mapping for the hashtag hotosm-project-*
  • there is no way to specify in the API call which hashtags should be considered for user stats

Potential Solution:

  • adjust the existing user stats endpoint and add the hashtag parameter (as it is done for the other endpoints of ohsomeNow stats API)
  • to not break the existing HOT Tasking Manager instance we could set hotosm-project-* as the default value of this new parameter if no explicit value is provided
  • OSM Peru could use the new endpoint and pass osmpe-project-* to receive the correct stats
  • EUthmappers would use this hashtag EUthmappers-project-*
@Hagellach37 Hagellach37 added enhancement New feature or request good first issue Good for newcomers labels Nov 22, 2023
@mmerdes
Copy link
Collaborator

mmerdes commented Nov 23, 2023

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
Copy link
Contributor Author

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
Copy link

kresp0 commented Dec 6, 2023

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

@ElJocho
Copy link
Contributor

ElJocho commented Dec 7, 2023

@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.

@ElJocho ElJocho added blocked can not be worked on right now question Further information is requested labels Dec 7, 2023
@Hagellach37
Copy link
Contributor Author

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 ElJocho removed the blocked can not be worked on right now label Jan 22, 2024
@ElJocho
Copy link
Contributor

ElJocho commented Jan 29, 2024

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

@ElJocho ElJocho added the blocked can not be worked on right now label Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked can not be worked on right now enhancement New feature or request good first issue Good for newcomers question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants