FindNUS Backend API as of Milestone 3
This is a copy of the backend api that is being actively refered to by the team to . A human-friendly markdown document was generated from an OpenAPI yaml specs document using OpenAPI-3 Generator.
API documentation for FindNUS backend services. Handles the retrieval, processing and management of Lost Items found in NUS. Comes with additional spicy features like NLP and elasticsearch.
URL | 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 |
Lookout | boolean | Flag determining whether the Lost item has subscribed to the Lookout service. This flag IS REQUIRED. | Any |
Pluscode | string | Pluscode is a string representing the geolocation of a place based on its latitude and longitude. Optional parameter if the lost item is tagged to a particular LAT/LONG | 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",
"Lookout": false,
"Pluscode": "7QXC+CR Singapore"
}
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 |
Lookout | boolean | Flag determining whether the Lost item has subscribed to the Lookout service. This flag should only exist for Lost items. | Any |
Pluscode | string | Pluscode is a string representing the geolocation of a place based on its latitude and longitude. Optional parameter if the lost item is tagged to a particular LAT/LONG | 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",
"Lookout": false,
"Pluscode": "7QXC+CR Singapore"
}
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 |
Lookout | boolean | Flag determining whether the Lost item has subscribed to the Lookout service. This flag should only exist for Lost items. | Any |
Pluscode | string | Pluscode is a string representing the geolocation of a place based on its latitude and longitude. Optional parameter if the lost item is tagged to a particular LAT/LONG | 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",
"Lookout": false,
"Pluscode": "7QXC+CR Singapore"
}
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 |
Lookout | boolean | Flag determining whether the Lost item has subscribed to the Lookout service. This flag IS REQUIRED. | Any |
Pluscode | string | Pluscode is a string representing the geolocation of a place based on its latitude and longitude. Optional parameter if the lost item is tagged to a particular LAT/LONG | 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",
"Lookout": false,
"Pluscode": "7QXC+CR Singapore"
}
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 |
String representation of the start date to filter by. Date should be in ISO format: YYYY-MM-DDThh:mm:ssZ, eg: 2012:12:25T17:33:59Z
Name | Type | In | Description | Accepted values |
---|---|---|---|---|
startdate | string | query | String representation of the start date to filter by. Date should be in ISO format: YYYY-MM-DDThh:mm:ssZ, eg: 2012:12:25T17:33:59Z | Any |
String representation of the end date to filter by. Date should be in ISO format: YYYY-MM-DDThh:mm:ssZ, eg: 2012:12:25T17:33:59Z
Name | Type | In | Description | Accepted values |
---|---|---|---|---|
enddate | string | query | String representation of the end date to filter by. Date should be in ISO format: YYYY-MM-DDThh:mm:ssZ, eg: 2012:12:25T17:33:59Z | 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 |
Response.Pluscode | string | Pluscode is a string representing the geolocation of a place based on its latitude and longitude. Optional parameter if the lost item is tagged to a particular LAT/LONG | 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",
"Pluscode": "7QXC+CR Singapore"
}
]
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 |
Response.Pluscode | string | Pluscode is a string representing the geolocation of a place based on its latitude and longitude. Optional parameter if the lost item is tagged to a particular LAT/LONG | 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",
"Pluscode": "7QXC+CR Singapore"
}
]
No headers specified
Get a list of found items that FindNUS decides are a good possible match to the lost item queried.
Id of the lost item
Name | Type | In | Description | Accepted values |
---|---|---|---|---|
Id | integer | query | Id of the lost item | Any |
User_id of the lost item’s owner
Name | Type | In | Description | Accepted values |
---|---|---|---|---|
User_id | integer | query | User_id of the lost item's owner | 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 |
Response.Pluscode | string | Pluscode is a string representing the geolocation of a place based on its latitude and longitude. Optional parameter if the lost item is tagged to a particular LAT/LONG | 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",
"Pluscode": "7QXC+CR Singapore"
}
]
No headers specified
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 |
Lookout | boolean | Flag determining whether the Lost item has subscribed to the Lookout service. This flag IS REQUIRED. | Any |
Pluscode | string | Pluscode is a string representing the geolocation of a place based on its latitude and longitude. Optional parameter if the lost item is tagged to a particular LAT/LONG | 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",
"Lookout": false,
"Pluscode": "7QXC+CR Singapore"
}
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 |
Pluscode | string | Pluscode is a string representing the geolocation of a place based on its latitude and longitude. Optional parameter if the lost item is tagged to a particular LAT/LONG | 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",
"Pluscode": "7QXC+CR Singapore"
}
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 |
Lookout | boolean | Flag determining whether the Lost item has subscribed to the Lookout service. This flag should only exist for Lost items. | Any |
Pluscode | string | Pluscode is a string representing the geolocation of a place based on its latitude and longitude. Optional parameter if the lost item is tagged to a particular LAT/LONG | 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",
"Lookout": false,
"Pluscode": "7QXC+CR Singapore"
}
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 |
Lookout | boolean | Flag determining whether the Lost item has subscribed to the Lookout service. This flag should only exist for Lost items. | Any |
Pluscode | string | Pluscode is a string representing the geolocation of a place based on its latitude and longitude. Optional parameter if the lost item is tagged to a particular LAT/LONG | 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",
"Lookout": false,
"Pluscode": "7QXC+CR Singapore"
}
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"