These are the endpoints for the GeoRelief API
POST
/servicesPUT
/services/:idGET
/services/:loc_idGET
/services/cluster/:loc_id/:clusterGET
/services/:service_idGET
/services/cluster/:cluster
POST
/loginPOST
/usersPOST
/passwordPOST
/users/approveGET
/logoutGET
/users/:idGET
/users/institution/:institutionGET
/users/confirm/:key
Name | Type | Description |
---|---|---|
_id | String | Name and unique identifier of the area |
_rev | String | Revision number of the relief area |
date | Date | Date and time relief area was added |
coordinates | String | JSON encoded string containing the Latitude, Longitude, and Zoom level of relief area |
Add an area to the table.
Name | Type | Description |
---|---|---|
name | String | Name of the area |
coordinates | String | JSON encoded string containing the Latitude, Longitude, and Zoom level of the map |
var area = {
name: "New Area";
coordinates: "{\"lat\": 40.6451056, \"lon\": -73.9962453, \"zoom\": 13}"
}
Get all areas.
An array of all relief areas.
[
{
"_id": "Minneapolis",
"_rev": "1-5cb090e13e57b1813811770ab8434a66",
"date": "2013-06-30T20:51:09.487Z",
"coordinates": "{\"lat\":44.97466550157047, \"lon\":-93.26611518859863, \"zoom\":14}"
},
{
"_id": "New York",
"_rev": "2-e3b12e17b5f6f470eca6ecb523ce0dd3",
"date": "2013-06-08T23:42:51.734Z",
"coordinates": "{\"lat\": 40.6451056, \"lon\": -73.9962453, \"zoom\": 13}"
},
{
"_id": "Syria",
"_rev": "21-62585e15c9b1fd71160a592cfa188c06",
"date": "2013-06-08T22:42:51.214Z",
"coordinates": "{\"lat\": 34.72919834205246, \"lon\": 36.71493530273437, \"zoom\": 13}"
}
]
Get a single area.
The specified area
Name | Type | Description |
---|---|---|
area | String | Name of the area |
{
"_id": "Syria",
"_rev": "21-62585e15c9b1fd71160a592cfa188c06",
"date": "2013-06-08T22:42:51.214Z",
"coordinates": "{\"lat\": 34.72919834205246, \"lon\": 36.71493530273437, \"zoom\": 13}"
}
Delete an area.
Name | Type | Description |
---|---|---|
name | String | Name of the area |
rev | String | Revision of the document |
var area = {
name: "Delete This Area";
rev: "1-5cb090e13e57b1813811770ab8434a66"
}
Send message to GeoRelief administrator
Name | Type | Description |
---|---|---|
name | String | Name of the sender |
String | Email of the sender | |
regarding | String | What the message is about |
message | String | Body of the message |
var formData = {
name: "Real Name",
email: "[email protected]",
regarding: "Bug Report",
message: "The contact form doesn't work!"
}
Name | Type | Description |
---|---|---|
_id | String | Institution's unique identifier |
_rev | String | Document revision |
name | String | Name of the institution |
url | String | URL of the institution |
description | String | Description of the institution |
approvedEmails | Array <String> | Array of emails approved to register under the institution |
Add an institution to the table.
Name | Type | Description |
---|---|---|
name | String | Name of the institution |
url | String | URL of the institution |
description | String | Description of the institution |
var institution = {
name: "Institution Name",
url: "http://example.com/",
description: "Short description of my brand new institution!"
}
Get all institutions.
An array of all institutions.
[
{
"_id": "4b61f34780a83a95e503ad835b00109f",
"_rev": "112-37ef7d5e60f7cd84321ee3fb3a9401d4",
"name": "Action Against Hunger (AAH)",
"url": "http://www.aah-usa.org/",
"description": "Develops and runs emergency programs in nutrition, health, water and food security for countries in need. Also provides disaster preparedness programs with the goal of anticipating and preventing humanitarian crises.",
"approvedEmails": [
"[email protected]"
]
},
{
"_id": "4b61f34780a83a95e503ad835b001d69",
"_rev": "2-0854e647df3f096b67e62bfc7f6892c2",
"name": "CARE",
"url": "http://www.careusa.org/",
"description": "CARE is one of the world's largest private international humanitarian organizations, committed to helping families in poor communities improve their lives and achieve lasting victories over poverty. Founded in 1945 to provide relief to survivors of World War II, CARE quickly became a trusted vehicle for the compassion and generosity of millions."
}
]
Get a single institution
Name | Type | Description |
---|---|---|
id | String | Institution's unique identifier |
{
"_id": "4b61f34780a83a95e503ad835b00109f",
"_rev": "112-37ef7d5e60f7cd84321ee3fb3a9401d4",
"name": "Action Against Hunger (AAH)",
"url": "http://www.aah-usa.org/",
"description": "Develops and runs emergency programs in nutrition, health, water and food security for countries in need. Also provides disaster preparedness programs with the goal of anticipating and preventing humanitarian crises.",
"approvedEmails": [
"[email protected]",
]
}
Log the user in.
username
password
{
"_id": String "User ID",
"_rev": String "Revision",
"name": String "Username",
"realname": String "Real Name",
"institution": String "Institution ID",
"email": String "User Email",
"type": String "User Type",
"roles": Array "User Roles",
"level": String "User Level",
"phone": Int "User Phone Number",
"cluster": String "User Cluster",
"institutionName": String "Institution Name",
"institutionUrl": String "Institution URL"
}