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

Backend TM3 API - Documentation and Feedback #102

Closed
bgirardot-np opened this issue Mar 24, 2017 · 17 comments
Closed

Backend TM3 API - Documentation and Feedback #102

bgirardot-np opened this issue Mar 24, 2017 · 17 comments

Comments

@bgirardot-np
Copy link
Contributor

The documentation for the TM3 backend API is available here:

http://tasking-manager-staging.eu-west-1.elasticbeanstalk.com/api-docs

Please add any feedback or needs on this issue thread.

@bgirardot
Copy link
Contributor

From @danbjoseph:

Are there plans to have api functionality for getting the status of all the squares for a task and who completed/validated squares etc?

@danbjoseph
Copy link

stuff like list of projects, state of tasks, etc. like from TM2

@bgirardot
Copy link
Contributor

bgirardot commented Mar 24, 2017

More from Dan: we use the current TM api to get info on all the missing maps tasks https://github.com/AmericanRedCross/osm-data-parse/tree/master/tasking-mgr-projects

@bgirardot
Copy link
Contributor

The existing TM2 API is here: https://github.com/hotosm/osm-tasking-manager2/wiki/API

@bgirardot
Copy link
Contributor

From Tyler: For example list all projects by status with associated metrics, list all users with associated metrics. Right now if I want something basic like how many projects did we work on this year it requires sql I believe.

@smit1678
Copy link
Contributor

I'm assuming that some of this will be integrated once the Contribute page is further developed. But listing out a couple things that would be useful for integrations with other applications:

  • List of all projects
  • List of all projects with a certain tag (portfolio)
  • List of active tags or portfolios
  • Project complete stats
  • Per user stats of projects, completed squares, and timestamps: User stats json osm-tasking-manager2#758

Other questions

Do we want HTML in the return? I'm assuming would be nice to not have to strip HTML if you want to pull a project description or title into another application.

@bgirardot
Copy link
Contributor

Yes, no html, json objects is my understanding.

@hunt3ri
Copy link
Contributor

hunt3ri commented Mar 28, 2017

Yes can confirm API speaks only JSON :)

@danbjoseph
Copy link

the same data used to build the Activity and Stats tabs in the current tasking manager, if that data could be publicly accessible through the API, that'd be great.

screen shot 2017-03-28 at 10 57 49 am

screen shot 2017-03-28 at 10 57 55 am

@hunt3ri
Copy link
Contributor

hunt3ri commented Mar 28, 2017

One thing to think about as I've mentioned to @bgirardot is API authentication.

Presumably these endpoints should require a token, and if so we'd need some sort of auth scheme. Most simply that would be storing a timebased token in the DB. However, we would need a CRUD page for creating tokens for trusted consumers.

@danbjoseph
Copy link

What about just imposing traffic limits for users? A couple of endpoints on the current TM are open? (I know almost nothing about this, so please ignore if I'm making no sense.)

@cgiovando
Copy link

Can we can include time/date metadata for each project exposed via API? Would be useful to list and retrieve all projects created in a specific data range or per year.

@mikelmaron
Copy link

Why are we concerned about tokens for read access on general stats? Is there really a realistic possibility of abuse?

I do see value in tokens for write access -- could be pretty interesting to think about what's possible for API access to create/modify projects, and change state on task squares, etc.

@hunt3ri
Copy link
Contributor

hunt3ri commented Mar 30, 2017

@mikelmaron I agree if API is read-only - authentication is less of a concern. If everyone is happy for the data to be open to the world. (Data is worth $$$ these days :)

One thing I'd recommend thinking about if the API is open is the potential impact on DB perf. Stats usually necessitate reasonably complex queries involving full table scans which would likely hammer the DB if you had a lot of callers scraping stats out of the API.

So a rate-limiting / caching approach should be agreed.

@ViolaineDo
Copy link

One thing would be cool for facilitating interaction with github : to move the protocol to https. It would also secure the process...

@hunt3ri
Copy link
Contributor

hunt3ri commented Apr 6, 2017

TM3 will be HTTPS compliant from launch :)

@d3netxer
Copy link

It was discussed to break up this issue into separate issues for the API after our meeting last week. I'll start doing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants