Hi!
I need help with creating my first app panel.
I’ve created new App panel as the documentation says with all the details:
and used the one object app panel:
{
"type": "object",
"required": [
"id",
"name",
"email"
],
"properties": {
"id": {
"$ref": "#/definitions/numerical"
},
"name": {
"$ref": "#/definitions/text"
},
"email": {
"$ref": "#/definitions/email"
},
"date": {
"label": "Created",
"$ref": "#/definitions/date-time"
}
}
}
After that I’ve created the API Endpoint in PHP that generate a JSON code:
$tempData['id'] = '1';
$tempData['name'] = 'sigi';
$tempData['email'] = 'sigi@gmail.com';
$tempData['date'] = date('Y-m-d H:i:s');
$arr['data'] = $tempData;
$tempSettings['url'] = "https://sigalitam.com";
$arr['settings'] = $tempSettings;
header('Content-type: application/json;');
$data = json_encode($arr);
echo $data ;
The output is:
{"data":{"id":1,"name":"sigi","email":"sigi@gmail.com","date":"2020-06-07 13:36:11"},"settings":{"url":"https:\/\/sigalitam.com"}}
But when I want to see this in action i get this message
Oops! Something went wrong…
What was wrong? how can I fix this and make it works?