Skip to content

Latest commit

 

History

History
105 lines (95 loc) · 2.6 KB

README.md

File metadata and controls

105 lines (95 loc) · 2.6 KB

Trees of Seattle API

This is the repository for the RESTful API created for use with the Trees of Seattle project. The server is built on Node.js/Express, with Knex.js middleware connecting to a PostgreSQL database. The server is currently deployed via Heroku.

API Reference

Base URL

  https://radiant-harbor-65607.herokuapp.com/

Get all trees

  GET v1/trees
MethodRequest BodySample Successful Response
GET n/a [{ id: [number], species_common: [string], species_sci: [string], is_native: [boolean], address: [string], height: [number || null], circ: [number || null], age: [number], author: [string], img_url: [string || null], neighborhood: [string || null], lat: [number], long: [number], }, ...]

Post new tree

  POST v1/trees
MethodRequest BodySample Successful Response
POST { speciesCommon: [string], speciesSci: [string], isNative: [boolean], address: [string], height: [number || null], circ: [number || null], age: [number], author: [string], imageURL: [string || null], neighborhood: [string || null], lat: [number], long: [number], } { id: [number], species_common: [string], species_sci: [string], is_native: [boolean], address: [string], height: [number || null], circ: [number || null], age: [number], author: [string], img_url: [string || null], neighborhood: [string || null], lat: [number], long: [number], }