I would like to retrieve data from a web api rest json. My thinking was that I will create a run button in an edit form. Behind the 'onclick' event, I will request the api and retrieve the value I am interested in and put it in a field in the edit form. The request is http://localhost/api/mesures/1 and the result of this request is formatted as a json file as below.
Code: Select all
[
{
"0": "1",
"id": "1",
"1": "star",
"nom": "star",
"2": "Alain",
"prenom": "Alain",
"3": "464",
"num": "464",
"4": "afbe vcerd",
"mesures": "afbe vcerd",
"5": null,
"created": null,
"6": "2022-05-12 08:37:27",
"modified": "2022-05-12 08:37:27"
}
]
Many thx for your help,
Yves