Skip to content
This repository has been archived by the owner on Oct 14, 2024. It is now read-only.
/ api Public archive

The write API for the Public Domain OSM. Contains OAuth and custom read/write features not included in cgimap.

License

Notifications You must be signed in to change notification settings

publicdomainmap/api

Repository files navigation

🗺️🌐 PublicDomainMap API

This API provides access to the PublicDomainMap database by providing its own Authentication wrapper over OpenStreetMap's CGIMap. The API also provides two endpoints that are needed, but not found in CGIMap. This supports a subset of the endpoints from the OpenStreetMap 0.6 API.

🔐 Authentication

The PublicDomainMap API uses oauth version 1.0 from OpenStreetMap.org for authentication. For all other endpoints, PublicDomainMap uses OpenStreetMap's CGIMap this is controlled by the express application.

🚀 Authenticated Endpoints

Most endpoints are forward to CGIMap, which does most of the work, this just adds the auth endpoints and user details and capabilities, which CGIMap does not include.

🛕 Authenticated Endpoints

The PublicdomainMap API is only used for authenication

Path Type Description
/user/details.:format? get Query the database for user details and send a response with user details or error

🛣️ Other Endpoints

Basic unauthenticated endpoints are included for completeness, but are not accessible in the production version.

Path Type Description
/capabilities.:format? get This API call is meant to provide information about the capabilities and limitations of the current API. (Note this supports JSON, where the OSM API's version does not)

🧪 Testing

Tests are included, currently using jest. Just run npm test

📝 Improvements

I would like to improve this project in a number of ways:

  • Migrate tests to Jest
  • Migrate Code from MJS to TS
  • OAUTH2 Support
  • Fix issues with JOSM, which uses more of the API than iD
  • Set up automated testing
  • Automatic deployment directly from Github
  • Many more ideas in the issues

🏗️ Built With

  • Node.js - The runtime environment for the server
  • Express.js - The web framework used to build the API
  • PostgreSQL - The database used to store the data

About

The write API for the Public Domain OSM. Contains OAuth and custom read/write features not included in cgimap.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages