API Tác vụ Dịch thuật
Xóa tác vụ dịch thuật
POST/v1/translation/delete
Xóa một tác vụ dịch thuật theo ID của nó.
- Địa chỉ đầy đủ
- https://otranslator.com/api/v1/translation/delete
- Xác thực
- Cần truyền API Key vào request header Authorization
- Content-Type
- application/json
- Lỗi định dạng
- { "error": "Invalid API key." }
Lưu ý
Sau khi xóa, nhiệm vụ sẽ được đánh dấu là đã xóa và sẽ gọi dịch vụ dịch thuật để dọn dẹp các tài nguyên liên quan đến nhiệm vụ.
Ví dụ
curl
1curl -X POST 'https://otranslator.com/api/v1/translation/delete' \
2--header 'Authorization: [yourSecretKey]' \
3--header 'Content-Type: application/json' \
4--data '{
5 "taskId": "[string]"
6}'Tham Số Yêu Cầu
| Tham số | Loại | Mặc Định | Mô Tả | Ví dụ |
|---|---|---|---|---|
| *taskId | String | - | ID nhiệm vụ dịch thuật | - |
Phản Hồi
| Tham số | Loại | Mặc Định | Mô Tả | Ví dụ |
|---|---|---|---|---|
| success | Boolean | - | Có xóa thành công không | - |
Lỗi thường gặp
401 Missing API key.
The Authorization request header is required.
401 Invalid API key.
The API key does not exist, has been deleted, or is no longer valid.
400 Missing required parameter: taskId.
Provide the taskId returned by the create translation task API.
404 Task not found.
The task does not exist, has been deleted, does not belong to the current API account, or was not created through the API.