API de tâche de traduction
Supprimer la tâche de traduction
POST/v1/translation/delete
Supprimer une tâche de traduction par son identifiant.
- Adresse complète
- https://otranslator.com/api/v1/translation/delete
- Authentification
- Il est nécessaire de transmettre la clé API dans l'en-tête de requête Authorization
- Content-Type
- application/json
- Format erroné
- { "error": "Invalid API key." }
Points à noter
Après suppression, la tâche sera marquée comme supprimée, et le service de traduction sera appelé pour nettoyer les ressources liées à la tâche.
Exemple
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}'Paramètres de requête
| Paramètres | Type | Par défaut | Description | Exemple |
|---|---|---|---|---|
| *taskId | String | - | ID de la tâche de traduction | - |
Réponse
| Paramètres | Type | Par défaut | Description | Exemple |
|---|---|---|---|---|
| success | Boolean | - | Suppression effectuée avec succès | - |
Erreurs courantes
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.