VSCODE类似postman的请求插件
api.http
@host = 127.0.0.1
@port = 8001
@token = d2f8876850f9ddd904f8653466aa980e6433c7fe
@baseUrl = http://{{host}}:{{port}}
### 1. stock_item全部数据获取
# @name login
GET {{baseUrl}}/api/stock/get_stock_item_with_num_of_child/ HTTP/1.1
content-type: application/json
Authorization: Token {{token}}
### 2. 获取报废的stock_item报表:2024.1.3
GET {{baseUrl}}/api/stock/get_stock_item_obsolescence/ HTTP/1.1
content-type: application/json
Authorization: Token {{token}}
### 3. 创建stock_item报表
POST {{baseUrl}}/api/stock/create_stock_item/ HTTP/1.1
content-type: application/json
Authorization: Token {{token}}
{
"name": "报废",
"parent": 1,
"is_leaf": false,
"is_active": true,
"is_obsolete": false,
"is_deleted": false,
"is_stock": false,
"is_stock_item": true,
"is_stock_item_obsolete": false,
"is_stock_item_deleted": false
}
### 4. 获取pdf表格
POST {{baseUrl}}/api/report/get_igi_report/ HTTP/1.1
content-type: application/json
Authorization: Token {{token}}
{
"stock_code": "",
"start_date": "",
"end_date": "",
"completed": false
}
### 5. 其他
POST {{baseUrl}}/api/report/get_spare_location_report/ HTTP/1.1
content-type: application/json
Authorization: Token {{token}}
{
"stock_code": "496202014", "serial_no": "", "system": "", "work_group": ""
}
### 6. 其他
POST {{baseUrl}}/api/report/get_cm_weekly_summary/ HTTP/1.1
content-type: application/json
Authorization: Token {{token}}
### 7. 其他
POST {{baseUrl}}/api/report/get_mean_time_between_failure/ HTTP/1.1
content-type: application/json
Authorization: Token {{token}}
### 8. 没有被部署到列车的parts查询超时时间报表: 2024.1.3
POST {{baseUrl}}/api/report/get_regular_check_management_eg_card_with_battery_report/ HTTP/1.1
content-type: application/json
Authorization: Token {{token}}
{
"serial_no": "",
"stock_code": "",
"description": "",
"cycle_month": 0,
"incoming_cycle_month": 0
}