maproulette / maproulette/maproulette-backend

Feedback on /task POST

Open
#1,165 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Scala
Stars
53
Forks
39
Avg merge
1d 17h
Merged PRs (30d)
12

Description

A few things that could be improved:

  • It is not immediately clear that the name key is required in the JSON payload, and that it needs to be unique for a new task to be created
  • If you submit the same /task POST twice (with the same name the response is the same, and it's then up to the user to figure out that this is actually an existing task based on the id in the response:
> curl -X POST https://staging.maproulette.org/api/v2/task \
  -H "Content-Type: application/json" \
  -H "apiKey: XXXXXX \
  -d '{"name":"12345","parent":40367,"geometries":"{\"type\":\"FeatureCollection\",\"features\":[{\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[1,1]}}]}","instruction":"Test task"}'

{"id":171072323,"name":"12345","created":"2025-01-29T16:31:30.849Z","modified":"2025-01-29T16:31:30.849Z","parent":40367,"instruction":"Test task","geometries":{"type":"FeatureCollection","features":[{"type":"Feature","geometry":{"type":"Point","coordinates":[1,1]}}]},"review":{},"priority":0,"errorTags":"","tags":[]}%

~ ................................................................................................................................................... at 09:31:30 AM
> curl -X POST https://staging.maproulette.org/api/v2/task \
  -H "Content-Type: application/json" \
  -H "apiKey: XXXXXX \
  -d '{"name":"12345","parent":40367,"geometries":"{\"type\":\"FeatureCollection\",\"features\":[{\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[1,1]}}]}","instruction":"Test task"}'

{"id":171072323,"name":"12345","created":"2025-01-29T16:31:33.994Z","modified":"2025-01-29T16:31:33.994Z","parent":40367,"instruction":"Test task","geometries":{"type":"FeatureCollection","features":[{"type":"Feature","geometry":{"type":"Point","coordinates":[1,1]}}]},"review":{},"priority":0,"errorTags":"","tags":[]}%

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the POST /task API entry point and reproduce the two curl requests shown in the issue. Check how the endpoint communicates that name is required and unique, and how repeated submissions are represented. Done means the request requirements and duplicate-task outcome are clear to API users.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
api, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.