J'ai fini par trouver la solution. Pour cela j'ai récupéré le fichier demo présenté dans la video de Claris Engage 2020.
https://community.claris.com/en/s/article/itg01---introduction-to-the-filemaker-data-api---steve-winter
Cela m'a permis d'identifier certaines différences dans la rédaction de mes variables data et curl.
Pour $data
Definir([
\~data = JSONSetElement ( "{}" ; "Le nom" ; *{rubrique Le nom}* ; 1 );
\~data = JSONSetElement ( \~data ; "Le prenom" ; *{rubrique Le prenom}* ; 1 );
// set the created data into a wrapper object. IMPORTANT set the data type to 3 (object)
\~json = JSONSetElement ( "{}" ; "fieldData" ; \~data ; 3 )
];
~json
)
Pour $curl
"-X POST " &
"-H " & Citation ( "Content-Type: application/json" ) & " " &
"-H " & Citation ( "Authorization: Bearer " & $token ) & " " &
"--data-ascii @$data "
Il n'y a plus qu'à faire un Insérer depuis URL et cela fonctionne. Espérant que cela servira à d'autres.