excel import的api
GET ... /excel/import/template 下載excel導入的模板(下載文件 不需要參數(shù))
POST ... /excel/import/create 導入excel
請求參數(shù):
參數(shù)名稱 | 是否必須 | 數(shù)據(jù)類型 | 描述 | 取值范圍 |
---|---|---|---|---|
file | true | file | excel文件 | |
userEmail | true | String | 用戶郵箱 |
響應數(shù)據(jù):
參數(shù)名稱 | 是否必須 | 數(shù)據(jù)類型 | 描述 | 取值范圍 |
---|---|---|---|---|
status | true | 響應狀態(tài)(1表示正確,其他的數(shù)字表示錯誤) | ||
data | false | excel的id | ||
message | false | String | 請求錯誤的時候會返回錯誤信息 |
請求響應例子:
/* post /excel/import/create */
{
"status": 1,
"data": "cd8f8a70db0d40be8921cce0165f2d61"
}
GET .../download/error/excel 下載錯誤導入錯誤的excel數(shù)據(jù)
請求參數(shù):
參數(shù)名稱 | 是否必須 | 數(shù)據(jù)類型 | 描述 | 取值范圍 |
---|---|---|---|---|
userEmail | true | String | 用戶郵箱 | |
excelId | true | String | excel的id(唯一id) |
POST .../history 分頁查詢用戶所有導入excel的歷史數(shù)據(jù)
請求響應例子:
/* post /history
{
"userEmail": "tony@intramirror.com",
"limit": 10,
"offset": 0
}
Response 響應:
{
"status": 1,
"data": [
{
"taskType": "Product Import",
"userEmail": "tony@intramirror.com",
"status": "Completed",
"startTime": "2019-01-25 14:30:41",
"endTime": "2019-01-25 14:30:43"
},
{
"taskType": "Product Import",
"userEmail": "tony@intramirror.com",
"status": "Completed",
"startTime": "2019-01-25 14:27:54",
"endTime": "2019-01-25 14:27:56"
},
{
"taskType": "Product Import",
"userEmail": "tony@intramirror.com",
"status": "Completed",
"startTime": "2019-01-25 14:24:48",
"endTime": "2019-01-25 14:24:49"
},
{
"taskType": "Product Import",
"userEmail": "tony@intramirror.com",
"status": "Completed",
"startTime": "2019-01-25 14:14:22",
"endTime": "2019-01-25 14:14:23"
},
{
"taskType": "Product Import",
"userEmail": "tony@intramirror.com",
"status": "Completed",
"startTime": "2019-01-25 14:11:16",
"endTime": "2019-01-25 14:11:17"
},
{
"taskType": "Product Import",
"userEmail": "tony@intramirror.com",
"status": "Completed",
"startTime": "2019-01-25 14:10:14",
"endTime": "2019-01-25 14:10:15"
},
{
"taskType": "Product Import",
"userEmail": "tony@intramirror.com",
"status": "Completed",
"startTime": "2019-01-25 13:29:39",
"endTime": "2019-01-25 13:29:41"
},
{
"taskType": "Product Import",
"userEmail": "tony@intramirror.com",
"status": "Completed",
"startTime": "2019-01-24 18:54:23",
"endTime": "2019-01-24 18:54:29"
}
]
}