Hi @Rahul_S,
I have the following Json:
{
“name”: “Créer documents”,
“request”: {
“method”: “POST”,
“header”: [
{
“key”: “xxxx-Transaction-Timeout”,
“value”: “300”,
“type”: “text”,
“disabled”: true
}
],
“body”: {
“mode”: “formdata”,
“formdata”: [
{
“key”: “fichier”,
“description”: “rib”,
“type”: “file”,
“src”: “/C:/Users/name/OneDrive - aaa PACA/General/GED-zzzz/xxxx (back-end GED)/Services exposés/documents_qualif/document.pdf”
},
{
“key”: “metadonnees”,
“value”: “{\n "numen": "00A0009140MCA",\n "nature": "conges_et_absences/conge_de_maladie_ordinaire",\n "format": "numerique"\n}”,
“description”: “json”,
“type”: “text”
}
]
},
“url”: {
“raw”: “http://apim-suite_url.fr/ged-zzzz/documents/document”,
“protocol”: “http”,
“host”: [
“apim-suite_url”,
“NomAPI”,
“in”,
“cloe”,
“education”,
“gouv”,
“fr”
],
“path”: [
“ged-zzzz”,
“documents”,
“document”
]
}
},
“response”:
}
I’m trying the following formatted on:
“{”“name”“:”“Créer document”“,”“request”“:{”“method”“:”“POST”“,”“header”“:”“[”“{”“key”“:”“xxxx-Transaction-Timeout”“,”“value”“:”“300"”,““type””:““text””,““disabled””:““true””}“”]“”,““body””:{““mode””:““formdata””,““formdata””:“”[“”{““key””:““fichier””,““description””:““rib””,““type””:““file””},{““key””:““metadonnees””,““value””:{““numen””:““00A0009140MCA””,““nature””:““conges_et_absences/conge_de_maladie_ordinaire””,““format””:““numerique””},““description””:““json””,““type””:““text””}“”]“”},““url””:{““raw””:““http://apim-suite_url.fr/ged-zzzz/documents/document””,““protocol””:““http””,““host””:“”[“”““apim-suite_url””,““NomAPI””,““in””,““cloe””,““education””,““gouv””,““fr””“]”“,”“path”“:”“[”“”“ged-zzzz”“,”“documents”“,”“arretes”“”“]”“}},”“response”“:”“”“}”
Got the following error:
{"erreurs":[{"detail":null,"id":"numen_vide","libelle":"Le champ NUMEN est obligatoire."},{"detail":null,"id":"nature_vide","libelle":"Le champ nature est obligatoire."},{"detail":null,"id":"format_vide","libelle":"Le champ format est obligatoire."},{"detail":null,"id":"fichier_manquant","libelle":"Un fichier doit être attaché au document."}]}"
despite i had put a pdf as attachement parameter the formatte JSON not work fine,