Get Business Object by Order
4 min
fetches business object records by the defined order for example, you can define to display the business object records in ascending order base url https //{tenant url}/api/odata/businessobject/{business object name}?$orderby={order parameter} ensure the business object name is suffixed with an "s" get business object by order example here is an example to fetch incidents by its incident number in ascending order url https //{tenant url}/api/odata/businessobject/incidents?$orderby=incidentnumber asc \<font color="#ffffff">method\</font> get header name authorization jtw token/session key/rest api key \<font color="#ffffff">status code\</font> 200 click to view response payload { "@odata context" "{tenant url}/api/odata/$metadata#incidents", "@odata count" 44, "value" \[ { "actualcategory valid" "641c539c94a449fdbec1fcce462e8c89", "actualcategory" "application error", "createdby" "jclerk", "email" " blevitt\@saasitdemo com ", "incidentnumber" 10001, "isnotification" true, "isvip" false, }, { "actualcategory valid" "601387668eae4f09bb6d8de4e922b2c7", "actualcategory" "connectivity", "createdby" "email listener", "email" " pchang\@saasitdemo com ", "incidentnumber" 10002, "isnotification" true, "isvip" false, }, { "actualcategory valid" "b30a0bc3f3174b22b328d742c24b59c4", "actualcategory" "account lockout", "createdby" "admin", "email" " rthomas\@saasitdemo com ", "incidentnumber" 10003, "isnotification" true, "isvip" false, }, the data displayed in the response payload is only a sample data, it does not contain the full list of responses but only a few are shown for sample unsuccessful responses empty orderby parameter scenario trying to fetch incidents when orderby is blank https //{tenant url}/api/odata/businessobject/incidents?$orderby= header name authorization sessionkey code ism 5000 description invalid request message \[ "the parameter 'orderby' cannot be empty please provide a valid orderby parameter and try again" ] \<font color="#ffffff">http status code\</font> 500 incorrect orderby parameter scenario trying to fetch incidents when orderby is invalid https //{tenant url}/api/odata/businessobject/incidents?$orderby=incidentnumber ascending header name authorization sessionkey code ism 2004 description no content \<font color="#ffffff">http status code\</font> 204 if the orderby argument is missing, then the application returns the results by ordering in ascending order which the default for example, https //{tenant url}/api/odata/businessobject/incidents?$orderby=incidentnumber, in this url the orderby argument 'asc' or 'desc' is missing, in such scenario, the application returns the results in ascending order
