Différences entre versions de « Format de retour »

De Ikoula Wiki
Jump to navigation Jump to search
 
(5 versions intermédiaires par 2 utilisateurs non affichées)
Ligne 1 : Ligne 1 :
 +
<span data-link_translate_fr_title="Format de retour"  data-link_translate_fr_url="Format de retour"></span>[[:fr:Format de retour]][[fr:Format de retour]]
 +
<span data-link_translate_he_title="תבנית החזרה"  data-link_translate_he_url="%D7%AA%D7%91%D7%A0%D7%99%D7%AA+%D7%94%D7%97%D7%96%D7%A8%D7%94"></span>[[:he:תבנית החזרה]][[he:תבנית החזרה]]
 
<span data-link_translate_ro_title="Format de retur"  data-link_translate_ro_url="Format+de+retur"></span>[[:ro:Format de retur]][[ro:Format de retur]]
 
<span data-link_translate_ro_title="Format de retur"  data-link_translate_ro_url="Format+de+retur"></span>[[:ro:Format de retur]][[ro:Format de retur]]
 
<span data-link_translate_ru_title="Возвращает формат"  data-link_translate_ru_url="%D0%92%D0%BE%D0%B7%D0%B2%D1%80%D0%B0%D1%89%D0%B0%D0%B5%D1%82+%D1%84%D0%BE%D1%80%D0%BC%D0%B0%D1%82"></span>[[:ru:Возвращает формат]][[ru:Возвращает формат]]
 
<span data-link_translate_ru_title="Возвращает формат"  data-link_translate_ru_url="%D0%92%D0%BE%D0%B7%D0%B2%D1%80%D0%B0%D1%89%D0%B0%D0%B5%D1%82+%D1%84%D0%BE%D1%80%D0%BC%D0%B0%D1%82"></span>[[:ru:Возвращает формат]][[ru:Возвращает формат]]
Ligne 12 : Ligne 14 :
 
<span data-link_translate_en_title="Return format"  data-link_translate_en_url="Return+format"></span>[[:en:Return format]][[en:Return format]]
 
<span data-link_translate_en_title="Return format"  data-link_translate_en_url="Return+format"></span>[[:en:Return format]][[en:Return format]]
 
<!-- Début de l'article. Placez votre texte ci-après et n'hésitez pas à personnaliser les chapitres selon votre besoin -->
 
<!-- Début de l'article. Placez votre texte ci-après et n'hésitez pas à personnaliser les chapitres selon votre besoin -->
 +
{{#seo:
 +
|title=Your page title
 +
|title_mode=append
 +
|keywords=these,are,your,keywords
 +
|description=Deux formats de retour pour les réponses : XML & JSON
  
 +
|image=Uploaded_file.png
 +
|image_alt=Wiki Logo
 +
}}
 
==Introduction==
 
==Introduction==
L'API iKoula propose deux formats de retour pour les réponses : XML & JSON
+
L'API {{Template:IKoula}} propose deux formats de retour pour les réponses : XML & JSON
  
 
==Explications==
 
==Explications==

Version actuelle datée du 4 mars 2020 à 18:51

fr:Format de retour he:תבנית החזרה ro:Format de retur ru:Возвращает формат pl:Zwrotny formacie ja:戻り値の形式 ar:إعادة تنسيق zh:返回格式 de:Rückgabeformat nl:Terugkeer formaat it:Formato di ritorno pt:Formato de retorno es:Formato de devolución en:Return format

Introduction

L'API ikoula propose deux formats de retour pour les réponses : XML & JSON

Explications

Chaque méthode disponible dans l'API renvoie une réponse.
Par défaut, le retour de l'API est en XML.
Il est possible de changer ce format de retour en passant un paramètre supplémentaire format, ayant pour valeur soit json soit xml. Si vous ajoutez ce paramètre, n'oubliez pas de l'ajouter avant la génération de votre signature (voir Attention)

Exemples

Voici quelques exemples d'appels en GET :

XML par défaut
https://api.ikoula.com/index.php?r=wsflex/vmlist&login=mail@example.com&crypted_password=password_encrypted&signature=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
XML souhaité
https://api.ikoula.com/index.php?r=wsflex/vmlist&login=mail@example.com&crypted_password=password_encrypted&format=xml&signature=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
JSON souhaité
https://api.ikoula.com/index.php?r=wsflex/vmlist&login=mail@example.com&crypted_password=password_encrypted&format=json&signature=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Attention

Si vous précisez le format de retour, vous ajoutez un paramètre supplémentaire à l'appel API. Il ne faut donc pas oublier de l'ajouter AVANT de générer votre signature (voir WIKI de Génération de la signature)



Cet article vous a semblé utile ?

0




Vous n'êtes pas autorisé à publier de commentaire.