Télécharger une image
Télécharger une image pour un animal de compagnie.
POST https://petstore3.swagger.io/api/v3/pet/{petId}/uploadImage
Exemples
- API Key
- OAuth 2.0
cURL
POST "https://petstore3.swagger.io/api/v3/pet/210/uploadImage" \
-H "accept: application/json" \
-H "Content-Type: multipart/form-data" \
-H "api_key: <YOUR_API_KEY>" \
--form "fichier=@/path/to/your/fichier"
cURL
POST "https://petstore3.swagger.io/api/v3/pet/210/uploadImage" \
-H "accept: application/json" \
-H "Content-Type: multipart/form-data" \
-H "Authorization: Bearer <YOUR_OAUTH_TOKEN>" \
--form "fichier=@/path/to/your/fichier"
Réponses
| Code | Description |
|---|---|
| 200 | Opération réussie |
| default | Erreur inattendue |
Exemple de réponse
200: Opération réussie
Response
{
"code": 200,
"type": "unknown",
"message": "additional data"
}
Paramètres
Paramètres de chemin
| Nom | Type | Description |
|---|---|---|
petId | entier | Identifiant de l'animal à mettre à jour |
Paramètres des données de formulaire
| Nom | Type | Description |
|---|---|---|
additionalMetadata | chaîne de caractères | Données supplémentaires à transmettre au serveur. |
fichier | fichier | Fichier à télécharger. |