呼叫 RestoreOssImage 介面來對脫敏後的圖片進行復原。
介面說明
對於呼叫 MaskOssImage,且 IsAlwaysUpload 為 ture 的檔案來說,可以透過 RestoreOssImage 來取得原圖片。
例如,Bucket 中的圖片 aliyun_dsc_desensitization/exampledir/test.png,復原後會儲存為 aliyun_dsc_original/exampledir/test.png。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
yundun-sddp:RestoreOssImage |
none |
*全部資源。
|
|
無 |
請求文法
GET HTTP/1.1
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| Bucket |
string |
是 |
OSS 的 Bucket。 |
test-sddp |
| ObjectKey |
string |
是 |
檔案在 OSS 上儲存的完整檔名。 |
aliyun_dsc_desensitization/dir1/test.png |
| ServiceRegionId |
string |
是 |
Bucket 所在地域 ID。 |
cn-hangzhou |
| TargetObjectKey |
string |
否 |
復原後圖片的儲存路徑。 |
aliyun_dsc_original /dir1/test.png |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
Schema of Response |
||
| RequestId |
string |
請求 ID。 |
208B016D-4CB9-4A85-96A5-0B8ED1EBF271 |
| RestoredImageKey |
string |
復原後的圖片在 Bucket 中的儲存路徑。 |
aliyun_dsc_original /dir1/test.png |
樣本
正常返回樣本
JSON格式
{
"RequestId": "208B016D-4CB9-4A85-96A5-0B8ED1EBF271",
"RestoredImageKey": "aliyun_dsc_original /dir1/test.png"
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | IdempotentParameterMismatch | The request uses the same client token as a previous, but non-identical request. Do not reuse a client token with different requests, unless the requests are identical. |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。