Actual FindNUS API for Milestone 2
From this line below, it is the Markdown API documentation that is stored on the working backend repository for developers to reference and use.
API documentation for FindNUS backend services. Handles the retrieval, processing and management of Lost Items found in NUS.
## ServersURL | Description |
---|---|
https://findnus.herokuapp.com | Production cluster that is hosting the backend services for FindNUS |
https://uat-findnus.herokuapp.com | User-Acceptance Testing cluster environment for testing |
Returns a Hello World equivalent message. Shows that the backend connection works.
No headers specified
Name | Type | Description | Accepted values |
---|---|---|---|
Response | string | Any |
message: Hi there, you have reached FindNUS!
Check with backend if the Firebase token is valid.
Firebase ID token of user
Name | Type | In | Description | Accepted values |
---|---|---|---|---|
Authorization (required) | string | header | Firebase ID token of user | Any |
"Authorization: my-firebase-idToken"
No headers specified
No headers specified
Get a demo item for Milestone 1.
Name of the demoset item to be retrieved
Name | Type | In | Description | Accepted values |
---|---|---|---|---|
name (required) | string | query | Name of the demoset item to be retrieved | Any |
No headers specified
Name | Type | Description | Accepted values |
---|---|---|---|
Id (required) | string | The MongoDB ObjectID associated to this Item | Any |
Name (required) | string | Name of lost/found item | Any |
Date (required) | string | Date-time where item is lost/found | Any |
Location (required) | string | Where the item was found | Any |
Category (required) | string | Type of item | Etc , Cards , Notes , Electronics , Bottles |
Contact_method | string | Founder/Lostee Contact Method | nus_security , telegram , whatsapp , wechat , line , phone_number |
Contact_details | string | Contact details of Founder/Lostee | Any |
Item_details | string | Any | |
Image_url | string | Item's accompanying image link | Any |
User_id | string | UserID associated to this item. Only applicable for Lookout Items. | Any |
{
"Id": "98721yrr0u14oure",
"Name": "Water Bottle",
"Date": "2019-08-24T14:15:22Z",
"Location": "E4A DSA Lab",
"Category": "Cards",
"Contact_method": "Telegram",
"Contact_details": "FindNUS",
"Item_details": "Blue, with a sticker and broken handle",
"Image_url": "https://imgur.com/gallery/RaHyECD",
"User_id": "string"
}
No headers specified
Name | Type | Description | Accepted values |
---|---|---|---|
Response | string | Any |
Nothing Found!
Add new Lost item to be put on Lookout on the database.
Firebase ID token of user
Name | Type | In | Description | Accepted values |
---|---|---|---|---|
Authorization (required) | string | header | Firebase ID token of user | Any |
"Authorization: my-firebase-idToken"
Name | Type | Description | Accepted values |
---|---|---|---|
User_id | string | Unique User_id generated by firebase to associate a user to a Lookout item. | Any |
Name (required) | string | Name of new lost/found item | Any |
Date (required) | string | Date-time where item is lost/found | Any |
Location (required) | string | Where the item was found | Any |
Category (required) | string | Type of item | Etc , Cards , Notes , Electronics , Bottles |
Contact_method | string | Founder/Lostee Contact Method | nus_security , telegram , whatsapp , wechat , line , phone_number |
Contact_details | string | Contact details of Founder/Lostee | Any |
Item_details | string | Any | |
Image_base64 | string | Accompanying image of new Lost/Found item, if applicable | Any |
{
"User_id": "string",
"Name": "Water Bottle",
"Date": "2019-08-24T14:15:22Z",
"Location": "E4A DSA Lab",
"Category": "Cards",
"Contact_method": "Telegram",
"Contact_details": "FindNUS",
"Item_details": "Blue, with a sticker and broken handle",
"Image_base64": "string"
}
No headers specified
No headers specified
No headers specified
Update details of an item on the database.
Firebase ID token of user
Name | Type | In | Description | Accepted values |
---|---|---|---|---|
Authorization (required) | string | header | Firebase ID token of user | Any |
"Authorization: my-firebase-idToken"
MongoDB ID of the Item
Name | Type | In | Description | Accepted values |
---|---|---|---|---|
Id (required) | string | query | MongoDB ID of the Item | Any |
"Id=629cc52563533a84f60c4c68"
FindNUS User Id (for lost item lookout requests). Include this to remove from Lost (Lookout) Items collection.
Name | Type | In | Description | Accepted values |
---|---|---|---|---|
User_id (required) | string | query | FindNUS User Id (for lost item lookout requests). Include this to remove from Lost (Lookout) Items collection. | Any |
"User_id=196afas7"
Name | Type | Description | Accepted values |
---|---|---|---|
Id (required) | string | The MongoDB ObjectID associated to this Item | Any |
User_id | string | Unique User_id generated by firebase to associate a user to a Lookout item. | Any |
Name | string | Name of new lost/found item | Any |
Date | string | Date-time where item is lost/found | Any |
Location | string | Where the item was found | Any |
Category | string | Type of item | Etc , Cards , Notes , Electronics , Bottles |
Contact_method | string | Founder/Lostee Contact Method | nus_security , telegram , whatsapp , wechat , line , phone_number |
Contact_details | string | Contact details of Founder/Lostee | Any |
Item_details | string | Any | |
Image_base64 | string | Updated image of Lost/Found item, if applicable | Any |
{
"Id": "98721yrr0u14oure",
"User_id": "string",
"Name": "Water Bottle",
"Date": "2019-08-24T14:15:22Z",
"Location": "E4A DSA Lab",
"Category": "Cards",
"Contact_method": "Telegram",
"Contact_details": "FindNUS",
"Item_details": "Blue, with a sticker and broken handle",
"Image_base64": "string"
}
No headers specified
No headers specified
Get a particular item’s full details
Item Id reference. Case sensitive.
Name | Type | In | Description | Accepted values |
---|---|---|---|---|
Id (required) | string | query | Item Id reference. Case sensitive. | Any |
User_id filter to search for this Id in the LOST collection. Case sensitive.
Name | Type | In | Description | Accepted values |
---|---|---|---|---|
User_id | string | query | User_id filter to search for this Id in the LOST collection. Case sensitive. | Any |
No headers specified
Name | Type | Description | Accepted values |
---|---|---|---|
Id (required) | string | The MongoDB ObjectID associated to this Item | Any |
Name (required) | string | Name of lost/found item | Any |
Date (required) | string | Date-time where item is lost/found | Any |
Location (required) | string | Where the item was found | Any |
Category (required) | string | Type of item | Etc , Cards , Notes , Electronics , Bottles |
Contact_method | string | Founder/Lostee Contact Method | nus_security , telegram , whatsapp , wechat , line , phone_number |
Contact_details | string | Contact details of Founder/Lostee | Any |
Item_details | string | Any | |
Image_url | string | Item's accompanying image link | Any |
User_id | string | UserID associated to this item. Only applicable for Lookout Items. | Any |
{
"Id": "98721yrr0u14oure",
"Name": "Water Bottle",
"Date": "2019-08-24T14:15:22Z",
"Location": "E4A DSA Lab",
"Category": "Cards",
"Contact_method": "Telegram",
"Contact_details": "FindNUS",
"Item_details": "Blue, with a sticker and broken handle",
"Image_url": "https://imgur.com/gallery/RaHyECD",
"User_id": "string"
}
No headers specified
No headers specified
Remove an item listing on the database.
Firebase ID token of user
Name | Type | In | Description | Accepted values |
---|---|---|---|---|
Authorization (required) | string | header | Firebase ID token of user | Any |
"Authorization: my-firebase-idToken"
MongoDB ID of the Item
Name | Type | In | Description | Accepted values |
---|---|---|---|---|
Id (required) | string | query | MongoDB ID of the Item | Any |
"Id=629cc52563533a84f60c4c68"
FindNUS User_Id (for lost item lookout requests). Include this to remove from Lost (Lookout) Items collection. Case sensitive.
Name | Type | In | Description | Accepted values |
---|---|---|---|---|
User_id | string | query | FindNUS User_Id (for lost item lookout requests). Include this to remove from Lost (Lookout) Items collection. Case sensitive. | Any |
"User_id=196afas7"
Name | Type | Description | Accepted values |
---|---|---|---|
Id (required) | string | The MongoDB ObjectID associated to this Item | Any |
{
"Id": "98721yrr0u14oure"
}
No headers specified
No headers specified
Get a list of lost items sorted by date. These items are paginated and filtered by category, if requested. The default returns the latest 20 items, with no category filter.
Number of items to skip (Case sensitive)
Name | Type | In | Description | Accepted values |
---|---|---|---|---|
offset | integer | query | Number of items to skip (Case sensitive) | Any |
Number of items to return (Case sensitive)
Name | Type | In | Description | Accepted values |
---|---|---|---|---|
limit | integer | query | Number of items to return (Case sensitive) | Any |
Types of category to filter by. Chain multiple category values to filter by the For example, category=Cards&category=Etc will include results from both Cards and Etc.
Name | Type | In | Description | Accepted values |
---|---|---|---|---|
category | string | query | Types of category to filter by. Chain multiple category values to filter by the For example, category=Cards&category=Etc will include results from both Cards and Etc. | Any |
No headers specified
Name | Type | Description | Accepted values |
---|---|---|---|
Response | array(object) | Any | |
Response.Id (required) | string | The MongoDB ObjectID associated to this Item | Any |
Response.Name (required) | string | Name of lost/found item | Any |
Response.Date (required) | string | Date-time where item is lost/found | Any |
Response.Location (required) | string | Where the item was found | Any |
Response.Category (required) | string | Type of item | Etc , Cards , Notes , Electronics , Bottles |
Response.Image_url | string | Item's accompanying image link | Any |
[
{
"Id": "98721yrr0u14oure",
"Name": "Water Bottle",
"Date": "2019-08-24T14:15:22Z",
"Location": "E4A DSA Lab",
"Category": "Cards",
"Image_url": "https://imgur.com/gallery/RaHyECD"
}
]
No headers specified
Text-based search for an item.
Text query to search for lost items. Can be any arbitrary string - the ElasticSearch engine will attempt to best-match the query. The query will be performed over the FOUND collection’s Name, Category, Location and Item Detail fields.
Name | Type | In | Description | Accepted values |
---|---|---|---|---|
query | string | query | Text query to search for lost items. Can be any arbitrary string - the ElasticSearch engine will attempt to best-match the query. The query will be performed over the FOUND collection's Name, Category, Location and Item Detail fields. | Any |
No headers specified
Name | Type | Description | Accepted values |
---|---|---|---|
Response | array(object) | Any | |
Response.Id (required) | string | The MongoDB ObjectID associated to this Item | Any |
Response.Name (required) | string | Name of lost/found item | Any |
Response.Date (required) | string | Date-time where item is lost/found | Any |
Response.Location (required) | string | Where the item was found | Any |
Response.Category (required) | string | Type of item | Etc , Cards , Notes , Electronics , Bottles |
Response.Image_url | string | Item's accompanying image link | Any |
[
{
"Id": "98721yrr0u14oure",
"Name": "Water Bottle",
"Date": "2019-08-24T14:15:22Z",
"Location": "E4A DSA Lab",
"Category": "Cards",
"Image_url": "https://imgur.com/gallery/RaHyECD"
}
]
No headers specified
Name | Type | Description | Accepted values |
---|---|---|---|
Id (required) | string | The MongoDB ObjectID associated to this Item | Any |
Name (required) | string | Name of lost/found item | Any |
Date (required) | string | Date-time where item is lost/found | Any |
Location (required) | string | Where the item was found | Any |
Category (required) | string | Type of item | Etc , Cards , Notes , Electronics , Bottles |
Contact_method | string | Founder/Lostee Contact Method | nus_security , telegram , whatsapp , wechat , line , phone_number |
Contact_details | string | Contact details of Founder/Lostee | Any |
Item_details | string | Any | |
Image_url | string | Item's accompanying image link | Any |
User_id | string | UserID associated to this item. Only applicable for Lookout Items. | Any |
{
"Id": "98721yrr0u14oure",
"Name": "Water Bottle",
"Date": "2019-08-24T14:15:22Z",
"Location": "E4A DSA Lab",
"Category": "Cards",
"Contact_method": "Telegram",
"Contact_details": "FindNUS",
"Item_details": "Blue, with a sticker and broken handle",
"Image_url": "https://imgur.com/gallery/RaHyECD",
"User_id": "string"
}
Name | Type | Description | Accepted values |
---|---|---|---|
Id (required) | string | The MongoDB ObjectID associated to this Item | Any |
Name (required) | string | Name of lost/found item | Any |
Date (required) | string | Date-time where item is lost/found | Any |
Location (required) | string | Where the item was found | Any |
Category (required) | string | Type of item | Etc , Cards , Notes , Electronics , Bottles |
Image_url | string | Item's accompanying image link | Any |
{
"Id": "98721yrr0u14oure",
"Name": "Water Bottle",
"Date": "2019-08-24T14:15:22Z",
"Location": "E4A DSA Lab",
"Category": "Cards",
"Image_url": "https://imgur.com/gallery/RaHyECD"
}
Name | Type | Description | Accepted values |
---|---|---|---|
User_id | string | Unique User_id generated by firebase to associate a user to a Lookout item. | Any |
Name (required) | string | Name of new lost/found item | Any |
Date (required) | string | Date-time where item is lost/found | Any |
Location (required) | string | Where the item was found | Any |
Category (required) | string | Type of item | Etc , Cards , Notes , Electronics , Bottles |
Contact_method | string | Founder/Lostee Contact Method | nus_security , telegram , whatsapp , wechat , line , phone_number |
Contact_details | string | Contact details of Founder/Lostee | Any |
Item_details | string | Any | |
Image_base64 | string | Accompanying image of new Lost/Found item, if applicable | Any |
{
"User_id": "string",
"Name": "Water Bottle",
"Date": "2019-08-24T14:15:22Z",
"Location": "E4A DSA Lab",
"Category": "Cards",
"Contact_method": "Telegram",
"Contact_details": "FindNUS",
"Item_details": "Blue, with a sticker and broken handle",
"Image_base64": "string"
}
Name | Type | Description | Accepted values |
---|---|---|---|
Id (required) | string | The MongoDB ObjectID associated to this Item | Any |
{
"Id": "98721yrr0u14oure"
}
Name | Type | Description | Accepted values |
---|---|---|---|
Id (required) | string | The MongoDB ObjectID associated to this Item | Any |
User_id | string | Unique User_id generated by firebase to associate a user to a Lookout item. | Any |
Name | string | Name of new lost/found item | Any |
Date | string | Date-time where item is lost/found | Any |
Location | string | Where the item was found | Any |
Category | string | Type of item | Etc , Cards , Notes , Electronics , Bottles |
Contact_method | string | Founder/Lostee Contact Method | nus_security , telegram , whatsapp , wechat , line , phone_number |
Contact_details | string | Contact details of Founder/Lostee | Any |
Item_details | string | Any | |
Image_base64 | string | Updated image of Lost/Found item, if applicable | Any |
{
"Id": "98721yrr0u14oure",
"User_id": "string",
"Name": "Water Bottle",
"Date": "2019-08-24T14:15:22Z",
"Location": "E4A DSA Lab",
"Category": "Cards",
"Contact_method": "Telegram",
"Contact_details": "FindNUS",
"Item_details": "Blue, with a sticker and broken handle",
"Image_base64": "string"
}
Name | Type | Description | Accepted values |
---|---|---|---|
Category | string | Non-case sensitive category name | Etc , Cards , Notes , Electronics , Bottles |
"Etc"
Name | Type | Description | Accepted values |
---|---|---|---|
ContactMethod | string | Non-case sensitive contact method | nus_security , telegram , whatsapp , wechat , line , phone_number |
"nus_security"