I would like to know if it is posible to order results by field in Orion NGSI-LD, using orderBy param. This functionality is already implemented in Orion NGSIv2 (https://fiware-orion.readthedocs.io/en/master/orion-api.html#ordering-results).
I have tried to use orderBy param in GET http://localhost:1026/ngsi-ld/v1/entities?type=Incident&options=keyValues&orderBy=!code but it does not seem to work.
However, if the search is performed using entity id as orderBy value, it works, GET http://localhost:1026/ngsi-ld/v1/entities?type=Incident&options=keyValues&orderBy=id.
Yeah, sorry. That "orderBy" URL param is strictly NGSIv2. NGSI-LD doesn't (currently) support any ordering. It's not standardized and up to the implementations. Orion-LD orders the response by "createdAt", as this makes pagination easier. NOTE that it's not ordered by Entity ID. That said, we could include this new feature in the NGSI-LD standard. I'm part of the ETSI ISG CIM group that defines the NGSI-LD API and I'll take this up in our next meeting (Tuesday, Jan 17).