A RESTful service built upon an open source list of hospital data.
To run this project, you will need to add the following environment variables
CONNECT_URI
: Connect URI to connect to MongoDB
DB_NAME
: Database name
JWT_SECRET
: JWT secret for jwt creation/validation
- Implement Middleware for Authorization
- Clean up Response error messages
- Write code
GET /api/auth/users
Header | Type | Description |
---|---|---|
key |
string |
Required. A generated apikey |
authorization |
string |
Required. A admin user's JWT |
POST /api/auth/register
Parameter | Type | Description |
---|---|---|
email |
string |
Required. Email to be created |
password |
string |
Required. Password to allow logging in |
Header | Type | Description |
---|---|---|
key |
string |
Required. A generated apikey |
POST /api/auth/login
Parameter | Type | Description |
---|---|---|
email |
string |
Required. Email for existing user |
password |
string |
Required. Password to allow logging in |
Header | Type | Description |
---|---|---|
key |
string |
Required. A generated apikey |
PUT /api/auth/updaterole
Parameter | Type | Description |
---|---|---|
email |
string |
Required. Email for the user that is being changed |
role |
string |
Required. The new role |
Header | Type | Description |
---|---|---|
key |
string |
Required. A generated apikey |
authorization |
string |
Required. A admin user's JWT |
GET /api/apikeys
Parameter | Type | Description |
---|---|---|
name |
string |
Search for key by name |
apikey |
string |
Search for key by key |
Header | Type | Description |
---|---|---|
authorization |
string |
Required. A admin user's JWT |
POST /api/apikeys
Parameter | Type | Description |
---|---|---|
name |
string |
Required. Unique name for key |
DELETE /api/apikeys
Parameter | Type | Description |
---|---|---|
name |
string |
Delete key by name |
apikey |
string |
Delete key by key |
Header | Type | Description |
---|---|---|
authorization |
string |
Required. A admin user's JWT |
GET /api/hospitals
Parameter | Type | Description |
---|---|---|
providerId |
string |
Search for hospital by providerId |
name |
string |
Search for hospital by name |
city |
string |
Search for hospital by city |
state |
string |
Search for hospital by state |
zipCode |
string |
Search for hospital by zip code |
county |
string |
Search for hospital by county |
Header | Type | Description |
---|---|---|
key |
string |
Required. A generated apikey |
POST /api/hospitals
Header | Type | Description |
---|---|---|
key |
string |
Required. A generated apikey |
authorization |
string |
Required. A admin user's JWT |
{
"providerId": "String",
"lat": 0.00,
"long": 0.00,
"name": "String",
"address": "String",
"city": "String",
"state": "String",
"zipCode": "String",
"county": "String",
"phoneNumber": "String",
"hospitalType": "String",
"ownership": "String",
"emergencyServices": "String"
}
PUT /api/hospitals
Parameter | Type | Description |
---|---|---|
providerId |
string |
Required. ProviderId of hospital to update |
Header | Type | Description |
---|---|---|
key |
string |
Required. A generated apikey |
authorization |
string |
Required. A admin user's JWT |
{
"providerId": "String",
"name": "String",
"city": "String",
"state": "String",
"zipCode": "String",
"county": "String",
"phoneNumber": "String",
}
DELETE /api/hospitals
Parameter | Type | Description |
---|---|---|
providerId |
string |
Delete hospital by providerId |
name |
string |
Delete hospital by name |
city |
string |
Delete hospital by city |
state |
string |
Delete hospital by state |
zipCode |
string |
Delete hospital by zip code |
county |
string |
Delete hospital by county |
Header | Type | Description |
---|---|---|
key |
string |
Required. A generated apikey |
authorization |
string |
Required. A admin user's JWT |