Get Business Object by Top and Skip
3 min
fetches business object records and displays the defined number of records after skipping the defined number of records for example, you can define to skip the first 10 records and fetch the next top 10 records the latest created/modified business objects will be on top of the list base url https //{tenant url}/api/odata/businessobject/{business object name}?$top={number of records to display}&$skip={number of records to skip} ensure the business object name is suffixed with an "s" get business object by top and skip example here is an example to fetch incidents by skipping top 2 records and then returning the next top 2 records url https //{tenant url}/api/odata/businessobject/incidents?$top=2&$skip=2 \<font color="#ffffff">method\</font> get header name authorization jtw token/session key/rest api key \<font color="#ffffff">status code\</font> 200 \<font color="#ffffff">response payload\</font> click to view the response payload { "@odata context" "{tenant url}/odata/$metadata#incidents", "@odata count" 44, "value" \[ { "actualcategory valid" "14348c1ffa044d8ab1e93005b4a0a287", "actualcategory" "missing item", "category valid" "14348c1ffa044d8ab1e93005b4a0a287", "category" "missing item", "causecode valid" "e2489f3f7da34b898ccd9569ca5541f2", "causecode" "other", "closedby" "jclerk", "createdby" "jclerk", "recid" "003b58c0b4554e4baa30dfd88876582a", "subject" "remote control for projector in boardroom is are missing ", "symptom" "this is an issue as it is roof mounted and cannot be switched on/off without the remote", "urgency valid" "44021b6cc6e44e598868c4b3306053ae", "urgency" "medium", "loginid" "kdavidson", }, { "actualcategory valid" "b30a0bc3f3174b22b328d742c24b59c4", "actualcategory" "account lockout", "category valid" "b30a0bc3f3174b22b328d742c24b59c4", "category" "account lockout", "causecode valid" "e2489f3f7da34b898ccd9569ca5541f2", "causecode" "other", "closedby" "jclerk", "createdby" " ", "recid" "019a1ed9c77c4210b7054f47d214c004", "subject" "cannot get into email says invalid credentials have been supplied", "symptom" "will not logon via windows authentication", "urgency valid" "44021b6cc6e44e598868c4b3306053ae", "urgency" "medium", "loginid" "mhendric", } ] } unsuccessful responses empty top or skip value scenario trying to fetch records without providing the top/skip values https //{tenant url}/api/odata/businessobject/incidents?$top= & $skip = header name authorization sessionkey code ism 5000 description invalid request message \[ "the top and skip values cannot be empty provide a valid value and try again " ] \<font color="#ffffff">http status code\</font> 500 querying more 100 records scenario trying to fetch more than 100 records https //{tenant url}/api/odata/businessobject/incidents?$top=120 & $skip =10 header name authorization sessionkey code ism 5000 description invalid request message \[ "you cannot query more than 100 records " ] \<font color="#ffffff">http status code\</font> 500
