a-tuoheng-task/src/main/resources/postman/Task-API-Collection.json

320 lines
9.7 KiB
JSON

{
"info": {
"_postman_id": "task-api-collection",
"name": "任务管理API",
"description": "任务管理相关接口的Postman集合",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "任务计划管理",
"item": [
{
"name": "创建定时任务计划",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"planName\": \"定时任务计划测试\",\n \"planType\": \"TIMED\",\n \"executeType\": \"SINGLE\",\n \"executeTime\": \"2026-03-10T10:00:00\",\n \"duration\": 3600,\n \"routeId\": 1,\n \"uavId\": \"UAV001\",\n \"description\": \"测试定时任务计划\",\n \"routeUrl\": \"http://example.com/route.json\"\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{baseUrl}}/task/plan/timed",
"host": ["{{baseUrl}}"],
"path": ["task", "plan", "timed"]
}
},
"response": []
},
{
"name": "创建周期任务计划",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"planName\": \"周期任务计划测试\",\n \"planType\": \"CYCLE\",\n \"executeType\": \"SINGLE\",\n \"cycleType\": \"DAILY\",\n \"cycleValue\": \"1,3,5\",\n \"startDate\": \"2026-03-10\",\n \"endDate\": \"2026-03-31\",\n \"executeTime\": \"10:00:00\",\n \"duration\": 3600,\n \"routeId\": 1,\n \"uavId\": \"UAV001\",\n \"description\": \"测试周期任务计划\",\n \"routeUrl\": \"http://example.com/route.json\"\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{baseUrl}}/task/plan/cycle",
"host": ["{{baseUrl}}"],
"path": ["task", "plan", "cycle"]
}
},
"response": []
},
{
"name": "获取任务计划详细信息",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/task/plan/{planId}",
"host": ["{{baseUrl}}"],
"path": ["task", "plan", "{planId}"],
"variable": [
{
"key": "planId",
"value": "1"
}
]
}
},
"response": []
},
{
"name": "复杂条件查询任务计划列表",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"routeId\": 1,\n \"uavId\": \"UAV001\",\n \"planType\": \"TIMED\",\n \"startDateStart\": \"2026-03-01\",\n \"startDateEnd\": \"2026-03-31\"\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{baseUrl}}/task/plan/list",
"host": ["{{baseUrl}}"],
"path": ["task", "plan", "list"]
}
},
"response": []
},
{
"name": "更新任务计划",
"request": {
"method": "PUT",
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"id\": 1,\n \"planName\": \"更新后的任务计划\",\n \"executeTime\": \"2026-03-10T11:00:00\",\n \"duration\": 7200\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{baseUrl}}/task/plan",
"host": ["{{baseUrl}}"],
"path": ["task", "plan"]
}
},
"response": []
},
{
"name": "删除任务计划",
"request": {
"method": "DELETE",
"header": [],
"url": {
"raw": "{{baseUrl}}/task/plan/{planId}",
"host": ["{{baseUrl}}"],
"path": ["task", "plan", "{planId}"],
"variable": [
{
"key": "planId",
"value": "1"
}
]
}
},
"response": []
}
]
},
{
"name": "任务管理",
"item": [
{
"name": "创建无关联计划的任务",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"taskName\": \"测试任务\",\n \"taskCategory\": \"MANUAL\",\n \"taskType\": \"ONE_CLICK_TAKEOFF\",\n \"executeType\": \"SINGLE\",\n \"routeId\": 1,\n \"uavId\": \"UAV001\",\n \"startTime\": \"2026-03-10T10:00:00\",\n \"endTime\": \"2026-03-10T11:00:00\",\n \"description\": \"测试任务\",\n \"routeUrl\": \"http://example.com/route.json\"\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{baseUrl}}/task",
"host": ["{{baseUrl}}"],
"path": ["task"]
}
},
"response": []
},
{
"name": "获取任务详细信息",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/task/{taskId}",
"host": ["{{baseUrl}}"],
"path": ["task", "{taskId}"],
"variable": [
{
"key": "taskId",
"value": "1"
}
]
}
},
"response": []
},
{
"name": "复杂条件查询任务列表",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"routeId\": 1,\n \"uavId\": \"UAV001\",\n \"status\": \"PENDING\",\n \"startTimeStart\": \"2026-03-01\",\n \"startTimeEnd\": \"2026-03-31\"\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{baseUrl}}/task/list",
"host": ["{{baseUrl}}"],
"path": ["task", "list"]
}
},
"response": []
},
{
"name": "更新任务",
"request": {
"method": "PUT",
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"id\": 1,\n \"taskName\": \"更新后的测试任务\",\n \"startTime\": \"2026-03-10T10:30:00\",\n \"endTime\": \"2026-03-10T11:30:00\"\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{baseUrl}}/task",
"host": ["{{baseUrl}}"],
"path": ["task"]
}
},
"response": []
},
{
"name": "删除任务",
"request": {
"method": "DELETE",
"header": [],
"url": {
"raw": "{{baseUrl}}/task/{taskId}",
"host": ["{{baseUrl}}"],
"path": ["task", "{taskId}"],
"variable": [
{
"key": "taskId",
"value": "1"
}
]
}
},
"response": []
},
{
"name": "根据无人机ID查询任务列表",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/task/uav/{uavId}",
"host": ["{{baseUrl}}"],
"path": ["task", "uav", "{uavId}"],
"variable": [
{
"key": "uavId",
"value": "UAV001"
}
]
}
},
"response": []
},
{
"name": "根据无人机ID获取最新的一条任务",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/task/uav/current/{uavId}",
"host": ["{{baseUrl}}"],
"path": ["task", "uav", "current", "{uavId}"],
"variable": [
{
"key": "uavId",
"value": "UAV001"
}
]
}
},
"response": []
},
{
"name": "修改执行状态",
"request": {
"method": "PUT",
"header": [],
"url": {
"raw": "{{baseUrl}}/task/status/{taskId}?status=RUNNING",
"host": ["{{baseUrl}}"],
"path": ["task", "status", "{taskId}"],
"query": [
{
"key": "status",
"value": "RUNNING"
}
],
"variable": [
{
"key": "taskId",
"value": "1"
}
]
}
},
"response": []
}
]
}
],
"variable": [
{
"key": "baseUrl",
"value": "http://localhost:9215",
"type": "string"
}
]
}