API server for Stolperstein data.
Description
Searches database for stolperstein data. Multiple search parameters are AND'ed together. Keyword searches are case insensitive and find items that start with the search term.
Input
Parameter | Description | Default |
---|---|---|
offset | starts returning stolpersteine at the given index | 0 |
limit | limits the number of items returned in a query | 10 |
q | searches all stolpersteine for one or more keywords | |
street | searches street names | |
city | searches city names, e.g. "Berlin" | |
state | searches state names, e.g. "Brandenburg" |
Output
Attribute | Example | Type | Required |
---|---|---|---|
type | "stolperstein" oder "stolperschwelle" | string | yes |
person.firstName | "Herta" | string | |
person.lastName | "Abraham" | string | yes |
person.biographyUrl | "http://www.stolpersteine-berlin.de/de/biografie/3" | string | |
location.street | "Wallstraße 84" | string | yes |
location.zipCode | "10179" | string | |
location.city | "Berlin" | string | yes |
location.sublocality1 | "Mitte" | string | |
location.sublocality2 | "Hansaviertel" | string | |
location.state | "Berlin" | string | yes |
location.coordinates.longitude | 13.40811 | number | yes |
location.coordinates.latitude | 52.51201 | number | yes |
description | "Verlegt am 14.1.1999" | string | |
source.url | "http://www.stolpersteine-berlin.de" | string | yes |
source.name | "Koordinierungsstelle Stolpersteine Berlin" | string | yes |
Examples
Retrieve the first 100 stolpersteine in the database:
curl "<base URL>/stolpersteine?offset=0&limit=100"
Retrieve the next 100 stolpersteine:
curl "<base URL>/stolpersteine?offset=100&limit=100"
Find all stolpersteine in streets starting with the word "calvin" (e.g. Calvinstraße):
curl "<base URL>/stolpersteine?street=calvin&limit=0"
Find a maximum of 10 stolpersteine that include the terms "herta" and "mitte" (e.g. Herta Jalowitz in Berlin-Mitte):
curl "<base URL>/stolpersteine?q=herta+mitte"
Currently, the production system uses MongoDB 2.4.5 and Node.js 0.10.22.
- Download MongoDB
- Unpack and copy to any directory
- Add the
bin
directory to/etc/paths
- Start new terminal and run
mongod --dbpath ~/Downloads/
MongoDB can be used with mongo
client.
- Download Node.js and install package
- Install nodemon to restart Node.js when files have changed with
sudo npm install -g nodemon
- Start with
nodemon server.js
API answers at http://127.0.0.1:3000/v1/stolpersteine
- Install mocha with
sudo npm install -g mocha
npm test
- Modify
import/berlin_kss_stolpersteine.js
or any other import script to use localhost - Run
node import/berlin_kss_stolpersteine.js
to import data - Execute curl request printed in terminal to commit import to database
Copyright (C) 2013 Option-U Software
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.