UPDATE
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"code": 202,
|
||||
"msg": "dashboard task queued",
|
||||
"data": {
|
||||
"task_id": "dashboard-task-123",
|
||||
"status_url": "/api/dashboard-data/dashboard-task-123/status/"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"code": 400,
|
||||
"msg": "پارامتر sensor_id الزامی است.",
|
||||
"data": null
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"code": 200,
|
||||
"msg": "success",
|
||||
"data": {
|
||||
"task_id": "dashboard-task-123",
|
||||
"status": "FAILURE",
|
||||
"error": "خطا در ساخت کارتهای داشبورد."
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"code": 200,
|
||||
"msg": "success",
|
||||
"data": {
|
||||
"task_id": "dashboard-task-123",
|
||||
"status": "PENDING",
|
||||
"message": "تسک در صف یا یافت نشد."
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"code": 200,
|
||||
"msg": "success",
|
||||
"data": {
|
||||
"task_id": "dashboard-task-123",
|
||||
"status": "PROGRESS",
|
||||
"progress": {
|
||||
"current": 5,
|
||||
"total": 15,
|
||||
"card": "sensorValuesList",
|
||||
"message": "processing sensorValuesList"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"code": 200,
|
||||
"msg": "success",
|
||||
"data": {
|
||||
"task_id": "dashboard-task-123",
|
||||
"status": "SUCCESS",
|
||||
"result": {
|
||||
"sensor_id": "550e8400-e29b-41d4-a716-446655440000",
|
||||
"all_cards": {
|
||||
"farmOverviewKpis": {
|
||||
"healthScore": 82,
|
||||
"activeAlerts": 2,
|
||||
"waterNeedMm": 18.4
|
||||
},
|
||||
"sensorValuesList": {
|
||||
"items": [
|
||||
{
|
||||
"label": "رطوبت خاک",
|
||||
"value": 45.2,
|
||||
"unit": "%"
|
||||
},
|
||||
{
|
||||
"label": "دما خاک",
|
||||
"value": 22.5,
|
||||
"unit": "°C"
|
||||
}
|
||||
]
|
||||
},
|
||||
"recommendationsList": {
|
||||
"items": [
|
||||
{
|
||||
"recommendation_title": "تنظیم نوبت آبیاری",
|
||||
"suggested_action": "آبیاری بعدی را صبح فردا انجام دهید.",
|
||||
"urgency_level": "high"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"code": 202,
|
||||
"msg": "تسک توصیه کودهی در صف قرار گرفت.",
|
||||
"data": {
|
||||
"task_id": "fert-task-123",
|
||||
"status_url": "/api/fertilization/recommend/fert-task-123/status/"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"code": 400,
|
||||
"msg": "داده نامعتبر.",
|
||||
"data": {
|
||||
"sensor_uuid": [
|
||||
"This field is required."
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"code": 200,
|
||||
"msg": "success",
|
||||
"data": {
|
||||
"task_id": "fert-task-123",
|
||||
"status": "FAILURE",
|
||||
"error": "خطا در دریافت توصیه کودهی."
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"code": 200,
|
||||
"msg": "success",
|
||||
"data": {
|
||||
"task_id": "fert-task-123",
|
||||
"status": "PENDING",
|
||||
"message": "تسک در صف یا یافت نشد."
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"code": 200,
|
||||
"msg": "success",
|
||||
"data": {
|
||||
"task_id": "fert-task-123",
|
||||
"status": "PROGRESS",
|
||||
"progress": {
|
||||
"message": "در حال پردازش توصیه کودهی..."
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"code": 200,
|
||||
"msg": "success",
|
||||
"data": {
|
||||
"task_id": "fert-task-123",
|
||||
"status": "SUCCESS",
|
||||
"result": {
|
||||
"plan": {
|
||||
"npkRatio": "20-20-20",
|
||||
"amountPerHectare": "150 kg/ha",
|
||||
"applicationMethod": "کودآبیاری در دو نوبت",
|
||||
"applicationInterval": "هر ۱۰ روز",
|
||||
"reasoning": "نیتروژن و پتاسیم خاک در محدوده متوسط است و گیاه در فاز رویشی نیاز تغذیهای بالاتری دارد."
|
||||
},
|
||||
"raw_response": "{\"plan\":{\"npkRatio\":\"20-20-20\"}}",
|
||||
"status": "completed"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,604 @@
|
||||
[
|
||||
{
|
||||
"method": "POST",
|
||||
"path": "/api/dashboard-data/generate/",
|
||||
"status_code": 202,
|
||||
"description": "Dashboard data task queued",
|
||||
"file": "json/mock_data/dashboard-data/generate/post_202.json"
|
||||
},
|
||||
{
|
||||
"method": "POST",
|
||||
"path": "/api/dashboard-data/generate/",
|
||||
"status_code": 400,
|
||||
"description": "Missing sensor_id",
|
||||
"file": "json/mock_data/dashboard-data/generate/post_400.json"
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
"path": "/api/dashboard-data/{task_id}/status/",
|
||||
"status_code": 200,
|
||||
"description": "Pending dashboard task",
|
||||
"file": "json/mock_data/dashboard-data/status/get_200_pending.json"
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
"path": "/api/dashboard-data/{task_id}/status/",
|
||||
"status_code": 200,
|
||||
"description": "Dashboard task in progress",
|
||||
"file": "json/mock_data/dashboard-data/status/get_200_progress.json"
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
"path": "/api/dashboard-data/{task_id}/status/",
|
||||
"status_code": 200,
|
||||
"description": "Successful dashboard task",
|
||||
"file": "json/mock_data/dashboard-data/status/get_200_success.json"
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
"path": "/api/dashboard-data/{task_id}/status/",
|
||||
"status_code": 200,
|
||||
"description": "Failed dashboard task",
|
||||
"file": "json/mock_data/dashboard-data/status/get_200_failure.json"
|
||||
},
|
||||
{
|
||||
"method": "POST",
|
||||
"path": "/api/fertilization/recommend/",
|
||||
"status_code": 202,
|
||||
"description": "Fertilization task queued",
|
||||
"file": "json/mock_data/fertilization/recommend/post_202.json"
|
||||
},
|
||||
{
|
||||
"method": "POST",
|
||||
"path": "/api/fertilization/recommend/",
|
||||
"status_code": 400,
|
||||
"description": "Validation error",
|
||||
"file": "json/mock_data/fertilization/recommend/post_400.json"
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
"path": "/api/fertilization/recommend/{task_id}/status/",
|
||||
"status_code": 200,
|
||||
"description": "Fertilization status pending",
|
||||
"file": "json/mock_data/fertilization/status/get_200_pending.json"
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
"path": "/api/fertilization/recommend/{task_id}/status/",
|
||||
"status_code": 200,
|
||||
"description": "Fertilization status progress",
|
||||
"file": "json/mock_data/fertilization/status/get_200_progress.json"
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
"path": "/api/fertilization/recommend/{task_id}/status/",
|
||||
"status_code": 200,
|
||||
"description": "Fertilization status success",
|
||||
"file": "json/mock_data/fertilization/status/get_200_success.json"
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
"path": "/api/fertilization/recommend/{task_id}/status/",
|
||||
"status_code": 200,
|
||||
"description": "Fertilization status failure",
|
||||
"file": "json/mock_data/fertilization/status/get_200_failure.json"
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
"path": "/api/irrigation/",
|
||||
"status_code": 200,
|
||||
"description": "List irrigation methods",
|
||||
"file": "json/mock_data/irrigation/methods/get_200.json"
|
||||
},
|
||||
{
|
||||
"method": "POST",
|
||||
"path": "/api/irrigation/",
|
||||
"status_code": 201,
|
||||
"description": "Create irrigation method",
|
||||
"file": "json/mock_data/irrigation/methods/post_201.json"
|
||||
},
|
||||
{
|
||||
"method": "POST",
|
||||
"path": "/api/irrigation/",
|
||||
"status_code": 400,
|
||||
"description": "Irrigation create validation error",
|
||||
"file": "json/mock_data/irrigation/methods/post_400.json"
|
||||
},
|
||||
{
|
||||
"method": "POST",
|
||||
"path": "/api/irrigation/recommend/",
|
||||
"status_code": 202,
|
||||
"description": "Irrigation recommendation task queued",
|
||||
"file": "json/mock_data/irrigation/recommend/post_202.json"
|
||||
},
|
||||
{
|
||||
"method": "POST",
|
||||
"path": "/api/irrigation/recommend/",
|
||||
"status_code": 400,
|
||||
"description": "Irrigation recommendation validation error",
|
||||
"file": "json/mock_data/irrigation/recommend/post_400.json"
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
"path": "/api/irrigation/recommend/{task_id}/status/",
|
||||
"status_code": 200,
|
||||
"description": "Irrigation recommendation status pending",
|
||||
"file": "json/mock_data/irrigation/recommend/status/get_200_pending.json"
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
"path": "/api/irrigation/recommend/{task_id}/status/",
|
||||
"status_code": 200,
|
||||
"description": "Irrigation recommendation status progress",
|
||||
"file": "json/mock_data/irrigation/recommend/status/get_200_progress.json"
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
"path": "/api/irrigation/recommend/{task_id}/status/",
|
||||
"status_code": 200,
|
||||
"description": "Irrigation recommendation status success",
|
||||
"file": "json/mock_data/irrigation/recommend/status/get_200_success.json"
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
"path": "/api/irrigation/recommend/{task_id}/status/",
|
||||
"status_code": 200,
|
||||
"description": "Irrigation recommendation status failure",
|
||||
"file": "json/mock_data/irrigation/recommend/status/get_200_failure.json"
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
"path": "/api/irrigation/{pk}/",
|
||||
"status_code": 200,
|
||||
"description": "Irrigation method get success",
|
||||
"file": "json/mock_data/irrigation/method-detail/get_200.json"
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
"path": "/api/irrigation/{pk}/",
|
||||
"status_code": 404,
|
||||
"description": "Irrigation method get not found",
|
||||
"file": "json/mock_data/irrigation/method-detail/get_404.json"
|
||||
},
|
||||
{
|
||||
"method": "PUT",
|
||||
"path": "/api/irrigation/{pk}/",
|
||||
"status_code": 200,
|
||||
"description": "Irrigation method put success",
|
||||
"file": "json/mock_data/irrigation/method-detail/put_200.json"
|
||||
},
|
||||
{
|
||||
"method": "PUT",
|
||||
"path": "/api/irrigation/{pk}/",
|
||||
"status_code": 400,
|
||||
"description": "Irrigation method put validation error",
|
||||
"file": "json/mock_data/irrigation/method-detail/put_400.json"
|
||||
},
|
||||
{
|
||||
"method": "PUT",
|
||||
"path": "/api/irrigation/{pk}/",
|
||||
"status_code": 404,
|
||||
"description": "Irrigation method put not found",
|
||||
"file": "json/mock_data/irrigation/method-detail/put_404.json"
|
||||
},
|
||||
{
|
||||
"method": "PATCH",
|
||||
"path": "/api/irrigation/{pk}/",
|
||||
"status_code": 200,
|
||||
"description": "Irrigation method patch success",
|
||||
"file": "json/mock_data/irrigation/method-detail/patch_200.json"
|
||||
},
|
||||
{
|
||||
"method": "PATCH",
|
||||
"path": "/api/irrigation/{pk}/",
|
||||
"status_code": 400,
|
||||
"description": "Irrigation method patch validation error",
|
||||
"file": "json/mock_data/irrigation/method-detail/patch_400.json"
|
||||
},
|
||||
{
|
||||
"method": "PATCH",
|
||||
"path": "/api/irrigation/{pk}/",
|
||||
"status_code": 404,
|
||||
"description": "Irrigation method patch not found",
|
||||
"file": "json/mock_data/irrigation/method-detail/patch_404.json"
|
||||
},
|
||||
{
|
||||
"method": "DELETE",
|
||||
"path": "/api/irrigation/{pk}/",
|
||||
"status_code": 200,
|
||||
"description": "Delete irrigation method",
|
||||
"file": "json/mock_data/irrigation/method-detail/delete_200.json"
|
||||
},
|
||||
{
|
||||
"method": "DELETE",
|
||||
"path": "/api/irrigation/{pk}/",
|
||||
"status_code": 404,
|
||||
"description": "Delete irrigation method not found",
|
||||
"file": "json/mock_data/irrigation/method-detail/delete_404.json"
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
"path": "/api/soil-data/",
|
||||
"status_code": 200,
|
||||
"description": "Soil data served from database",
|
||||
"file": "json/mock_data/soil-data/get_200_database.json"
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
"path": "/api/soil-data/",
|
||||
"status_code": 202,
|
||||
"description": "Soil data fetch task queued",
|
||||
"file": "json/mock_data/soil-data/get_202_queued.json"
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
"path": "/api/soil-data/",
|
||||
"status_code": 400,
|
||||
"description": "Soil data validation error",
|
||||
"file": "json/mock_data/soil-data/get_400.json"
|
||||
},
|
||||
{
|
||||
"method": "POST",
|
||||
"path": "/api/soil-data/",
|
||||
"status_code": 200,
|
||||
"description": "Soil data POST served from database",
|
||||
"file": "json/mock_data/soil-data/post_200_database.json"
|
||||
},
|
||||
{
|
||||
"method": "POST",
|
||||
"path": "/api/soil-data/",
|
||||
"status_code": 202,
|
||||
"description": "Soil data POST task queued",
|
||||
"file": "json/mock_data/soil-data/post_202_queued.json"
|
||||
},
|
||||
{
|
||||
"method": "POST",
|
||||
"path": "/api/soil-data/",
|
||||
"status_code": 400,
|
||||
"description": "Soil data POST validation error",
|
||||
"file": "json/mock_data/soil-data/post_400.json"
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
"path": "/api/soil-data/tasks/{task_id}/status/",
|
||||
"status_code": 200,
|
||||
"description": "Soil task status pending",
|
||||
"file": "json/mock_data/soil-data/status/get_200_pending.json"
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
"path": "/api/soil-data/tasks/{task_id}/status/",
|
||||
"status_code": 200,
|
||||
"description": "Soil task status progress",
|
||||
"file": "json/mock_data/soil-data/status/get_200_progress.json"
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
"path": "/api/soil-data/tasks/{task_id}/status/",
|
||||
"status_code": 200,
|
||||
"description": "Soil task status success",
|
||||
"file": "json/mock_data/soil-data/status/get_200_success.json"
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
"path": "/api/soil-data/tasks/{task_id}/status/",
|
||||
"status_code": 200,
|
||||
"description": "Soil task status failure",
|
||||
"file": "json/mock_data/soil-data/status/get_200_failure.json"
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
"path": "/api/plants/",
|
||||
"status_code": 200,
|
||||
"description": "List plants",
|
||||
"file": "json/mock_data/plant/list-get_200.json"
|
||||
},
|
||||
{
|
||||
"method": "POST",
|
||||
"path": "/api/plants/",
|
||||
"status_code": 201,
|
||||
"description": "Create plant",
|
||||
"file": "json/mock_data/plant/create-post_201.json"
|
||||
},
|
||||
{
|
||||
"method": "POST",
|
||||
"path": "/api/plants/",
|
||||
"status_code": 400,
|
||||
"description": "Plant create validation error",
|
||||
"file": "json/mock_data/plant/create-post_400.json"
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
"path": "/api/plants/{pk}/",
|
||||
"status_code": 200,
|
||||
"description": "Plant detail get success",
|
||||
"file": "json/mock_data/plant/detail-get_200.json"
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
"path": "/api/plants/{pk}/",
|
||||
"status_code": 404,
|
||||
"description": "Plant detail get not found",
|
||||
"file": "json/mock_data/plant/detail-get_404.json"
|
||||
},
|
||||
{
|
||||
"method": "PUT",
|
||||
"path": "/api/plants/{pk}/",
|
||||
"status_code": 200,
|
||||
"description": "Plant detail put success",
|
||||
"file": "json/mock_data/plant/detail-put_200.json"
|
||||
},
|
||||
{
|
||||
"method": "PUT",
|
||||
"path": "/api/plants/{pk}/",
|
||||
"status_code": 400,
|
||||
"description": "Plant detail put validation error",
|
||||
"file": "json/mock_data/plant/detail-put_400.json"
|
||||
},
|
||||
{
|
||||
"method": "PUT",
|
||||
"path": "/api/plants/{pk}/",
|
||||
"status_code": 404,
|
||||
"description": "Plant detail put not found",
|
||||
"file": "json/mock_data/plant/detail-put_404.json"
|
||||
},
|
||||
{
|
||||
"method": "PATCH",
|
||||
"path": "/api/plants/{pk}/",
|
||||
"status_code": 200,
|
||||
"description": "Plant detail patch success",
|
||||
"file": "json/mock_data/plant/detail-patch_200.json"
|
||||
},
|
||||
{
|
||||
"method": "PATCH",
|
||||
"path": "/api/plants/{pk}/",
|
||||
"status_code": 400,
|
||||
"description": "Plant detail patch validation error",
|
||||
"file": "json/mock_data/plant/detail-patch_400.json"
|
||||
},
|
||||
{
|
||||
"method": "PATCH",
|
||||
"path": "/api/plants/{pk}/",
|
||||
"status_code": 404,
|
||||
"description": "Plant detail patch not found",
|
||||
"file": "json/mock_data/plant/detail-patch_404.json"
|
||||
},
|
||||
{
|
||||
"method": "DELETE",
|
||||
"path": "/api/plants/{pk}/",
|
||||
"status_code": 200,
|
||||
"description": "Delete plant success",
|
||||
"file": "json/mock_data/plant/detail-delete_200.json"
|
||||
},
|
||||
{
|
||||
"method": "DELETE",
|
||||
"path": "/api/plants/{pk}/",
|
||||
"status_code": 404,
|
||||
"description": "Delete plant not found",
|
||||
"file": "json/mock_data/plant/detail-delete_404.json"
|
||||
},
|
||||
{
|
||||
"method": "POST",
|
||||
"path": "/api/plants/fetch-info/",
|
||||
"status_code": 200,
|
||||
"description": "Fetch plant info success",
|
||||
"file": "json/mock_data/plant/fetch-info-post_200.json"
|
||||
},
|
||||
{
|
||||
"method": "POST",
|
||||
"path": "/api/plants/fetch-info/",
|
||||
"status_code": 400,
|
||||
"description": "Fetch plant info missing name",
|
||||
"file": "json/mock_data/plant/fetch-info-post_400.json"
|
||||
},
|
||||
{
|
||||
"method": "POST",
|
||||
"path": "/api/plants/fetch-info/",
|
||||
"status_code": 503,
|
||||
"description": "Fetch plant info service unavailable",
|
||||
"file": "json/mock_data/plant/fetch-info-post_503.json"
|
||||
},
|
||||
{
|
||||
"method": "POST",
|
||||
"path": "/api/rag/chat/",
|
||||
"status_code": 200,
|
||||
"description": "RAG chat streaming response",
|
||||
"file": "json/mock_data/rag/chat-post_200_stream.json"
|
||||
},
|
||||
{
|
||||
"method": "POST",
|
||||
"path": "/api/rag/chat/",
|
||||
"status_code": 400,
|
||||
"description": "Missing query",
|
||||
"file": "json/mock_data/rag/chat-post_400_missing_query.json"
|
||||
},
|
||||
{
|
||||
"method": "POST",
|
||||
"path": "/api/rag/chat/",
|
||||
"status_code": 400,
|
||||
"description": "Invalid service id",
|
||||
"file": "json/mock_data/rag/chat-post_400_invalid_service.json"
|
||||
},
|
||||
{
|
||||
"method": "POST",
|
||||
"path": "/api/rag/chat/",
|
||||
"status_code": 400,
|
||||
"description": "Missing user_id for service",
|
||||
"file": "json/mock_data/rag/chat-post_400_missing_user.json"
|
||||
},
|
||||
{
|
||||
"method": "POST",
|
||||
"path": "/api/rag/recommend/irrigation/",
|
||||
"status_code": 202,
|
||||
"description": "RAG irrigation task queued",
|
||||
"file": "json/mock_data/rag/irrigation/post_202.json"
|
||||
},
|
||||
{
|
||||
"method": "POST",
|
||||
"path": "/api/rag/recommend/irrigation/",
|
||||
"status_code": 400,
|
||||
"description": "RAG irrigation validation error",
|
||||
"file": "json/mock_data/rag/irrigation/post_400.json"
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
"path": "/api/rag/recommend/irrigation/{task_id}/status/",
|
||||
"status_code": 200,
|
||||
"description": "RAG irrigation status pending",
|
||||
"file": "json/mock_data/rag/irrigation/status/get_200_pending.json"
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
"path": "/api/rag/recommend/irrigation/{task_id}/status/",
|
||||
"status_code": 200,
|
||||
"description": "RAG irrigation status progress",
|
||||
"file": "json/mock_data/rag/irrigation/status/get_200_progress.json"
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
"path": "/api/rag/recommend/irrigation/{task_id}/status/",
|
||||
"status_code": 200,
|
||||
"description": "RAG irrigation status success",
|
||||
"file": "json/mock_data/rag/irrigation/status/get_200_success.json"
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
"path": "/api/rag/recommend/irrigation/{task_id}/status/",
|
||||
"status_code": 200,
|
||||
"description": "RAG irrigation status failure",
|
||||
"file": "json/mock_data/rag/irrigation/status/get_200_failure.json"
|
||||
},
|
||||
{
|
||||
"method": "POST",
|
||||
"path": "/api/rag/recommend/fertilization/",
|
||||
"status_code": 202,
|
||||
"description": "RAG fertilization task queued",
|
||||
"file": "json/mock_data/rag/fertilization/post_202.json"
|
||||
},
|
||||
{
|
||||
"method": "POST",
|
||||
"path": "/api/rag/recommend/fertilization/",
|
||||
"status_code": 400,
|
||||
"description": "RAG fertilization validation error",
|
||||
"file": "json/mock_data/rag/fertilization/post_400.json"
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
"path": "/api/rag/recommend/fertilization/{task_id}/status/",
|
||||
"status_code": 200,
|
||||
"description": "RAG fertilization status pending",
|
||||
"file": "json/mock_data/rag/fertilization/status/get_200_pending.json"
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
"path": "/api/rag/recommend/fertilization/{task_id}/status/",
|
||||
"status_code": 200,
|
||||
"description": "RAG fertilization status progress",
|
||||
"file": "json/mock_data/rag/fertilization/status/get_200_progress.json"
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
"path": "/api/rag/recommend/fertilization/{task_id}/status/",
|
||||
"status_code": 200,
|
||||
"description": "RAG fertilization status success",
|
||||
"file": "json/mock_data/rag/fertilization/status/get_200_success.json"
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
"path": "/api/rag/recommend/fertilization/{task_id}/status/",
|
||||
"status_code": 200,
|
||||
"description": "RAG fertilization status failure",
|
||||
"file": "json/mock_data/rag/fertilization/status/get_200_failure.json"
|
||||
},
|
||||
{
|
||||
"method": "PUT",
|
||||
"path": "/api/sensor-data/{uuid_sensor}/",
|
||||
"status_code": 200,
|
||||
"description": "Sensor update put success",
|
||||
"file": "json/mock_data/sensor-data/update-put_200.json"
|
||||
},
|
||||
{
|
||||
"method": "PUT",
|
||||
"path": "/api/sensor-data/{uuid_sensor}/",
|
||||
"status_code": 400,
|
||||
"description": "Sensor update put validation error",
|
||||
"file": "json/mock_data/sensor-data/update-put_400.json"
|
||||
},
|
||||
{
|
||||
"method": "PUT",
|
||||
"path": "/api/sensor-data/{uuid_sensor}/",
|
||||
"status_code": 404,
|
||||
"description": "Sensor update put location not found",
|
||||
"file": "json/mock_data/sensor-data/update-put_404.json"
|
||||
},
|
||||
{
|
||||
"method": "PATCH",
|
||||
"path": "/api/sensor-data/{uuid_sensor}/",
|
||||
"status_code": 200,
|
||||
"description": "Sensor update patch success",
|
||||
"file": "json/mock_data/sensor-data/update-patch_200.json"
|
||||
},
|
||||
{
|
||||
"method": "PATCH",
|
||||
"path": "/api/sensor-data/{uuid_sensor}/",
|
||||
"status_code": 400,
|
||||
"description": "Sensor update patch validation error",
|
||||
"file": "json/mock_data/sensor-data/update-patch_400.json"
|
||||
},
|
||||
{
|
||||
"method": "PATCH",
|
||||
"path": "/api/sensor-data/{uuid_sensor}/",
|
||||
"status_code": 404,
|
||||
"description": "Sensor update patch location not found",
|
||||
"file": "json/mock_data/sensor-data/update-patch_404.json"
|
||||
},
|
||||
{
|
||||
"method": "POST",
|
||||
"path": "/api/sensor-data/parameters/",
|
||||
"status_code": 201,
|
||||
"description": "Create sensor parameter",
|
||||
"file": "json/mock_data/sensor-data/parameters-post_201.json"
|
||||
},
|
||||
{
|
||||
"method": "POST",
|
||||
"path": "/api/sensor-data/parameters/",
|
||||
"status_code": 400,
|
||||
"description": "Sensor parameter validation error",
|
||||
"file": "json/mock_data/sensor-data/parameters-post_400.json"
|
||||
},
|
||||
{
|
||||
"method": "POST",
|
||||
"path": "/api/tasks/",
|
||||
"status_code": 200,
|
||||
"description": "Task trigger success",
|
||||
"file": "json/mock_data/tasks/post_200.json"
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
"path": "/api/tasks/{task_id}/status/",
|
||||
"status_code": 200,
|
||||
"description": "Task status pending",
|
||||
"file": "json/mock_data/tasks/status/get_200_pending.json"
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
"path": "/api/tasks/{task_id}/status/",
|
||||
"status_code": 200,
|
||||
"description": "Task status progress",
|
||||
"file": "json/mock_data/tasks/status/get_200_progress.json"
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
"path": "/api/tasks/{task_id}/status/",
|
||||
"status_code": 200,
|
||||
"description": "Task status success",
|
||||
"file": "json/mock_data/tasks/status/get_200_success.json"
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
"path": "/api/tasks/{task_id}/status/",
|
||||
"status_code": 200,
|
||||
"description": "Task status failure",
|
||||
"file": "json/mock_data/tasks/status/get_200_failure.json"
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"code": 200,
|
||||
"msg": "روش آبیاری با موفقیت حذف شد.",
|
||||
"data": null
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"code": 404,
|
||||
"msg": "روش آبیاری یافت نشد.",
|
||||
"data": null
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"code": 200,
|
||||
"msg": "success",
|
||||
"data": {
|
||||
"id": 1,
|
||||
"name": "آبیاری قطرهای",
|
||||
"category": "موضعی",
|
||||
"description": "آبیاری با دبی کم و راندمان بالا",
|
||||
"water_efficiency_percent": 90.0,
|
||||
"water_pressure_required": "۱-۲ اتمسفر",
|
||||
"flow_rate": "۲-۸ لیتر در ساعت",
|
||||
"coverage_area": "بسته به طراحی سیستم",
|
||||
"soil_type": "اکثر خاکها",
|
||||
"climate_suitability": "گرم و خشک",
|
||||
"created_at": "2025-03-20T10:00:00Z",
|
||||
"updated_at": "2025-03-24T10:00:00Z"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"code": 404,
|
||||
"msg": "روش آبیاری یافت نشد.",
|
||||
"data": null
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"code": 200,
|
||||
"msg": "success",
|
||||
"data": {
|
||||
"id": 1,
|
||||
"name": "آبیاری قطرهای",
|
||||
"category": "موضعی",
|
||||
"description": "آبیاری با دبی کم و راندمان بالا",
|
||||
"water_efficiency_percent": 90.0,
|
||||
"water_pressure_required": "۱-۲ اتمسفر",
|
||||
"flow_rate": "۲-۸ لیتر در ساعت",
|
||||
"coverage_area": "بسته به طراحی سیستم",
|
||||
"soil_type": "اکثر خاکها",
|
||||
"climate_suitability": "گرم و خشک",
|
||||
"created_at": "2025-03-20T10:00:00Z",
|
||||
"updated_at": "2025-03-24T10:00:00Z"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"code": 400,
|
||||
"msg": "داده نامعتبر.",
|
||||
"data": {
|
||||
"name": [
|
||||
"This field may not be blank."
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"code": 404,
|
||||
"msg": "روش آبیاری یافت نشد.",
|
||||
"data": null
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"code": 200,
|
||||
"msg": "success",
|
||||
"data": {
|
||||
"id": 1,
|
||||
"name": "آبیاری قطرهای",
|
||||
"category": "موضعی",
|
||||
"description": "آبیاری با دبی کم و راندمان بالا",
|
||||
"water_efficiency_percent": 90.0,
|
||||
"water_pressure_required": "۱-۲ اتمسفر",
|
||||
"flow_rate": "۲-۸ لیتر در ساعت",
|
||||
"coverage_area": "بسته به طراحی سیستم",
|
||||
"soil_type": "اکثر خاکها",
|
||||
"climate_suitability": "گرم و خشک",
|
||||
"created_at": "2025-03-20T10:00:00Z",
|
||||
"updated_at": "2025-03-24T10:00:00Z"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"code": 400,
|
||||
"msg": "داده نامعتبر.",
|
||||
"data": {
|
||||
"name": [
|
||||
"This field may not be blank."
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"code": 404,
|
||||
"msg": "روش آبیاری یافت نشد.",
|
||||
"data": null
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"code": 200,
|
||||
"msg": "success",
|
||||
"data": [
|
||||
{
|
||||
"id": 1,
|
||||
"name": "آبیاری قطرهای",
|
||||
"category": "موضعی",
|
||||
"description": "آبیاری با دبی کم و راندمان بالا",
|
||||
"water_efficiency_percent": 90.0,
|
||||
"water_pressure_required": "۱-۲ اتمسفر",
|
||||
"flow_rate": "۲-۸ لیتر در ساعت",
|
||||
"coverage_area": "بسته به طراحی سیستم",
|
||||
"soil_type": "اکثر خاکها",
|
||||
"climate_suitability": "گرم و خشک",
|
||||
"created_at": "2025-03-20T10:00:00Z",
|
||||
"updated_at": "2025-03-24T10:00:00Z"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"code": 201,
|
||||
"msg": "success",
|
||||
"data": {
|
||||
"id": 1,
|
||||
"name": "آبیاری قطرهای",
|
||||
"category": "موضعی",
|
||||
"description": "آبیاری با دبی کم و راندمان بالا",
|
||||
"water_efficiency_percent": 90.0,
|
||||
"water_pressure_required": "۱-۲ اتمسفر",
|
||||
"flow_rate": "۲-۸ لیتر در ساعت",
|
||||
"coverage_area": "بسته به طراحی سیستم",
|
||||
"soil_type": "اکثر خاکها",
|
||||
"climate_suitability": "گرم و خشک",
|
||||
"created_at": "2025-03-20T10:00:00Z",
|
||||
"updated_at": "2025-03-24T10:00:00Z"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"code": 400,
|
||||
"msg": "داده نامعتبر.",
|
||||
"data": {
|
||||
"name": [
|
||||
"This field is required."
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"code": 202,
|
||||
"msg": "تسک توصیه آبیاری در صف قرار گرفت.",
|
||||
"data": {
|
||||
"task_id": "irr-task-123",
|
||||
"status_url": "/api/irrigation/recommend/irr-task-123/status/"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"code": 400,
|
||||
"msg": "داده نامعتبر.",
|
||||
"data": {
|
||||
"sensor_uuid": [
|
||||
"This field is required."
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"code": 200,
|
||||
"msg": "success",
|
||||
"data": {
|
||||
"task_id": "irr-task-123",
|
||||
"status": "FAILURE",
|
||||
"error": "خطا در دریافت توصیه آبیاری."
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"code": 200,
|
||||
"msg": "success",
|
||||
"data": {
|
||||
"task_id": "irr-task-123",
|
||||
"status": "PENDING",
|
||||
"message": "تسک در صف یا یافت نشد."
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"code": 200,
|
||||
"msg": "success",
|
||||
"data": {
|
||||
"task_id": "irr-task-123",
|
||||
"status": "PROGRESS",
|
||||
"progress": {
|
||||
"message": "در حال پردازش توصیه آبیاری..."
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"code": 200,
|
||||
"msg": "success",
|
||||
"data": {
|
||||
"task_id": "irr-task-123",
|
||||
"status": "SUCCESS",
|
||||
"result": {
|
||||
"plan": {
|
||||
"frequencyPerWeek": 3,
|
||||
"durationMinutes": 42,
|
||||
"bestTimeOfDay": "صبح زود",
|
||||
"moistureLevel": 68,
|
||||
"warning": "در صورت بارش موثر، نوبت سوم این هفته را حذف کنید."
|
||||
},
|
||||
"raw_response": "{\"plan\":{\"frequencyPerWeek\":3,\"durationMinutes\":42}}",
|
||||
"water_balance": {
|
||||
"daily": [
|
||||
{
|
||||
"forecast_date": "2025-03-25",
|
||||
"et0_mm": 4.7,
|
||||
"etc_mm": 5.6,
|
||||
"effective_rainfall_mm": 0.0,
|
||||
"gross_irrigation_mm": 6.2,
|
||||
"irrigation_timing": "06:00-08:00"
|
||||
}
|
||||
],
|
||||
"crop_profile": {
|
||||
"kc_initial": 0.6,
|
||||
"kc_mid": 1.15,
|
||||
"kc_end": 0.8
|
||||
},
|
||||
"active_kc": 1.15
|
||||
},
|
||||
"status": "completed"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"code": 201,
|
||||
"msg": "success",
|
||||
"data": {
|
||||
"id": 1,
|
||||
"name": "گوجهفرنگی",
|
||||
"light": "آفتاب کامل",
|
||||
"watering": "منظم، هفتهای ۲ تا ۳ بار",
|
||||
"soil": "لومی، غنی از مواد آلی",
|
||||
"temperature": "۲۰ تا ۳۰ درجه سانتیگراد",
|
||||
"planting_season": "بهار",
|
||||
"harvest_time": "۷۰ تا ۹۰ روز پس از کاشت",
|
||||
"spacing": "۴۵ تا ۶۰ سانتیمتر",
|
||||
"fertilizer": "کود NPK متعادل",
|
||||
"created_at": "2025-03-20T10:00:00Z",
|
||||
"updated_at": "2025-03-24T10:00:00Z"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"code": 400,
|
||||
"msg": "داده نامعتبر.",
|
||||
"data": {
|
||||
"name": [
|
||||
"This field is required."
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"code": 200,
|
||||
"msg": "گیاه با موفقیت حذف شد.",
|
||||
"data": null
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"code": 404,
|
||||
"msg": "گیاه یافت نشد.",
|
||||
"data": null
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"code": 200,
|
||||
"msg": "success",
|
||||
"data": {
|
||||
"id": 1,
|
||||
"name": "گوجهفرنگی",
|
||||
"light": "آفتاب کامل",
|
||||
"watering": "منظم، هفتهای ۲ تا ۳ بار",
|
||||
"soil": "لومی، غنی از مواد آلی",
|
||||
"temperature": "۲۰ تا ۳۰ درجه سانتیگراد",
|
||||
"planting_season": "بهار",
|
||||
"harvest_time": "۷۰ تا ۹۰ روز پس از کاشت",
|
||||
"spacing": "۴۵ تا ۶۰ سانتیمتر",
|
||||
"fertilizer": "کود NPK متعادل",
|
||||
"created_at": "2025-03-20T10:00:00Z",
|
||||
"updated_at": "2025-03-24T10:00:00Z"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"code": 404,
|
||||
"msg": "گیاه یافت نشد.",
|
||||
"data": null
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"code": 200,
|
||||
"msg": "success",
|
||||
"data": {
|
||||
"id": 1,
|
||||
"name": "گوجهفرنگی",
|
||||
"light": "آفتاب کامل",
|
||||
"watering": "منظم، هفتهای ۲ تا ۳ بار",
|
||||
"soil": "لومی، غنی از مواد آلی",
|
||||
"temperature": "۲۰ تا ۳۰ درجه سانتیگراد",
|
||||
"planting_season": "بهار",
|
||||
"harvest_time": "۷۰ تا ۹۰ روز پس از کاشت",
|
||||
"spacing": "۴۵ تا ۶۰ سانتیمتر",
|
||||
"fertilizer": "کود NPK متعادل",
|
||||
"created_at": "2025-03-20T10:00:00Z",
|
||||
"updated_at": "2025-03-24T10:00:00Z"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"code": 400,
|
||||
"msg": "داده نامعتبر.",
|
||||
"data": {
|
||||
"name": [
|
||||
"This field may not be blank."
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"code": 404,
|
||||
"msg": "گیاه یافت نشد.",
|
||||
"data": null
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"code": 200,
|
||||
"msg": "success",
|
||||
"data": {
|
||||
"id": 1,
|
||||
"name": "گوجهفرنگی",
|
||||
"light": "آفتاب کامل",
|
||||
"watering": "منظم، هفتهای ۲ تا ۳ بار",
|
||||
"soil": "لومی، غنی از مواد آلی",
|
||||
"temperature": "۲۰ تا ۳۰ درجه سانتیگراد",
|
||||
"planting_season": "بهار",
|
||||
"harvest_time": "۷۰ تا ۹۰ روز پس از کاشت",
|
||||
"spacing": "۴۵ تا ۶۰ سانتیمتر",
|
||||
"fertilizer": "کود NPK متعادل",
|
||||
"created_at": "2025-03-20T10:00:00Z",
|
||||
"updated_at": "2025-03-24T10:00:00Z"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"code": 400,
|
||||
"msg": "داده نامعتبر.",
|
||||
"data": {
|
||||
"name": [
|
||||
"This field may not be blank."
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"code": 404,
|
||||
"msg": "گیاه یافت نشد.",
|
||||
"data": null
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"code": 200,
|
||||
"msg": "success",
|
||||
"data": {
|
||||
"id": 1,
|
||||
"name": "گوجهفرنگی",
|
||||
"light": "آفتاب کامل",
|
||||
"watering": "منظم، هفتهای ۲ تا ۳ بار",
|
||||
"soil": "لومی، غنی از مواد آلی",
|
||||
"temperature": "۲۰ تا ۳۰ درجه سانتیگراد",
|
||||
"planting_season": "بهار",
|
||||
"harvest_time": "۷۰ تا ۹۰ روز پس از کاشت",
|
||||
"spacing": "۴۵ تا ۶۰ سانتیمتر",
|
||||
"fertilizer": "کود NPK متعادل",
|
||||
"created_at": "2025-03-20T10:00:00Z",
|
||||
"updated_at": "2025-03-24T10:00:00Z"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"code": 400,
|
||||
"msg": "نام گیاه الزامی است.",
|
||||
"data": null
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"code": 503,
|
||||
"msg": "سرویس API هنوز پیادهسازی نشده است.",
|
||||
"data": null
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"code": 200,
|
||||
"msg": "success",
|
||||
"data": [
|
||||
{
|
||||
"id": 1,
|
||||
"name": "گوجهفرنگی",
|
||||
"light": "آفتاب کامل",
|
||||
"watering": "منظم، هفتهای ۲ تا ۳ بار",
|
||||
"soil": "لومی، غنی از مواد آلی",
|
||||
"temperature": "۲۰ تا ۳۰ درجه سانتیگراد",
|
||||
"planting_season": "بهار",
|
||||
"harvest_time": "۷۰ تا ۹۰ روز پس از کاشت",
|
||||
"spacing": "۴۵ تا ۶۰ سانتیمتر",
|
||||
"fertilizer": "کود NPK متعادل",
|
||||
"created_at": "2025-03-20T10:00:00Z",
|
||||
"updated_at": "2025-03-24T10:00:00Z"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"content_type": "text/plain; charset=utf-8",
|
||||
"body": "سلام، برای بازیابی رطوبت خاک بهتر است آبیاری صبحگاهی را تنظیم کنید."
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"code": 400,
|
||||
"msg": "service_id نامعتبر است: unknown_service"
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"code": 400,
|
||||
"msg": "پارامتر query الزامی است."
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"code": 400,
|
||||
"msg": "برای این service_id، پارامتر user_id الزامی است."
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"code": 202,
|
||||
"msg": "تسک توصیه کودهی در صف قرار گرفت.",
|
||||
"data": {
|
||||
"task_id": "rag-fert-123",
|
||||
"status_url": "/api/rag/recommend/fertilization/rag-fert-123/status/"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"code": 400,
|
||||
"msg": "پارامتر sensor_uuid الزامی است.",
|
||||
"data": null
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"code": 200,
|
||||
"msg": "success",
|
||||
"data": {
|
||||
"task_id": "rag-fert-123",
|
||||
"status": "FAILURE",
|
||||
"error": "خطا در دریافت توصیه کودهی."
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"code": 200,
|
||||
"msg": "success",
|
||||
"data": {
|
||||
"task_id": "rag-fert-123",
|
||||
"status": "PENDING",
|
||||
"message": "تسک در صف یا یافت نشد."
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"code": 200,
|
||||
"msg": "success",
|
||||
"data": {
|
||||
"task_id": "rag-fert-123",
|
||||
"status": "PROGRESS",
|
||||
"progress": {
|
||||
"message": "در حال پردازش توصیه کودهی..."
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"code": 200,
|
||||
"msg": "success",
|
||||
"data": {
|
||||
"task_id": "rag-fert-123",
|
||||
"status": "SUCCESS",
|
||||
"result": {
|
||||
"plan": {
|
||||
"npkRatio": "20-20-20",
|
||||
"amountPerHectare": "150 kg/ha",
|
||||
"applicationMethod": "کودآبیاری در دو نوبت",
|
||||
"applicationInterval": "هر ۱۰ روز",
|
||||
"reasoning": "نیتروژن و پتاسیم خاک در محدوده متوسط است و گیاه در فاز رویشی نیاز تغذیهای بالاتری دارد."
|
||||
},
|
||||
"raw_response": "{\"plan\":{\"npkRatio\":\"20-20-20\"}}",
|
||||
"status": "completed"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"code": 202,
|
||||
"msg": "تسک توصیه آبیاری در صف قرار گرفت.",
|
||||
"data": {
|
||||
"task_id": "rag-irr-123",
|
||||
"status_url": "/api/rag/recommend/irrigation/rag-irr-123/status/"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"code": 400,
|
||||
"msg": "پارامتر sensor_uuid الزامی است.",
|
||||
"data": null
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"code": 200,
|
||||
"msg": "success",
|
||||
"data": {
|
||||
"task_id": "rag-irr-123",
|
||||
"status": "FAILURE",
|
||||
"error": "خطا در دریافت توصیه آبیاری."
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"code": 200,
|
||||
"msg": "success",
|
||||
"data": {
|
||||
"task_id": "rag-irr-123",
|
||||
"status": "PENDING",
|
||||
"message": "تسک در صف یا یافت نشد."
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"code": 200,
|
||||
"msg": "success",
|
||||
"data": {
|
||||
"task_id": "rag-irr-123",
|
||||
"status": "PROGRESS",
|
||||
"progress": {
|
||||
"message": "در حال پردازش توصیه آبیاری..."
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"code": 200,
|
||||
"msg": "success",
|
||||
"data": {
|
||||
"task_id": "rag-irr-123",
|
||||
"status": "SUCCESS",
|
||||
"result": {
|
||||
"plan": {
|
||||
"frequencyPerWeek": 3,
|
||||
"durationMinutes": 42,
|
||||
"bestTimeOfDay": "صبح زود",
|
||||
"moistureLevel": 68,
|
||||
"warning": "در صورت بارش موثر، نوبت سوم این هفته را حذف کنید."
|
||||
},
|
||||
"raw_response": "{\"plan\":{\"frequencyPerWeek\":3,\"durationMinutes\":42}}",
|
||||
"water_balance": {
|
||||
"daily": [
|
||||
{
|
||||
"forecast_date": "2025-03-25",
|
||||
"et0_mm": 4.7,
|
||||
"etc_mm": 5.6,
|
||||
"effective_rainfall_mm": 0.0,
|
||||
"gross_irrigation_mm": 6.2,
|
||||
"irrigation_timing": "06:00-08:00"
|
||||
}
|
||||
],
|
||||
"crop_profile": {
|
||||
"kc_initial": 0.6,
|
||||
"kc_mid": 1.15,
|
||||
"kc_end": 0.8
|
||||
},
|
||||
"active_kc": 1.15
|
||||
},
|
||||
"status": "completed"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"code": 201,
|
||||
"msg": "success",
|
||||
"data": {
|
||||
"id": 3,
|
||||
"code": "soil_moisture",
|
||||
"name_fa": "رطوبت خاک",
|
||||
"unit": "%",
|
||||
"created_at": "2025-03-24T10:00:00Z",
|
||||
"action": "added"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"code": 400,
|
||||
"msg": "داده نامعتبر.",
|
||||
"data": {
|
||||
"code": [
|
||||
"This field is required."
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"code": 200,
|
||||
"msg": "success",
|
||||
"data": {
|
||||
"uuid_sensor": "550e8400-e29b-41d4-a716-446655440000",
|
||||
"location_id": 12,
|
||||
"soil_moisture": 45.2,
|
||||
"soil_temperature": 22.5,
|
||||
"soil_ph": 6.8,
|
||||
"electrical_conductivity": 1.2,
|
||||
"nitrogen": 30.0,
|
||||
"phosphorus": 15.0,
|
||||
"potassium": 20.0,
|
||||
"plant_ids": [
|
||||
1
|
||||
],
|
||||
"created_at": "2025-03-20T10:00:00Z",
|
||||
"updated_at": "2025-03-24T10:00:00Z"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"code": 400,
|
||||
"msg": "داده نامعتبر.",
|
||||
"data": {
|
||||
"location_id": [
|
||||
"This field is required."
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"code": 404,
|
||||
"msg": "location_id یافت نشد.",
|
||||
"data": null
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"code": 200,
|
||||
"msg": "success",
|
||||
"data": {
|
||||
"uuid_sensor": "550e8400-e29b-41d4-a716-446655440000",
|
||||
"location_id": 12,
|
||||
"soil_moisture": 45.2,
|
||||
"soil_temperature": 22.5,
|
||||
"soil_ph": 6.8,
|
||||
"electrical_conductivity": 1.2,
|
||||
"nitrogen": 30.0,
|
||||
"phosphorus": 15.0,
|
||||
"potassium": 20.0,
|
||||
"plant_ids": [
|
||||
1
|
||||
],
|
||||
"created_at": "2025-03-20T10:00:00Z",
|
||||
"updated_at": "2025-03-24T10:00:00Z"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"code": 400,
|
||||
"msg": "داده نامعتبر.",
|
||||
"data": {
|
||||
"location_id": [
|
||||
"This field is required."
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"code": 404,
|
||||
"msg": "location_id یافت نشد.",
|
||||
"data": null
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
{
|
||||
"code": 200,
|
||||
"msg": "success",
|
||||
"data": {
|
||||
"source": "database",
|
||||
"id": 12,
|
||||
"lon": "51.389000",
|
||||
"lat": "35.689200",
|
||||
"depths": [
|
||||
{
|
||||
"depth_label": "0-5cm",
|
||||
"bdod": 1.31,
|
||||
"cec": 18.4,
|
||||
"cfvo": 2.0,
|
||||
"clay": 24.0,
|
||||
"nitrogen": 0.18,
|
||||
"ocd": 32.0,
|
||||
"ocs": 4.1,
|
||||
"phh2o": 7.2,
|
||||
"sand": 34.0,
|
||||
"silt": 42.0,
|
||||
"soc": 1.6,
|
||||
"wv0010": 0.31,
|
||||
"wv0033": 0.22,
|
||||
"wv1500": 0.11
|
||||
},
|
||||
{
|
||||
"depth_label": "5-15cm",
|
||||
"bdod": 1.35,
|
||||
"cec": 17.2,
|
||||
"cfvo": 2.3,
|
||||
"clay": 26.0,
|
||||
"nitrogen": 0.16,
|
||||
"ocd": 28.0,
|
||||
"ocs": 3.7,
|
||||
"phh2o": 7.1,
|
||||
"sand": 36.0,
|
||||
"silt": 38.0,
|
||||
"soc": 1.4,
|
||||
"wv0010": 0.29,
|
||||
"wv0033": 0.2,
|
||||
"wv1500": 0.1
|
||||
},
|
||||
{
|
||||
"depth_label": "15-30cm",
|
||||
"bdod": 1.39,
|
||||
"cec": 15.8,
|
||||
"cfvo": 2.8,
|
||||
"clay": 28.0,
|
||||
"nitrogen": 0.13,
|
||||
"ocd": 22.0,
|
||||
"ocs": 3.2,
|
||||
"phh2o": 7.0,
|
||||
"sand": 38.0,
|
||||
"silt": 34.0,
|
||||
"soc": 1.1,
|
||||
"wv0010": 0.26,
|
||||
"wv0033": 0.18,
|
||||
"wv1500": 0.09
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"code": 202,
|
||||
"msg": "تسک در صف. وضعیت را با task_id بررسی کنید.",
|
||||
"data": {
|
||||
"source": "task",
|
||||
"task_id": "soil-task-123",
|
||||
"lon": 51.389,
|
||||
"lat": 35.6892,
|
||||
"status_url": "/api/soil-data/tasks/soil-task-123/status/"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"code": 400,
|
||||
"msg": "داده نامعتبر.",
|
||||
"data": {
|
||||
"lat": [
|
||||
"This field is required."
|
||||
],
|
||||
"lon": [
|
||||
"This field is required."
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
{
|
||||
"code": 200,
|
||||
"msg": "success",
|
||||
"data": {
|
||||
"source": "database",
|
||||
"id": 12,
|
||||
"lon": "51.389000",
|
||||
"lat": "35.689200",
|
||||
"depths": [
|
||||
{
|
||||
"depth_label": "0-5cm",
|
||||
"bdod": 1.31,
|
||||
"cec": 18.4,
|
||||
"cfvo": 2.0,
|
||||
"clay": 24.0,
|
||||
"nitrogen": 0.18,
|
||||
"ocd": 32.0,
|
||||
"ocs": 4.1,
|
||||
"phh2o": 7.2,
|
||||
"sand": 34.0,
|
||||
"silt": 42.0,
|
||||
"soc": 1.6,
|
||||
"wv0010": 0.31,
|
||||
"wv0033": 0.22,
|
||||
"wv1500": 0.11
|
||||
},
|
||||
{
|
||||
"depth_label": "5-15cm",
|
||||
"bdod": 1.35,
|
||||
"cec": 17.2,
|
||||
"cfvo": 2.3,
|
||||
"clay": 26.0,
|
||||
"nitrogen": 0.16,
|
||||
"ocd": 28.0,
|
||||
"ocs": 3.7,
|
||||
"phh2o": 7.1,
|
||||
"sand": 36.0,
|
||||
"silt": 38.0,
|
||||
"soc": 1.4,
|
||||
"wv0010": 0.29,
|
||||
"wv0033": 0.2,
|
||||
"wv1500": 0.1
|
||||
},
|
||||
{
|
||||
"depth_label": "15-30cm",
|
||||
"bdod": 1.39,
|
||||
"cec": 15.8,
|
||||
"cfvo": 2.8,
|
||||
"clay": 28.0,
|
||||
"nitrogen": 0.13,
|
||||
"ocd": 22.0,
|
||||
"ocs": 3.2,
|
||||
"phh2o": 7.0,
|
||||
"sand": 38.0,
|
||||
"silt": 34.0,
|
||||
"soc": 1.1,
|
||||
"wv0010": 0.26,
|
||||
"wv0033": 0.18,
|
||||
"wv1500": 0.09
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"code": 202,
|
||||
"msg": "تسک در صف. وضعیت را با task_id بررسی کنید.",
|
||||
"data": {
|
||||
"source": "task",
|
||||
"task_id": "soil-task-123",
|
||||
"lon": 51.389,
|
||||
"lat": 35.6892,
|
||||
"status_url": "/api/soil-data/tasks/soil-task-123/status/"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"code": 400,
|
||||
"msg": "داده نامعتبر.",
|
||||
"data": {
|
||||
"lat": [
|
||||
"A valid number is required."
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"code": 200,
|
||||
"msg": "success",
|
||||
"data": {
|
||||
"task_id": "soil-task-123",
|
||||
"status": "FAILURE",
|
||||
"error": "خطا در واکشی داده خاک."
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"code": 200,
|
||||
"msg": "success",
|
||||
"data": {
|
||||
"task_id": "soil-task-123",
|
||||
"status": "PENDING",
|
||||
"message": "تسک در صف یا یافت نشد."
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"code": 200,
|
||||
"msg": "success",
|
||||
"data": {
|
||||
"task_id": "soil-task-123",
|
||||
"status": "PROGRESS",
|
||||
"progress": {
|
||||
"step": "fetch",
|
||||
"percent": 60
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
{
|
||||
"code": 200,
|
||||
"msg": "success",
|
||||
"data": {
|
||||
"task_id": "soil-task-123",
|
||||
"status": "SUCCESS",
|
||||
"result": {
|
||||
"source": "database",
|
||||
"id": 12,
|
||||
"lon": "51.389000",
|
||||
"lat": "35.689200",
|
||||
"depths": [
|
||||
{
|
||||
"depth_label": "0-5cm",
|
||||
"bdod": 1.31,
|
||||
"cec": 18.4,
|
||||
"cfvo": 2.0,
|
||||
"clay": 24.0,
|
||||
"nitrogen": 0.18,
|
||||
"ocd": 32.0,
|
||||
"ocs": 4.1,
|
||||
"phh2o": 7.2,
|
||||
"sand": 34.0,
|
||||
"silt": 42.0,
|
||||
"soc": 1.6,
|
||||
"wv0010": 0.31,
|
||||
"wv0033": 0.22,
|
||||
"wv1500": 0.11
|
||||
},
|
||||
{
|
||||
"depth_label": "5-15cm",
|
||||
"bdod": 1.35,
|
||||
"cec": 17.2,
|
||||
"cfvo": 2.3,
|
||||
"clay": 26.0,
|
||||
"nitrogen": 0.16,
|
||||
"ocd": 28.0,
|
||||
"ocs": 3.7,
|
||||
"phh2o": 7.1,
|
||||
"sand": 36.0,
|
||||
"silt": 38.0,
|
||||
"soc": 1.4,
|
||||
"wv0010": 0.29,
|
||||
"wv0033": 0.2,
|
||||
"wv1500": 0.1
|
||||
},
|
||||
{
|
||||
"depth_label": "15-30cm",
|
||||
"bdod": 1.39,
|
||||
"cec": 15.8,
|
||||
"cfvo": 2.8,
|
||||
"clay": 28.0,
|
||||
"nitrogen": 0.13,
|
||||
"ocd": 22.0,
|
||||
"ocs": 3.2,
|
||||
"phh2o": 7.0,
|
||||
"sand": 38.0,
|
||||
"silt": 34.0,
|
||||
"soc": 1.1,
|
||||
"wv0010": 0.26,
|
||||
"wv0033": 0.18,
|
||||
"wv1500": 0.09
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"code": 200,
|
||||
"msg": "success",
|
||||
"data": {
|
||||
"task_id": "sample-task-123"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"code": 200,
|
||||
"msg": "success",
|
||||
"data": {
|
||||
"task_id": "sample-task-123",
|
||||
"status": "FAILURE",
|
||||
"error": "Sample task failed."
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"code": 200,
|
||||
"msg": "success",
|
||||
"data": {
|
||||
"task_id": "sample-task-123",
|
||||
"status": "PENDING",
|
||||
"message": "تسک در صف یا یافت نشد."
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"code": 200,
|
||||
"msg": "success",
|
||||
"data": {
|
||||
"task_id": "sample-task-123",
|
||||
"status": "PROGRESS",
|
||||
"progress": {
|
||||
"current": 1,
|
||||
"total": 3,
|
||||
"message": "در حال پردازش..."
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"code": 200,
|
||||
"msg": "success",
|
||||
"data": {
|
||||
"task_id": "sample-task-123",
|
||||
"status": "SUCCESS",
|
||||
"result": "done"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user