API說明
API位置 |
/new_ezding/images/add |
需求描述 |
圖像上傳 |
傳輸物件格式 |
json |
方法 |
POST |
範例
curl -X POST \
-H " X-Ftcsys-key: {KEY}" \
-H " X-Accept-Language: {language}" \
-H "Content-Type: application/json" \
-d '{
"x": 10,
"y": 10,
"height": 300,
"width": 300,
"photo_path": "圖片來源path"
}
http://{endpoint}/new_ezding/images/add
回傳範例 - 新增成功
< HTTP/1.1 201 OK
< Content-Type: application/json; charset=UTF-8
{
"result": {
"photo_url": " https://www.ezding.com.tw/00002/1920_800.jpg"
},
"code": 201,
"status": "success"
}
回傳錯誤 - 新增失敗
< HTTP/1.1 403 Forbidden
< Content-Type: application/json; charset=UTF-8
{
"result": "",
"code": 403,
"status": "failure",
}
接收URL參數
參數 |
名稱 |
範例 |
必填 |
備註 |
x |
圖片欲裁切的x座標起點 |
10 |
Y |
|
y |
圖片欲裁切的y座標起點 |
10 |
Y |
|
height |
裁切後的圖片長度 |
300 |
Y |
|
width |
裁切後的圖片寬度 |
300 |
Y |
|
photo_path |
圖片來源path |
|
Y |
回傳的json參數