DOB Job Application Filing (API)
This API is from a dataset that contains all job applications submitted through the New York City Borough Offices, through eFiling, or through the HUB, which have a "Latest Action Date" since January 1, 2000.
javascript | ExpressJs |
Mongoose/Mongo DB | Body-Parser |
Heroku | Cors |
-
Contractors ( The contractor who submitted a job)
-
Job (The work that was done by the contractor)
-
Property (The location of where the work was done)
-
Property Owner (The owner of the property)
The following is the instructions in order:
- Fork and clone the repo.
- Use
npm install
- On a separate terminal window run
mongod
- In another terminal window run
mongo
- Run
node db/seed.js
- After running it in console, you will see some messages. Once the messages stop press
Ctrl
+C
- Run
node db/populate.js
- After 40 seconds use
Ctrl
+C
to exit out of the file. - Run
nodemon index.js
to activate the app - In your browser go to localhost.com:8080/
https://whispering-bayou-30290.herokuapp.com/api/
{
"conLicense": String,
"_id": ObjectID,
"borough": String,
"propNum": String,,
"street_name": String,
"propType": String,
"city": String,
"jobDescr": String,
"address": String,
"jobId": Number,
"__v": Number,
}
GET https://whispering-bayou-30290.herokuapp.com/api/property/
GET https://whispering-bayou-30290.herokuapp.com/api/property/borough/<borough>
GET https://whispering-bayou-30290.herokuapp.com/api/property/city/<cityName>
GET https://whispering-bayou-30290.herokuapp.com/api/property/address/<address>
GET https://whispering-bayou-30290.herokuapp.com/api/property/streetnumber/<StreetNumber>
DELETE https://whispering-bayou-30290.herokuapp.com/api/property/delete/<id>
PUT https://whispering-bayou-30290.herokuapp.com/api/property/update/<id>
POST https://whispering-bayou-30290.herokuapp.com/api/property/new
{
"conLicense": String,
"_id": String,
"conFirstName": String,
"conLastName": String,
"jobId": Number,
"__v": Number,
}
GET https://whispering-bayou-30290.herokuapp.com/api/contractor
GET https://whispering-bayou-30290.herokuapp.com/api/contractor/name/<Last Name>
GET https://whispering-bayou-30290.herokuapp.com/api/contractor/id/<id>
DELETE https://whispering-bayou-30290.herokuapp.com/api/contractor/delete/<id>
PUT https://whispering-bayou-30290.herokuapp.com/api/contractor/update/<id>
POST https://whispering-bayou-30290.herokuapp.com/api/contractor/new
{
{
"_id": String,
"owner": {
"_id": String,
"ownType": String,
"ownFirstName": String,
"ownLastName": String,
"ownBusinessName":String,
"jobId": Number,
"__v": Number
},
"contractor": {
"conLicense": String,
"_id": String,
"conFirstName": String,
"conLastName": String,
"jobId": Number,
"__v": Number
},
"property": {
"conLicense": String,
"_id": String,
"borough": String,
"propNum": String,
"street_name": String,
"propType": String,
"city": String,
"jobDescr": String,
"jobId": Number,
"__v": Number
},
"jobId": Number,
"__v": Number
}
}
GET https://whispering-bayou-30290.herokuapp.com/api/job/
GET https://whispering-bayou-30290.herokuapp.com/api/contractor/name/<Last Name>
GET https://whispering-bayou-30290.herokuapp.com/api/job/id/<id>
{
"_id": String,
"ownType": String,
"ownFirstName": String,
"ownLastName": String,
"ownBusinessName": String,
"jobId": Number,
"__v": Number,
}
GET https://whispering-bayou-30290.herokuapp.com/api/owner
GET https://whispering-bayou-30290.herokuapp.com/api/owner/name/<Last Name>
GET https://whispering-bayou-30290.herokuapp.com/api/owner/type/<type>
DELETE https://whispering-bayou-30290.herokuapp.com/api/owner/delete/<id>
PUT https://whispering-bayou-30290.herokuapp.com/api/owner/update/<id>
POST https://whispering-bayou-30290.herokuapp.com/api/owner/new