Search API powered by AWS Lambda and AWS Elasticsearch, Serverless and Express, for data from NYC Space/Time Directory.
- Endpoint:
/datasets/:datasetId/objects/:objectId - Description: fetch single Object with given
:datasetIdand:objectId - Example:
/datasets/addresses/objects/104981-1
- Endpoint:
/search - Description: search Objects by name, date, type or geometry
- Example:
/search?geometry=-73.9913698,40.7254308,-73.9913698,40.7254308&name=broadway&since=1900 - Parameters:
name: Name of Object, or part of namegeometry: coordinates of bounding box Object is contained by or intersects, in formnorth,west,south,easttypes: comma-separated list of types, e.g.st:Building,st:Addresssince: Object must be younger than this yearuntil: Object must be older than this year
Prior to deployment, you must ensure your AWS_PROFILE is set as an environment variable in your Lambda AWS Console Configuration page.
First, install Serverless framework globally:
$ npm install -g serverlessThen, install dependencies:
$ npm install
$ sls offline start$ sls deploy