Retrieve the user calculation history
curl --request GET \
--url https://api.example.com/api/calculations/history{
"success": true,
"data": [
{
"query_id": 123,
"query_type": "<string>",
"query_date": "<string>",
"status": "<string>",
"tractor_name": "<string>",
"terrain_name": "<string>"
}
],
"pagination": {
"currentPage": 123,
"totalPages": 123,
"totalItems": 123,
"itemsPerPage": 123
}
}Documentation Index
Fetch the complete documentation index at: https://mintlify.com/David9604/BackMaqagr/llms.txt
Use this file to discover all available pages before exploring further.
Authorization: Bearer <your_jwt_token>
power_loss or minimum_powerShow Calculation object properties
curl -X GET "http://localhost:4000/api/calculations/history?page=1&limit=10" \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." \
-H "Content-Type: application/json"
{
"success": true,
"data": [
{
"query_id": 42,
"query_type": "power_loss",
"query_date": "2026-03-10T15:30:00.000Z",
"status": "completed",
"tractor_name": "John Deere 6130M",
"terrain_name": "Highland Farm North"
},
{
"query_id": 41,
"query_type": "minimum_power",
"query_date": "2026-03-09T10:15:00.000Z",
"status": "completed",
"tractor_name": null,
"terrain_name": "Valley Field 3"
}
],
"pagination": {
"currentPage": 1,
"totalPages": 5,
"totalItems": 47,
"itemsPerPage": 10
}
}
| Status Code | Description |
|---|---|
| 401 | Missing or invalid authentication token |
| 500 | Internal server error |
src/routes/calculation.routes.js:256src/controllers/calculationController.js:getCalculationHistorycurl --request GET \
--url https://api.example.com/api/calculations/history{
"success": true,
"data": [
{
"query_id": 123,
"query_type": "<string>",
"query_date": "<string>",
"status": "<string>",
"tractor_name": "<string>",
"terrain_name": "<string>"
}
],
"pagination": {
"currentPage": 123,
"totalPages": 123,
"totalItems": 123,
"itemsPerPage": 123
}
}