It looks like the sortField is limited to what is in the AF SDK, which would be Name, Type, and ID. So path won't work, I confirmed that on my system. I think you will need to sort the results after you get the raw data back.
I also could not find the sortField or sortOrder enumerations documented anywhere in the PI Web API documentation. If anyone knows where that is, that would be a big help, and would answer this question directly.
I went through the documentation too before posting this question, without any luck .
Sorting a complex json ( i.e. the result of a query API ) is not very easy due to the hierarchy, so in this case I need to perform some kind of transformation to get the data in the format I need.
Anyway, sort by path would be really a good enhancement for webapi, but I would be more enthusiast to see some kind of piwebapi response helper, where you can actually find some predefined transformation for your returned data, the most common you can find when handling this kind of schema.
Apologies for the documentation. I couldn't find it too. I went to the source code and confirmed this.
Only 3 sort fields are valid: Name(default), Type, and ID
I have opened a new thread related to the Ordering and Positioning of Element attributes, and the ability to retrieve them in a specific order.
I think is now more generically related to Architecture and Design, than simply Restful Web services or any kind of interface
Switch to the above discussion if you are interested on contribute.
Thanks in advance and Best Regards,