Skip to content

MapRoulette integration

Wille Marcel edited this page Jun 16, 2020 · 1 revision

OSMCha now can push features to MapRoulette challenges. Each time OSMCha receives a new feature, it will check if the feature suspicion reasons (flags) are associated with a MapRoulette challenge and, if so, register that feature on MapRoulette.

The setup currently can be made only by the API and it's restricted to OSMCha staff users, but we plan to add a web interface soon.

List the current integrations

GET https://osmcha.org/api/v1/challenges/

Create a new integration

Do a POST request to https://osmcha.org/api/v1/challenges/ with the following content

{
  "challenge_id": 0,
  "reasons": [
    0
  ],
  "active": true
}

After the integration is created, all the new features that have one or more suspicion reasons associated with an integration will be pushed to MapRoulette. A list of suspicion reasons ids is available at https://osmcha.org/api/v1/suspicion-reasons/

Modify an integration

Do a PATCH request to https://osmcha.org/api/v1/challenges/:id/, with the new values of the fields that needs to be modified. You can disable an integration by setting the active field to false.

Delete an integration

Do a DELETE request to https://osmcha.org/api/v1/challenges/:id/.


Important notes

  • All the API endpoints are restricted to staff users.
  • Note that the :id value on the url is not MapRoulette challenge id, but the integration id on OSMCha.
  • There are more documentation available on https://osmcha.org/api-docs/
  • Examples of MapRoulette challenges that receive features from OSMCha: 8113 and 13658