API - PaulaScharf/TwittStorm GitHub Wiki
Version 1
This is the API documentation for our TwittStorm - dynamic weather data system.
This documentation consists of our three main data parts' endpoints plus the animation and the configuration endpoint:
1. Severe weather warning events from the DWD
2. Precipitation radar data from the DWD
3. Social media data from Twitter
4. Animation of last timesteps
5. Configuration
The Base URL of the API is http://localhost:3000. All other URLs in this document depend on this root URL and need to be added to the end of this base URL.
This endpoint returns severe weather warning data (rain, snowfall, thunderstorm and black ice events) from the server on local authority level in JSON format. If the server has already stored relevant warnings in its database they will be returned. Otherwise new warnings will be requested from the DWD.
Special case: Demo Data
If the given timestamp corresponds to the timestamp of the demodata, the DWD will not be requested, but instead the local demo warnings will be requested.
Status: specified / implemented
Request:
GET /api/v1/warnings/{timestamp}
- Parameters
-
timestamp
(number) - a timestamp in Epoch milliseconds
-
Response:
On success:
HTTP 1.1 200 OK
{
"type": "SevereWeatherWarnings",
"events":
[
{
"_id": <id: String>,
"type": "unwetter",
"dwd_id": <dwd_id: String>,
"timestamps": [<timestamp: number>, <timestamp: number>, ...],
"geometry":
[
{
"type": "MultiPolygon",
"coordinates": [[[[<coordinate:number >, <coordinate: number>],[...],[...],...]]]
},
{
"type": "MultiPolygon",
"coordinates": [[[[<coordinate: number>, <coordinate: number>],[...],[...],...]]]
}
],
"properties":
{
"event": <event: String>,
"ec_ii": <ec_ii: String>,
"certainty": <certainty: String>,
"description": <description: String>,
"instruction": <instruction: String>,
"sent": <sent: number>
"onset": <onset: number>,
"effective": <effective: number>,
"expires": <expires: number>
}
}
]
}
On error:
- in case the request attributes contain errors
HTTP 1.1 422
{
err_msg: <error message:string>
}
- in case of a server error
HTTP 1.1 500 Internal Server Error
{
err_msg: <error message:string>
}
- in case of not found
HTTP 1.1 404 Not Found
{
err_msg: "Not Found"
}
Example Request:
GET /api/v1/warnings/1578303930000
Example Response:
HTTP 1.1 200 OK
{
"type": "SevereWeatherWarnings",
"events":
[
{
"_id": "5e1301784599a422908c4a3d",
"type": "unwetter",
"dwd_id": "2.49.0.1.276.0.DWD.PVW.1578301740000.6dd05c81-69f4-4864-a7da-c7c2357dd1d8.DEU",
"timestamps": [1578303864352],
"geometry":
[
{
"type": "MultiPolygon",
"coordinates": [[[[9.9091, 47.5387],[9.879, 47.5466],[9.8689, 47.5578],...]]]
},
{
"type": "MultiPolygon",
"coordinates": [[[[9.985, 47.7521],[9.9683, 47.7442],[9.9382, 47.752],...]]]
},
...
],
"properties":
{
"event": "LEICHTER SCHNEEFALL",
"ec_ii": "70",
"certainty": "Likely",
"description": "Es tritt im Warnzeitraum oberhalb 800 m leichter Schneefall mit Mengen zwischen 5 cm und 10 cm auf. In Staulagen werden Mengen bis 15 cm erreicht. Die Schneefallgrenze fällt auf 800 Meter.",
"instruction": null,
"sent": 1578301740000,
"onset": 1578301740000,
"effective": 1578301740000,
"expires": 1578308400000
}
},
{
"_id": "5e1301784599a422908c4a3e",
"type": "unwetter",
"dwd_id": "2.49.0.1.276.0.DWD.PVW.1578258960000.cb58f881-c10e-4eae-a2b5-9634c367813c.DEU",
"timestamps": [1578303864352],
"geometry":
[
{
"type": "MultiPolygon",
"coordinates": [[[[10.0138, 53.8399],[9.9919, 53.8268],[9.9844, 53.8267],...]]]
},
...
],
"properties":
{
"event": "GLÄTTE",
"ec_ii": "84",
"certainty": "Likely",
"description": "Aufgrund von gefrierendem Regen oder Sprühregen muss örtlich mit Glatteis gerechnet werden.",
"instruction": "ACHTUNG! Hinweis auf mögliche Gefahren: Es treten starke Behinderungen im Straßen- und Schienenverkehr auf. Vermeiden Sie Autofahrten!",
"sent": 1578258960000,
"onset": 1578250800000,
"effective": 1578258960000,
"expires": 1578304800000
}
},
]
}
This endpoint returns precipitation radar data from the server in JSON format containing GeoJSON collection of classified polygons. The data is classified using the precipitation definition from the DWD: https://www.dwd.de/DE/service/lexikon/Functions/glossar.html?lv2=101812&lv3=101906.
If the database of the server already contains radar data it will be returned. Otherwise new data will be requested from the DWD.
Special case: Demo Data
If the given timestamp corresponds to the timestamp of the demodata, the DWD will not be requested, but instead the local demo radar data will be requested.
Status: specified / implemented
Request:
GET /api/v1/radar/{radarProduct}/{timestamp}
- Parameters
-
radarProduct
(String) - short radar product code;
see documentation: https://www.dwd.de/DE/leistungen/radolan/produktuebersicht/radolan_produktuebersicht_pdf.pdf?__blob=publicationFile&v=7- 'ry' sum of / every 5 minutes
- 'rw' sum of / every 60 minutes
- 'sf' sum of / every 24 hours
-
timestamp
(number) - timestamp in Epoch milliseconds
-
Response:
On success:
HTTP 1.1 200 OK
{
"type": "rainRadar",
"radarProduct": <radarProduct: String>,
"date": <date: String>,
"timestamp": <timestamp: number>,
"timestampOfRequest": <timestampOfRequest: number>,
"timestampOfAvailability": <timestampOfAvailability: number>,
"geometry":
{
"type": "FeatureCollection",
"features":
[
{
"type": "Feature",
"properties":
{
"class": <class: number>
},
"geometry":
{
"type": "Polygon",
"coordinates": [[[<coordinate: number>, <coordinate: number>],[...],[...]]]
}
},
{
"type": "Feature",
"properties":
{
"class": <class: number>
},
"geometry":
{
"type": "Polygon",
"coordinates": [[[<coordinate: number>, <coordinate: number>],[...],[...]]]
}
},
]
}
}
On error:
- in case the request attributes contain errors
HTTP 1.1 422
{
err_msg: <error message:string>
}
- in case of a server error
HTTP 1.1 500 Internal Server Error
{
err_msg: <error message:string>
}
- in case that the data product is not found
HTTP 1.1 404 Not Found
{
err_msg: <error message:string>
}
Example Request:
GET /api/v1/radar/sf/1578311400000
Example Response:
HTTP 1.1 200 OK
{
"type": "rainRadar",
"radarProduct": "SF",
"date": "2020-01-22 20:50:00",
"timestamp": 1579722600000,
"timestampOfRequest": 1579729710315,
"timestampOfAvailability": 1579728180000,
"geometry":
{
"type": "FeatureCollection",
"features":
[
{
"type": "Feature",
"properties":
{
"class": 1
},
"geometry":
{
"type": "Polygon",
"coordinates": [[[12.2987, 54.1692],[12.3259, 54.1692],[12.3259, 54.135],[12.2987, 54.135],[12.2987, 54.1692]]]
}
},
{
"type": "Feature",
"properties":
{
"class": 1
},
"geometry":
{
"type": "Polygon",
"coordinates": [[[9.8779, 54.1692],[9.9323, 54.1692],[9.9323, 54.1606]]]
}
}
]
}
}
This endpoint searches for tweets lying in specified polygon at a given time for a certain type of weather (e.g. ‘snowfall’ or ‘heavy rain’).
Note: Even though this is a POST method, it is getting tweets as a response.
Status: specified / implemented
Request:
POST /api/v1/twitter/tweets
{
"twitterSearchQuery":
{
"geometry":
{
"type": "MultiPolygon",
"coordinates": [[[[<coordinate: number>, <coordinate: number>],[...],[...],...]]]
},
"searchWords": [<searchWord: String>, <searchWord: String>,...]
},
"dwd_id": <dwd_id: String>,
"currentTimestamp": <timestamp: number>
}
body parameters:
Name | type | description | required |
---|---|---|---|
twitterSearchQuery | Object | Only this attribute is used for the request to twitter. It contains geometry and searchWords, described below. | yes |
geometry | Object | This Object contains the coordinates part of a GeoJSON-Polygon. Only tweets in the given polygon will be returned. | yes |
searchWords | Array of Strings | Each String contains a searchword or -phrase for the request to twitter. The request will only return tweets that contain at least one of the given searchstrings. | yes |
dwd_id | String | All found tweets will be referenced to the weather event they belong to, with this ID. | yes |
currentTimestamp | number | The time in Epoch milliseconds for the request. If there are already tweets in the database, within the refresh rate (default: 5 minutes) of the given timestamp, they will be returned. Otherwise new tweets will be requested from twitter. | yes |
Response:
On success:
If there are no matching tweets available, the response will only consist of the attributes type
, _id
, dwd_id
and requestTime
. The attributes timestamp
, id
, idstr
, statusmessage
, author
and location_actual
are just included in the response (in addition) in case existing tweets are returned.
HTTP 1.1 200 OK
{
"statuses":
[
{
"type": "tweet",
"_id": <_id: String>,
"dwd_id": <dwd_id: String>,
"requestTime": <requestTime: number>,
"timestamp": <timestamp: number>,
"id": <id: number>,
"idstr": <idstr: String>,
"statusmessage": <statusmessage: String>,
"author":
{
"id": <id: number>
"name": <name: String>
"location_home": <location_home: String>
},
"location_actual":
{
"type": "Point",
"coordinates": [<coordinate: number>, <coordinate: number>]
}
},
...
]
}
On error:
- in case the request attributes contain errors
HTTP 1.1 422
{
err_msg: <error message:string>
}
- in case of a server error
HTTP 1.1 500 Internal Server Error
{
err_msg: <error message:string>
}
- in case of not found
HTTP 1.1 404 Not Found
{
err_msg: "Not Found"
}
Example Request:
POST /api/v1/twitter/tweets
{
"twitterSearchQuery":
{
"geometry":
{
"type": "MultiPolygon",
"coordinates": [[[[8.2374, 51.1039],[8.2264, 51.1218],[8.1992, 51.12],...]]]
},
"searchWords": ["Blitzeis", "Glätte", "Glatteis", "glatt", "spiegelglatt", "Eisglätte", "gefrierender Regen", "icy", "black ice", "glaze ice", "freezing rain", "verglas"]
},
"dwd_id": "2.49.0.1.276.0.DWD.PVW.1580069820000.2190ce1f-4644-4686-a38a-3b80fc27ec28.DEU",
"currentTimestamp": 1580078136233
}
Example Response:
HTTP 1.1 200 OK
{
"statuses":
[
{
"type": "Tweet",
"_id": "5e2dfcb44895440012d66e55",
"dwd_id": "2.49.0.1.276.0.DWD.PVW.1580069820000.2190ce1f-4644-4686-a38a-3b80fc27ec28.DEU",
"requestTime": 1580072116522,
},
{
"type": "Tweet",
"_id": "5e2dfef16598f200127479b2",
"dwd_id": "2.49.0.1.276.0.DWD.PVW.1580069820000.2190ce1f-4644-4686-a38a-3b80fc27ec28.DEU",
"requestTime": 1580072690300,
},
{
"type": "Tweet",
"_id": "5e2e01206598f200127479cc",
"dwd_id": "2.49.0.1.276.0.DWD.PVW.1580069820000.2190ce1f-4644-4686-a38a-3b80fc27ec28.DEU",
"requestTime": 1580073249462,
},
{
"type": "Tweet",
"_id": "5e2e0d67c946d10012389c33",
"dwd_id": "2.49.0.1.276.0.DWD.PVW.1580069820000.2190ce1f-4644-4686-a38a-3b80fc27ec28.DEU",
"requestTime": 1580076392091,
},
{
"type": "Tweet",
"_id": "5e2e1350dca89700126bafc9",
"dwd_id": "2.49.0.1.276.0.DWD.PVW.1580069820000.2190ce1f-4644-4686-a38a-3b80fc27ec28.DEU",
"requestTime": 1580077903675,
}
]
}
This endpoint deletes an individual tweet.
Status: specified / implemented
Request:
DELETE /api/v1/twitter/tweet
{
"idstr": <idstr: String>
}
body parameters:
Name | type | description | required |
---|---|---|---|
idstr | String | the ID of a tweet (called status), as given by twitter | yes |
Response:
On success:
HTTP 1.1 200 OK
On error:
- in case the request attributes contain errors
HTTP 1.1 422
{
err_msg: <error message:string>
}
- in case of a server error
HTTP 1.1 500 Internal Server Error
{
err_msg: <error message:string>
}
- in case of not found
HTTP 1.1 404 Not Found
{
err_msg: "Not Found"
}
Example Request:
DELETE /api/v1/twitter/tweet
{
"idstr": "1221553456500150272"
}
Example Response:
HTTP 1.1 200 OK
This endpoint returns past weather information, either
past severe weather warnings (see 4.1)
or
past precipitation radar data (see 4.2).
In addition, in both cases corresponding tweets are returned, too.
This endpoint returns the data that the server has stored in its database for up to 10 old timestamps.
Status: specified / implemented
Request:
GET /api/v1/previousWeather/warnings/{currentTimestamp}
- Parameters
-
currentTimestamp
(number) - current time in Epoch milliseconds
-
Response:
On success:
HTTP 1.1 200 OK
{
"type": "SevereWeatherWarnings",
<timestamp 1: Array>:
[
{
"_id": <_id: String>,
"type": "unwetter"
"dwd_id": <dwd_id: String>,
"timestamps": [<timestamp: number>, <timestamp: number>, ...],
"geometry":
[
{
"type": "MultiPolygon",
"coordinates": [[[[<coordinate: number>, <coordinate: number>],[...],[...],...]]]
},
{
"type": "MultiPolygon",
"coordinates": [[[[<coordinate: number>, <coordinate: number>],[...],[...],...]]]
},
...
],
"properties":
{
"event": <event: String>,
"ec_ii": <ec_ii: String>,
"certainty": <certainty: String>,
"description": <description: String>,
"instruction": <instruction: String>,
"sent": <sent: number>,
"onset": <onset: number>,
"effective": <effective: number>,
"expires": <expires: number>,
"class": <class: number>
}
},
...
{
"type": "tweet",
"_id": <_id: String>,
"dwd_id": <dwd_id: String>,
"requestTime": <requestTime: number>,
"class": <class: number>,
"timestamp": <timestamp: number>,
"id": <id: number>,
"idstr": <idstr: String>,
"statusmessage": <statusmessage: String>,
"author":
{
"id": <id: number>
"name": <name: String>
"location_home": <location_home: String>
},
"location_actual":
{
"type": "Point",
"coordinates": [<coordinate: number>, <coordinate: number>]
}
},
...
],
<timestamp 2: Array>:
[
{
"_id": <_id: String>,
"type": "unwetter"
"dwd_id": <dwd_id: String>,
"timestamps": [<timestamp: number>, <timestamp: number>, ...],
"geometry":
[
{
"type": "MultiPolygon",
"coordinates": [[[[<coordinate: number>, <coordinate: number>],[...],[...],...]]]
},
{
"type": "MultiPolygon",
"coordinates": [[[[<coordinate: number>, <coordinate: number>],[...],[...],...]]]
},
...
],
"properties":
{
"event": <event: String>,
"ec_ii": <ec_ii: String>,
"certainty": <certainty: String>,
"description": <description: String>,
"instruction": <instruction: String>,
"sent": <sent: number>,
"onset": <onset: number>,
"effective": <effective: number>,
"expires": <expires: number>,
"class": <class: number>
}
},
...
{
"type": "tweet",
"_id": <_id: String>,
"dwd_id": <dwd_id: String>,
"requestTime": <requestTime: number>,
"class": <class: number>,
"timestamp": <timestamp: number>,
"id": <id: number>,
"idstr": <idstr: String>,
"statusmessage": <statusmessage: String>,
"author":
{
"id": <id: number>
"name": <name: String>
"location_home": <location_home: String>
},
"location_actual":
{
"type": "Point",
"coordinates": [<coordinate: number>, <coordinate: number>]
}
},
...
],
...
}
On error:
- in case the request attributes contain errors
HTTP 1.1 422
{
err_msg: <error message: String>
}
- in case of a server error
HTTP 1.1 500 Internal Server Error
{
err_msg: <error message: String>
}
- in case of not found
HTTP 1.1 404 Not Found
{
err_msg: "Not Found"
}
Example Request:
GET /api/v1/previousWeather/warnings/1580066004235
Example Response:
HTTP 1.1 200 OK
{
"type":"severeWeatherWarnings",
"1580066394232":
[
{
"_id": "5e2de65819514c001222447a",
"type": "unwetter",
"dwd_id": "2.49.0.1.276.0.DWD.PVW.1580062380000.5cc42ef7-6a14-43a7-93b5-828d6b4a9ef5.DEU",
"timestamps": [1580066394232],
"geometry":
[
{
"type": "MultiPolygon",
"coordinates": [[[[12.9637, 49.104],[12.9514, 49.1247],[12.9235, 49.134],...]]]
}
],
"properties":
{
"event": "LEICHTER SCHNEEFALL",
"ec_ii": "70",
"certainty": "Likely",
"description": "Es tritt im Warnzeitraum oberhalb 600 m leichter Schneefall mit Mengen zwischen 2 cm und 6 cm auf. Die Schneefallgrenze fällt auf 400 Meter. Verbreitet wird es glatt.",
"instruction": null,
"sent": 1580062380000,
"onset": 1580062380000,
"effective": 1580062380000,
"expires": 1580108400000,
"class": "1580066394232"
}
},
{
"type": "tweet",
"_id": "5e30661010c03c00128eddd3",
"dwd_id": "2.49.0.1.276.0.DWD.PVW.1580062380000.5cc42ef7-6a14-43a7-93b5-828d6b4a9ef5.DEU",
"requestTime": 1580065969000,
"class": "1580066394232",
"timestamp": 1580063661000,
"id": 1222136416819392500,
"idstr": "1222136416819392512",
"statusmessage": "Current #weather in #Walkes, snow with a #temperature of 4 degrees celsius. Keep track of the weather in Walkes -> https://t.co/lwivUdIJx9",
"author":
{
"id": 1124226109464293400
"name": "Bowvie Weather"
"location_home": ""
},
"location_actual":
{
"type": "Point",
"coordinates": [9.95, 50.63]
}
}
],
"1580066694689":
[
{
"_id": "5e2de65819514c001222447a",
"type": "unwetter",
"dwd_id": "2.49.0.1.276.0.DWD.PVW.1580062380000.ae18eb92-70f6-42df-8bc6-dfdba2034f85.DEU",
"timestamps": [1580066694689],
"geometry":
[
{
"type": "MultiPolygon",
"coordinates": [[[[12.9637, 49.104],[12.9514, 49.1247],[12.9235, 49.134],...]]]
}
],
"properties":
{
"event": "GLÄTTE",
"ec_ii": "84",
"certainty": "Likely",
"description": "Es muss mit Glätte durch verbreitet überfrierende Nässe gerechnet werden.",
"instruction": null,
"sent": 1580062380000,
"onset": 1580062380000,
"effective": 1580062380000,
"expires": 1580108400000,
"class": "1580066694689"
}
}
]
}
Status: specified / implemented
Request:
GET /api/v1/previousWeather/rainRadar/{currentTimestamp}
- Parameters
-
currentTimestamp
(number) - current time in Epoch milliseconds
-
Response:
On success:
HTTP 1.1 200 OK
{
"type": "previousRainRadar",
"length": <length: number>,
"radProd": <radProd: String>,
<timestamp 1: Array>:
[
{
"_id": <_id: String>,
"type": "rainRadar",
"radarProduct": <radarProduct: String>,
"date": <date: String>,
"timestamp": <timestamp: number>,
"geometry":
{
"type": "FeatureCollection",
"features":
[
{
"type": "Feature",
"properties":
{
"class": <class: number>
},
"geometry":
{
"type": "Polygon",
"coordinates": [[[<coordinate: number>, <coordinate: number>],[...],[...],...]]
}
},
{
"type":"Feature",
"properties":
{
"class": <class: number>
},
"geometry":
{
"type": "Polygon",
"coordinates": [[[<coordinate: number>, <coordinate: number>],[...],[...],...]]
}
}
]
}
},
...
{
"type": "tweet",
"_id": <_id: String>,
"dwd_id": <dwd_id: String>,
"requestTime": <requestTime: number>,
"class": <class: number>,
"timestamp": <timestamp: number>,
"id": <id: number>,
"idstr": <idstr: String>,
"statusmessage": <statusmessage: String>,
"author":
{
"id": <id: number>
"name": <name: String>
"location_home": <location_home: String>
},
"location_actual":
{
"type": "Point",
"coordinates": [<coordinate: number>, <coordinate: number>]
}
},
...
],
<timestamp 2: Array>:
[
{
"_id": <_id: String>,
"type": "rainRadar",
"radarProduct": <radarProduct: String>,
"date": <date: String>,
"timestamp": <timestamp: number>,
"geometry":
{
"type": "FeatureCollection",
"features":
[
{
"type": "Feature",
"properties":
{
"class": <class: number>
},
"geometry":
{
"type": "Polygon",
"coordinates": [[[<coordinate: number>, <coordinate: number>],[...],[...],...]]
}
},
{
"type":"Feature",
"properties":
{
"class": <class: number>
},
"geometry":
{
"type": "Polygon",
"coordinates": [[[<coordinate: number>, <coordinate: number>],[...],[...],...]]
}
}
]
}
},
...
{
"type": "tweet",
"_id": <_id: String>,
"dwd_id": <dwd_id: String>,
"requestTime": <requestTime: number>,
"class": <class: number>,
"timestamp": <timestamp: number>,
"id": <id: number>,
"idstr": <idstr: String>,
"statusmessage": <statusmessage: String>,
"author":
{
"id": <id: number>
"name": <name: String>
"location_home": <location_home: String>
},
"location_actual":
{
"type": "Point",
"coordinates": [<coordinate: number>, <coordinate: number>]
}
},
...
],
...
}
On error:
- in case the request attributes contain errors
HTTP 1.1 422
{
err_msg: <error message: String>
}
- in case of a server error
HTTP 1.1 500 Internal Server Error
{
err_msg: <error message: String>
}
- in case of not found
HTTP 1.1 404 Not Found
{
err_msg: "Not Found"
}
Example Request:
GET /api/v1/previousWeather/rainRadar/1580068059583
Example Response:
HTTP 1.1 200 OK
{
"type": "previousRainRadar",
"length": 2,
"radProd": "RY",
"1580067300000":
[
{
"_id": "5e2deaf819514c001222447e",
"type": "rainRadar",
"radarProduct": "RY",
"date": "2020-01-26 19:35:00",
"timestamp": 1580067300000,
"timestampOfAvailability": 1580071020000,
"timestampOfRequest": 1580067576674,
"geometry":
{
"type": "FeatureCollection",
"features":
[
{
"type": "Feature",
"properties":
{
"class": 1
},
"geometry":
{
"type": "Polygon",
"coordinates": [[[10.8843, 54.9054],[10.8979, 54.9054],[10.8979, 54.8968],...]]
}
},
{
"type":"Feature",
"properties":
{
"class": 2
},
"geometry":
{
"type": "Polygon",
"coordinates": [[[10.8979, 54.9054],[10.9251, 54.9054],[10.9251, 54.8968],...]]
}
}
]
}
}
],
"1578299912201":
[
{
"_id": "5e2dec2519514c0012224480",
"type": "rainRadar",
"radarProduct": "RY",
"date": "2020-01-26 19:40:00",
"timestamp": 1580067600000,
"timestampOfAvailability": 1580071320000,
"timestampOfRequest": 1580067877189,
"geometry":
{
"type": "FeatureCollection",
"features":
[
{
"type": "Feature",
"properties":
{
"class": 1
},
"geometry":
{
"type": "Polygon",
"coordinates": [[[11.0883, 54.8711],[11.1155, 54.8711],[11.1155, 54.854],...]]
}
},
{
"type":"Feature",
"properties":
{
"class": 1
},
"geometry":
{
"type": "Polygon",
"coordinates": [[[11.1155, 54.854],[11.1427, 54.854],[11.1427, 54.8369],...]]
}
}
]
}
}
]
}
This endpoint updates the config.yaml.
Status: specified / implemented
Request:
POST /api/v1/config
{
"map.center": <map.center: Array>,
"map.zoom": <map.zoom: number>,
"max_age_tweets": <max_age_tweets: number>
}
body parameters:
Name | type | description | required |
---|---|---|---|
map.center | Array | Default map location, in format [long, lat]. | no |
map.zoom | number | Default map zoom. | no |
max_age_tweets | number | How far back tweets are being searched from now (in minutes). Maximum and default is one week back. If the value is 'null', the default is used. | no |
Note: If you put in different attributes than the ones specified above, they will be ignored.
Response:
On success:
HTTP 1.1 200 OK
On error:
- in case the request attributes contain errors
HTTP 1.1 422
{
err_msg: <error message: String>
}
- in case of a server error
HTTP 1.1 500 Internal Server Error
{
err_msg: <error message: String>
}
- in case of not found
HTTP 1.1 404 Not Found
{
err_msg: "Not Found"
}
Example Request:
POST /api/v1/config
{
"map.zoom": 6
}
Example Response:
HTTP 1.1 200 OK