+1

[API] getMyEntities json formatting

Oyabi6 6 years ago 0

Hi,

Currently, when we call apirest.php/getMyEntities/?is_recursive=1  we get something like that:

{
   "myentities":[
  {
     "id":132,
         "name":"Entité racine >Test"
      },
      {
         "id":5,
         "name":"Entité racine > Test2"
      },
      {
         "id":75,
         "name":"Entité racine > Test3"
      },
...

It's really hard to exploit that output.

In my opinion, it will be better if we can have something like that :


{
   "myentities":[
      {
         "id":0,
         "name":"Entité racine",
         "subentities":[
            {
               "id":5,
               "name":"Test"
            },
            {
               "id":75,
               "name":"Test2"
            }
         ]
      }
   ]
}

Regards.