API Endpoints Documentation
Simple Hello World
Route
/
Usage
@GET http://localhost:3001/
Response
Hello World
Route
/
Usage
@GET http://localhost:3001/
Response
Hello World
Get All Articles From Moderator DB
Route
/moderator
Usage
@GET http://localhost:3001/moderator/
Authorization: Bearer {token}
Response
[
{
"_id": "652983e58321c7c4eb03a544",
"title": "Test 1",
"authors": "Test 1",
"journal": "Test 1",
"year": 2023,
"volume": "Test 1",
"pages": "Test 1",
"doi": "Test 1",
"__v": 0
}
]
Route
/moderator
Usage
@GET http://localhost:3001/moderator/
Authorization: Bearer {token}
Response
[
{
"_id": "652983e58321c7c4eb03a544",
"title": "Test 1",
"authors": "Test 1",
"journal": "Test 1",
"year": 2023,
"volume": "Test 1",
"pages": "Test 1",
"doi": "Test 1",
"__v": 0
}
]
Get Article by ID From Moderator DB
Route
/moderator/:id
Usage
@GET http://localhost:3001/moderator/652983e58321c7c4eb03a544
Authorization: Bearer {token}
Response
{
"_id": "652983e58321c7c4eb03a544",
"title": "Test 1",
"authors": "Test 1",
"journal": "Test 1",
"year": 2023,
"volume": "Test 1",
"pages": "Test 1",
"doi": "Test 1",
"__v": 0
}
Route
/moderator/:id
Usage
@GET http://localhost:3001/moderator/652983e58321c7c4eb03a544
Authorization: Bearer {token}
Response
{
"_id": "652983e58321c7c4eb03a544",
"title": "Test 1",
"authors": "Test 1",
"journal": "Test 1",
"year": 2023,
"volume": "Test 1",
"pages": "Test 1",
"doi": "Test 1",
"__v": 0
}
Get Articles From Analyst DB
Route
/analyst
Usage
@GET http://localhost:3001/analyst
Authorization: Bearer {token}
Response
[
{
"_id": "651fc450bc12b872359e6722",
"title": "Test 1",
"authors": "Test 1",
"journal": "Test 1",
"year": "2023",
"volume": "Test 1",
"pages": "Test 1",
"doi": "Test 1",
"claim": "Good Stuff",
"method": "Agile",
"agreeDisagree": "Agree",
"__v": 0
}
]
Route
/analyst
Usage
@GET http://localhost:3001/analyst
Authorization: Bearer {token}
Response
[
{
"_id": "651fc450bc12b872359e6722",
"title": "Test 1",
"authors": "Test 1",
"journal": "Test 1",
"year": "2023",
"volume": "Test 1",
"pages": "Test 1",
"doi": "Test 1",
"claim": "Good Stuff",
"method": "Agile",
"agreeDisagree": "Agree",
"__v": 0
}
]
Get All Articles From SPEED DB
Route
/speed
Usage
@GET http://localhost:3001/speed/
Response
[
{
"_id": "652983d68321c7c4eb03a531",
"title": "Test 1",
"authors": "Test 1",
"journal": "Test 1",
"year": "2023",
"volume": "Test 1",
"pages": "Test 1",
"doi": "Test 1",
"claim": "Claim Test 1",
"method": "Waterfall",
"agreeDisagree": "Agree",
"__v": 0
},
{
"_id": "652983d98321c7c4eb03a536",
"title": "Artificial Intelligence in Healthcare",
"authors": "John Smith, Sarah Johnson",
"journal": "Journal of Advanced Technology",
"year": "2023",
"volume": "12",
"pages": "123-135",
"doi": "10.1234/jat.2023.001",
"claim": "Claim Test 2",
"method": "Agile",
"agreeDisagree": "Agree",
"__v": 0
}
]
Route
/speed
Usage
@GET http://localhost:3001/speed/
Response
[
{
"_id": "652983d68321c7c4eb03a531",
"title": "Test 1",
"authors": "Test 1",
"journal": "Test 1",
"year": "2023",
"volume": "Test 1",
"pages": "Test 1",
"doi": "Test 1",
"claim": "Claim Test 1",
"method": "Waterfall",
"agreeDisagree": "Agree",
"__v": 0
},
{
"_id": "652983d98321c7c4eb03a536",
"title": "Artificial Intelligence in Healthcare",
"authors": "John Smith, Sarah Johnson",
"journal": "Journal of Advanced Technology",
"year": "2023",
"volume": "12",
"pages": "123-135",
"doi": "10.1234/jat.2023.001",
"claim": "Claim Test 2",
"method": "Agile",
"agreeDisagree": "Agree",
"__v": 0
}
]
Get Article by ID From SPEED DB
Route
/speed/:id
Usage
@GET http://localhost:3001/speed/652983d98321c7c4eb03a536
Response
{
"_id": "652983d98321c7c4eb03a536",
"title": "Artificial Intelligence in Healthcare",
"authors": "John Smith, Sarah Johnson",
"journal": "Journal of Advanced Technology",
"year": "2023",
"volume": "12",
"pages": "123-135",
"doi": "10.1234/jat.2023.001",
"claim": "Claim Test 2",
"method": "Agile",
"agreeDisagree": "Agree",
"__v": 0
}
Route
/speed/:id
Usage
@GET http://localhost:3001/speed/652983d98321c7c4eb03a536
Response
{
"_id": "652983d98321c7c4eb03a536",
"title": "Artificial Intelligence in Healthcare",
"authors": "John Smith, Sarah Johnson",
"journal": "Journal of Advanced Technology",
"year": "2023",
"volume": "12",
"pages": "123-135",
"doi": "10.1234/jat.2023.001",
"claim": "Claim Test 2",
"method": "Agile",
"agreeDisagree": "Agree",
"__v": 0
}
Get Article by range of years From speed DB
Route
/speed/by-year-range?startYear=2023&endYear=2024
Usage
@GET http://localhost:3001/speed/by-year-range?startYear=2023&endYear=2024
Response
[
{
"_id": "6529850f50a08a9462b80e2e",
"title": "The Impact of Climate Change on Ecosystems",
"authors": "Laura K. Mitchell, David J. Parker",
"journal": "Environmental Science Today",
"year": "2024",
"volume": "17",
"pages": "210-225",
"doi": "10.4567/est.2024.003",
"claim": "Climate change is causing significant disruptions in ecosystems worldwide.",
"method": "Agile",
"agreeDisagree": "Agree",
"__v": 0
},
{
"_id": "6529851750a08a9462b80e34",
"title": "The Impact of Autonomous Vehicles on Traffic Congestion",
"authors": "Eleanor P. Adams, William G. Lee",
"journal": "Transportation Research Journal",
"year": "2023",
"volume": "14",
"pages": "289-303",
"doi": "10.7890/trj.2023.014",
"claim": "The widespread adoption of autonomous vehicles will reduce traffic congestion in urban areas.",
"method": "Agile",
"agreeDisagree": "Agree",
"__v": 0
},
{
"_id": "6529851c50a08a9462b80e37",
"title": "The Effects of Music on Productivity",
"authors": "Oliver S. Green, Isabella A. Turner",
"journal": "Productivity Research Quarterly",
"year": "2023",
"volume": "7",
"pages": "112-125",
"doi": "10.7890/prq.2023.007",
"claim": "Listening to music while working can enhance productivity and concentration.",
"method": "Agile",
"agreeDisagree": "Agree",
"__v": 0
},
{
"_id": "6529852050a08a9462b80e3a",
"title": "The Impact of Renewable Energy on Greenhouse Gas Emissions",
"authors": "Natalie E. Johnson, Daniel J. Martin",
"journal": "Environmental Science and Policy",
"year": "2024",
"volume": "11",
"pages": "135-149",
"doi": "10.5678/esp.2024.011",
"claim": "The transition to renewable energy sources significantly reduces greenhouse gas emissions.",
"method": "Waterfall",
"agreeDisagree": "Agree",
"__v": 0
}
]
Route
/speed/by-year-range?startYear=2023&endYear=2024
Usage
@GET http://localhost:3001/speed/by-year-range?startYear=2023&endYear=2024
Response
[
{
"_id": "6529850f50a08a9462b80e2e",
"title": "The Impact of Climate Change on Ecosystems",
"authors": "Laura K. Mitchell, David J. Parker",
"journal": "Environmental Science Today",
"year": "2024",
"volume": "17",
"pages": "210-225",
"doi": "10.4567/est.2024.003",
"claim": "Climate change is causing significant disruptions in ecosystems worldwide.",
"method": "Agile",
"agreeDisagree": "Agree",
"__v": 0
},
{
"_id": "6529851750a08a9462b80e34",
"title": "The Impact of Autonomous Vehicles on Traffic Congestion",
"authors": "Eleanor P. Adams, William G. Lee",
"journal": "Transportation Research Journal",
"year": "2023",
"volume": "14",
"pages": "289-303",
"doi": "10.7890/trj.2023.014",
"claim": "The widespread adoption of autonomous vehicles will reduce traffic congestion in urban areas.",
"method": "Agile",
"agreeDisagree": "Agree",
"__v": 0
},
{
"_id": "6529851c50a08a9462b80e37",
"title": "The Effects of Music on Productivity",
"authors": "Oliver S. Green, Isabella A. Turner",
"journal": "Productivity Research Quarterly",
"year": "2023",
"volume": "7",
"pages": "112-125",
"doi": "10.7890/prq.2023.007",
"claim": "Listening to music while working can enhance productivity and concentration.",
"method": "Agile",
"agreeDisagree": "Agree",
"__v": 0
},
{
"_id": "6529852050a08a9462b80e3a",
"title": "The Impact of Renewable Energy on Greenhouse Gas Emissions",
"authors": "Natalie E. Johnson, Daniel J. Martin",
"journal": "Environmental Science and Policy",
"year": "2024",
"volume": "11",
"pages": "135-149",
"doi": "10.5678/esp.2024.011",
"claim": "The transition to renewable energy sources significantly reduces greenhouse gas emissions.",
"method": "Waterfall",
"agreeDisagree": "Agree",
"__v": 0
}
]
Get All Users
Route
/auth
Usage
@GET http://localhost:3001/auth/
Authorization: Bearer {token}
Response
[
{
"_id": "65227d81d4000dba2bca71dd",
"username": "Admin",
"email": "[email protected]",
"password": "$2a$10$Hjhf4ttZMyeaVsZ6cvcedOJKP2TnCZSvRKTzU4Hr282.oJCpS9u6.",
"role": "admin",
"createdAt": "2023-10-08T09:59:29.051Z",
"updatedAt": "2023-10-08T09:59:29.051Z",
"__v": 0
},
{
"_id": "652514522246101c0b2759f9",
"username": "munish",
"email": "[email protected]",
"password": "$2a$10$7I/kzx7./b1y8YUa.OouQeaWqIcl43bDhRQgAkpzOKeR1Io12B5cO",
"role": "admin",
"createdAt": "2023-10-10T09:07:30.892Z",
"updatedAt": "2023-10-10T09:07:30.892Z",
"__v": 0
}
]
Route
/auth
Usage
@GET http://localhost:3001/auth/
Authorization: Bearer {token}
Response
[
{
"_id": "65227d81d4000dba2bca71dd",
"username": "Admin",
"email": "[email protected]",
"password": "$2a$10$Hjhf4ttZMyeaVsZ6cvcedOJKP2TnCZSvRKTzU4Hr282.oJCpS9u6.",
"role": "admin",
"createdAt": "2023-10-08T09:59:29.051Z",
"updatedAt": "2023-10-08T09:59:29.051Z",
"__v": 0
},
{
"_id": "652514522246101c0b2759f9",
"username": "munish",
"email": "[email protected]",
"password": "$2a$10$7I/kzx7./b1y8YUa.OouQeaWqIcl43bDhRQgAkpzOKeR1Io12B5cO",
"role": "admin",
"createdAt": "2023-10-10T09:07:30.892Z",
"updatedAt": "2023-10-10T09:07:30.892Z",
"__v": 0
}
]
Sign Up
Route
/auth/signup
Usage
@POST http://localhost:3001/auth/signup
Payload
{
"username": "Test One",
"email": "[email protected]",
"password": "123456",
"role": "analyst" (optional)
}
Response
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY1MWJkZmYxNzhkOGI4OTdjN2EwZDFlNyIsImlhdCI6MTY5NjMyNTY0MSwiZXhwIjoxNjk2NTg0ODQxfQ.n1W-ib4dMpr5Tdco8_5NePz_JBwVjsR1IsV6tL0NJ4w"
}
Route
/auth/signup
Usage
@POST http://localhost:3001/auth/signup
Payload
{
"username": "Test One",
"email": "[email protected]",
"password": "123456",
"role": "analyst" (optional)
}
Response
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY1MWJkZmYxNzhkOGI4OTdjN2EwZDFlNyIsImlhdCI6MTY5NjMyNTY0MSwiZXhwIjoxNjk2NTg0ODQxfQ.n1W-ib4dMpr5Tdco8_5NePz_JBwVjsR1IsV6tL0NJ4w"
}
Log In
Route
/auth/login
Usage
@POST http://localhost:3001/auth/login
Payload
{
"email": "[email protected]",
"password": "123456"
}
Response
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY1MWJkZmYxNzhkOGI4OTdjN2EwZDFlNyIsImlhdCI6MTY5NjMyNTY0MSwiZXhwIjoxNjk2NTg0ODQxfQ.n1W-ib4dMpr5Tdco8_5NePz_JBwVjsR1IsV6tL0NJ4w"
}
Route
/auth/login
Usage
@POST http://localhost:3001/auth/login
Payload
{
"email": "[email protected]",
"password": "123456"
}
Response
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY1MWJkZmYxNzhkOGI4OTdjN2EwZDFlNyIsImlhdCI6MTY5NjMyNTY0MSwiZXhwIjoxNjk2NTg0ODQxfQ.n1W-ib4dMpr5Tdco8_5NePz_JBwVjsR1IsV6tL0NJ4w"
}
Add Article To Moderator DB
Route
/moderator
Usage
@POST http://localhost:3001/moderator
Payload
{
"title": "Sample Title",
"authors": "Author 1, Author 2",
"journal": "Sample Journal",
"year": "2023",
"volume": "Volume 1",
"pages": "1-10",
"doi": "doi:10.12345/example"
}
The volume and pages properties are optional and have string values if provided
Response
{
"title": "Sample Title",
"authors": "Author 1, Author 2",
"journal": "Sample Journal",
"year": 2023,
"volume": "Volume 1",
"pages": "1-10",
"doi": "doi:10.12345/example",
"_id": "651fc6c7bc12b872359e6732",
"__v": 0
}
Route
/moderator
Usage
@POST http://localhost:3001/moderator
Payload
{
"title": "Sample Title",
"authors": "Author 1, Author 2",
"journal": "Sample Journal",
"year": "2023",
"volume": "Volume 1",
"pages": "1-10",
"doi": "doi:10.12345/example"
}
The volume and pages properties are optional and have string values if provided
Response
{
"title": "Sample Title",
"authors": "Author 1, Author 2",
"journal": "Sample Journal",
"year": 2023,
"volume": "Volume 1",
"pages": "1-10",
"doi": "doi:10.12345/example",
"_id": "651fc6c7bc12b872359e6732",
"__v": 0
}
Add Article To Analyst DB
Route
/analyst
Usage
@POST http://localhost:3001/analyst
Authorization: Bearer {token}
{
"title": "The development",
"authors": "The development",
"journal": "The development",
"year": "2000",
"volume": "2414",
"pages": "135",
"doi": "3555",
"claim": "Slow down development",
"method": "Agile",
"agreeDisagree": "Agree"
}
Response
{
"title": "The development",
"authors": "The development",
"journal": "The development",
"year": "2000",
"volume": "2414",
"pages": "135",
"doi": "3555",
"claim": "Slow down development",
"method": "Agile",
"agreeDisagree": "Agree",
"_id": "651f6b53093d79e2930df269",
"__v": 0
}
Route
/analyst
Usage
@POST http://localhost:3001/analyst
Authorization: Bearer {token}
{
"title": "The development",
"authors": "The development",
"journal": "The development",
"year": "2000",
"volume": "2414",
"pages": "135",
"doi": "3555",
"claim": "Slow down development",
"method": "Agile",
"agreeDisagree": "Agree"
}
Response
{
"title": "The development",
"authors": "The development",
"journal": "The development",
"year": "2000",
"volume": "2414",
"pages": "135",
"doi": "3555",
"claim": "Slow down development",
"method": "Agile",
"agreeDisagree": "Agree",
"_id": "651f6b53093d79e2930df269",
"__v": 0
}
Add Article To speed DB
Route
/speed
Usage
@POST http://localhost:3001/speed
Authorization: Bearer {token}
Payload
{
"title": "The Impact of Renewable Energy on Greenhouse Gas Emissions",
"authors": "Natalie E. Johnson, Daniel J. Martin",
"journal": "Environmental Science and Policy",
"year": "2024",
"volume": "11",
"pages": "135-149",
"doi": "10.5678/esp.2024.011",
"claim": "The transition to renewable energy sources significantly reduces greenhouse gas emissions.",
"method": "A comprehensive analysis of energy consumption and emissions data was performed before and after the adoption of renewable energy sources.",
"agreeDisagree": "Agree"
}
The volume and pages properties are optional and have string values if provided
Response
{
"title": "The Impact of Renewable Energy on Greenhouse Gas Emissions",
"authors": "Natalie E. Johnson, Daniel J. Martin",
"journal": "Environmental Science and Policy",
"year": "2024",
"volume": "11",
"pages": "135-149",
"doi": "10.5678/esp.2024.011",
"claim": "The transition to renewable energy sources significantly reduces greenhouse gas emissions.",
"method": "A comprehensive analysis of energy consumption and emissions data was performed before and after the adoption of renewable energy sources.",
"agreeDisagree": "Agree"
}
Route
/speed
Usage
@POST http://localhost:3001/speed
Authorization: Bearer {token}
Payload
{
"title": "The Impact of Renewable Energy on Greenhouse Gas Emissions",
"authors": "Natalie E. Johnson, Daniel J. Martin",
"journal": "Environmental Science and Policy",
"year": "2024",
"volume": "11",
"pages": "135-149",
"doi": "10.5678/esp.2024.011",
"claim": "The transition to renewable energy sources significantly reduces greenhouse gas emissions.",
"method": "A comprehensive analysis of energy consumption and emissions data was performed before and after the adoption of renewable energy sources.",
"agreeDisagree": "Agree"
}
The volume and pages properties are optional and have string values if provided
Response
{
"title": "The Impact of Renewable Energy on Greenhouse Gas Emissions",
"authors": "Natalie E. Johnson, Daniel J. Martin",
"journal": "Environmental Science and Policy",
"year": "2024",
"volume": "11",
"pages": "135-149",
"doi": "10.5678/esp.2024.011",
"claim": "The transition to renewable energy sources significantly reduces greenhouse gas emissions.",
"method": "A comprehensive analysis of energy consumption and emissions data was performed before and after the adoption of renewable energy sources.",
"agreeDisagree": "Agree"
}
Delete Account By ID
Route
/auth/:id
Usage
@DELETE http://localhost:3001/speed/651fc433bc12b872359e671d
Authorization: Bearer {token}
Response
{
"_id": "652a806295c1bda0a901a4d0",
"username": "Test 1",
"email": "[email protected]",
"password": "$2a$10$Fojp9H6s6RLLaiOROajJ2O9/QNJMcHahC9sNOnc6krL6ZcazNZ38S",
"role": "admin",
"createdAt": "2023-10-14T11:49:54.170Z",
"updatedAt": "2023-10-14T11:49:54.170Z",
"__v": 0
}
Route
/auth/:id
Usage
@DELETE http://localhost:3001/speed/651fc433bc12b872359e671d
Authorization: Bearer {token}
Response
{
"_id": "652a806295c1bda0a901a4d0",
"username": "Test 1",
"email": "[email protected]",
"password": "$2a$10$Fojp9H6s6RLLaiOROajJ2O9/QNJMcHahC9sNOnc6krL6ZcazNZ38S",
"role": "admin",
"createdAt": "2023-10-14T11:49:54.170Z",
"updatedAt": "2023-10-14T11:49:54.170Z",
"__v": 0
}
Delete Article By ID From Moderator DB
Route
/moderator/:id
Usage
@DELETE http://localhost:3001/moderator/651fc6c7bc12b872359e6732
Authorization: Bearer {token}
Response
{
"_id": "651fc6c7bc12b872359e6732",
"title": "Sample Title",
"authors": "Author 1, Author 2",
"journal": "Sample Journal",
"year": 2023,
"volume": "Volume 1",
"pages": "1-10",
"doi": "doi:10.12345/example",
"__v": 0
}
Route
/moderator/:id
Usage
@DELETE http://localhost:3001/moderator/651fc6c7bc12b872359e6732
Authorization: Bearer {token}
Response
{
"_id": "651fc6c7bc12b872359e6732",
"title": "Sample Title",
"authors": "Author 1, Author 2",
"journal": "Sample Journal",
"year": 2023,
"volume": "Volume 1",
"pages": "1-10",
"doi": "doi:10.12345/example",
"__v": 0
}
Delete Article By ID From Analyst DB
Route
/analyst/:id
Usage
@DELETE http://localhost:3001/analyst/651fc6c7bc12b872359e6732
Authorization: Bearer {token}
Response
{
"_id": "651fc6c7bc12b872359e6732",
"title": "Sample Title",
"authors": "Author 1, Author 2",
"journal": "Sample Journal",
"year": 2023,
"volume": "Volume 1",
"pages": "1-10",
"doi": "doi:10.12345/example",
"__v": 0
}
Route
/analyst/:id
Usage
@DELETE http://localhost:3001/analyst/651fc6c7bc12b872359e6732
Authorization: Bearer {token}
Response
{
"_id": "651fc6c7bc12b872359e6732",
"title": "Sample Title",
"authors": "Author 1, Author 2",
"journal": "Sample Journal",
"year": 2023,
"volume": "Volume 1",
"pages": "1-10",
"doi": "doi:10.12345/example",
"__v": 0
}
Delete Article By ID From speed DB
Route
/speed/:id
Usage
@DELETE http://localhost:3001/speed/651fc6c7bc12b872359e6732
Authorization: Bearer {token}
Response
{
"_id": "651fc6c7bc12b872359e6732",
"title": "Sample Title",
"authors": "Author 1, Author 2",
"journal": "Sample Journal",
"year": 2023,
"volume": "Volume 1",
"pages": "1-10",
"doi": "doi:10.12345/example",
"__v": 0
}
Route
/speed/:id
Usage
@DELETE http://localhost:3001/speed/651fc6c7bc12b872359e6732
Authorization: Bearer {token}
Response
{
"_id": "651fc6c7bc12b872359e6732",
"title": "Sample Title",
"authors": "Author 1, Author 2",
"journal": "Sample Journal",
"year": 2023,
"volume": "Volume 1",
"pages": "1-10",
"doi": "doi:10.12345/example",
"__v": 0
}