LifeWild's API is pretty simple and only lets you read LifeWild's article documents from the database.
API route to read Article documents.
API route to retrieve article documents by its Id.
https://lifewild.vercel.app/api/id
query : string
https://lifewild.vercel.app/api/id?query=abc123
This API route returns the following object when succesful:
{
response: <articleDocuments>,
length: <number>
}
However, when an error occurs, it returns the following response object:
{
response: <Error>,
length: <number>
}
API route to retrieve article documents by its vernacular name.
https://lifewild.vercel.app/api/vernacular-name
query : string
quantity (optional): 'single' | 'Many' (defaults to 'single')
https://lifewild.vercel.app/api/vernacular-name?query=cat&quantity=many
This API route returns the following object when succesful:
{
response: <articleDocuments>,
length: <number>
}
However, when an error occurs, it returns the following response object:
{
response: <Error>,
length: <number>
}
API route to retrieve article documents by its binomial name.
https://lifewild.vercel.app/api/binomial-name
query : string
quantity (optional): 'single' | 'Many' (defaults to 'single')
https://lifewild.vercel.app/api/binomial-name?query=cat&quantity=many
This API route returns the following object when succesful:
{
response: <articleDocuments>,
length: <number>
}
However, when an error occurs, it returns the following response object:
{
response: <Error>,
length: <number>
}
API route to retrieve article documents by its vernacular name.
https://lifewild.vercel.app/api/conservation-status
query : string
quantity (optional): 'single' | 'Many' (defaults to 'single')
https://lifewild.vercel.app/api/conservation-status?query=cat&quantity=many
This API route returns the following object when succesful:
{
response: <articleDocuments>,
length: <number>
}
However, when an error occurs, it returns the following response object:
{
response: <Error>,
length: <number>
}