Get Business Object by Filter
7 min
fetches business object records based on the defined filter values for example, you can define to get only active incidents base url https //{tenant url}/api/odata/businessobject/{business object name}?$filter={filter field} eq {field value} ensure the business object name is suffixed with an "s" supported operators only the following eight operators are supported when fetching business object records using the filter function eq returns true if the first value is equal to the second value ne returns true if the first value is not equal to the second value lt returns true if the first value is less than the second value le returns true if the first value is less than or equal to the second value gt returns true if the first value is greater than the second value ge returns true if the first value is greater than or equal to the second value or returns true if either one of its left or right sub expressions evaluates to true and returns true if both its left and right sub expressions evaluate to true get business object by filter example fetch incidents which has status as active url https //{tenant url}/api/odata/businessobject/incidents?$filter=status eq 'active' \<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}/ api/odata/$metadata#incidents", "@odata count" 53, "value" \[ { "actualcategory valid" "05b8c5fc8dc64da28a8776a8d8b2c986", "actualcategory" "facility security", "category valid" "05b8c5fc8dc64da28a8776a8d8b2c986", "category" "facility security", "causecode valid" "", "causecode" "", "closedby" null, "createdby" "rthomas", "email" " rwright\@saasitdemo com ", "firstcallresolution" false, "impact valid" "1affc174c7ea4ab79cca6b15eb67006d", "impact" "medium", "incidentnumber" 10435, "isnotification" true, "isvip" false, "isworkaround" false, "lastmodby" "ataylor", "lastmoddatetime" "2019 02 14t11 05 06z ", "phone" "+65 6829 2147", "priority valid" "29cd5d78e16f4d82916c3e933a600096", "priority" "3", "profilefullname" "richard m wright", "profilelink category" "employee", "profilelink recid" "6efab27e9f164ecf96364ef18d233d26", "profilelink" "6efab27e9f164ecf96364ef18d233d26", "recid" "05b5cd2dfae54d86a04c74dbf616c1de", "status valid" "eab221009ee34ab4bc1d14a42ed099aa", "status" "active", }, { "actualcategory valid" "fb7670462ff94b77ae72445e943f6a3c", "actualcategory" "desktop software", "category valid" "fb7670462ff94b77ae72445e943f6a3c", "category" "desktop software", "causecode valid" "", "causecode" "", "closedby" null, "createdby" "rthomas", "email" " pemerson\@saasitdemo com ", "firstcallresolution" false, "impact valid" "1affc174c7ea4ab79cca6b15eb67006d", "impact" "medium", "incidentnumber" 10409, "isnotification" true, "isvip" false, "isworkaround" false, "lastmodby" "ataylor", "lastmoddatetime" "2019 02 14t11 05 06z ", "phone" "+44 (0)1635 516700\r\n\r\n", "priority valid" "29cd5d78e16f4d82916c3e933a600096", "priority" "3", "profilefullname" "pam j emerson", "profilelink category" "employee", "profilelink recid" "acda6cb0265d4c64a7f103aaf2906b2b", "profilelink" "acda6cb0265d4c64a7f103aaf2906b2b", "recid" "0464aabb3fcf4ebc993d4cdc7c3ee8f4", "status valid" "eab221009ee34ab4bc1d14a42ed099aa", "status" "active", }, get business object by filter example fetch incidents of priority as 1 url https //{tenant url}/api/odata/businessobject/incidents?$filter=priority eq '1' \<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" " https //ism mastertest tenant2 ivanticlouddev com/api/odata/$metadata#incidents ", "@odata count" 11, "value" \[ { "actualcategory valid" "14348c1ffa044d8ab1e93005b4a0a287", "actualcategory" "missing item", "category valid" "14348c1ffa044d8ab1e93005b4a0a287", "category" "missing item", "createdby" "jclerk", "email" " admin\@saasitdemo com ", "priority valid" "cbb1d619a1bd452590e84e1b0dfc4f9b", "priority" "1", "profilefullname" "administrator admin", "profilelink category" "employee", "profilelink recid" "fb884d18f7b746a0992880f2dffe749c", "profilelink" "fb884d18f7b746a0992880f2dffe749c", "recid" "0e275ce8b1ae42e18de82c7e8b5c0920", "service" "printing service", "sla" "", "slalink category" null, "slalink recid" null, "slalink" null, "source valid" "e76c6d4a52844e78950a9e703c3a8f61", "source" "voice mail", "status valid" "2905321a3b12477a82e94e289f47786b", "status" "active", "subject" "print job has not arrived yet ", "symptom" "print job has not arrived for board meeting needs to escalate this to high priority ", "urgency valid" "6e4077d3fb6c44aa9de3493422a27dc2", "urgency" "high", "loginid" "admin", "owner valid" "5918944fe08c4f088c5e02e27db7c6e3", "owner" "jclerk", "ownerteam valid" "2e4babd54fb9420d94f836f0d9b80c47", "ownerteam" "service desk", "ownertype" "profile employee", }, { "actualcategory valid" "eed0a6f2e7ec44229752ae20578f7dfd", "actualcategory" "performance", "category valid" "eed0a6f2e7ec44229752ae20578f7dfd", "category" "performance", "closedby" "jclerk", "createdby" "jclerk", "email" " fernst\@saasitdemo com ", "priority valid" "cbb1d619a1bd452590e84e1b0dfc4f9b", "priority" "1", "profilefullname" "frank t ernst", "profilelink category" "employee", "profilelink recid" "d8e9ecb03001437492b3be453edcbee6", "profilelink" "d8e9ecb03001437492b3be453edcbee6", "recid" "23b46ae59e2d4109be64f10463510009", "service valid" "a0c7936d3b944d72901210f8151537d5", "service" "financial service", "sla" "", "slalink category" null, "slalink recid" null, "slalink" null, "source valid" "b7065708df4b449f8503621393b4a7ae", "source" "self service", "status valid" "2905321a3b12477a82e94e289f47786b", "status" "active", "subject" "erp system seems to be really slow", "symptom" "system is slow to respond and appears to be hanging at times", "urgency valid" "6e4077d3fb6c44aa9de3493422a27dc2", "urgency" "high", "loginid" "fernst", "owner valid" "5918944fe08c4f088c5e02e27db7c6e3", "owner" "jclerk", "ownerteam valid" "2e4babd54fb9420d94f836f0d9b80c47", "ownerteam" "service desk", "ownertype" "profile employee", }, get business object by filter example fetch incidents created by jclerk url https //{tenant url}/api/odata/businessobject/incidents?$filter=createdby eq 'jclerk' \<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 { "actualcategory valid" "eed0a6f2e7ec44229752ae20578f7dfd", "actualcategory" "performance", "category valid" "eed0a6f2e7ec44229752ae20578f7dfd", "category" "performance", "closedby" "jclerk", "createdby" "jclerk", "email" " lmiller\@saasitdemo com ", "firstcallresolution" false, "impact valid" "0abe7b9e677d4a70bdc3bc5e9b19b258", "impact" "low", "incidentnumber" 10315, "isnotification" true, "isvip" true, "lastmodby" "jclerk", "priority" "4", "profilefullname" "lisa k miller", "profilelink category" "employee", "profilelink recid" "0c530056f8e04831ac121ed5abc50a90", "profilelink" "0c530056f8e04831ac121ed5abc50a90", "recid" "18e84a03f7c94c5c97524196aa9750f0", "sla" "", "slalink category" null, "slalink recid" null, "slalink" null, "source valid" "ff0467c231124b2fa2db2156632c8a92", "source" "email", "status valid" "2905321a3b12477a82e94e289f47786b", "status" "active", "subject" "iphone is running very slow ", "symptom" "iphone is running very slowly after version upgrade ", "urgency valid" "44021b6cc6e44e598868c4b3306053ae", "urgency" "medium", "loginid" "lmiller", "owner valid" "5918944fe08c4f088c5e02e27db7c6e3", "owner" "jclerk", }, { "actualcategory valid" "6c23103f9bfd4906801fe833aef17cbb", "actualcategory" "how to", "category valid" "6c23103f9bfd4906801fe833aef17cbb", "category" "how to", "createdby" "jclerk", "email" " djackson\@saasitdemo com ", "impact valid" "1affc174c7ea4ab79cca6b15eb67006d", "impact" "medium", "incidentnumber" 10441, "isnotification" true, "isvip" false, "lastmodby" "jclerk", "phone" "+49 711 340190 0", "priority valid" "29cd5d78e16f4d82916c3e933a600096", "priority" "3", "profilefullname" "dana l jackson", "profilelink category" "employee", "profilelink recid" "7c7671a8b5e34a60b0d5aff4536d1020", "profilelink" "7c7671a8b5e34a60b0d5aff4536d1020", "recid" "197d122aa95643918cc9bd474a46ba62", "service valid" "1a6c68571e6648e7a99305e1905c29b4", "service" "benefits management", "sla" "benefits management (gold) for sales and marketing", "slalink category" null, "slalink recid" "acdae24f734c4812b584b0cf15a33194", "slalink" "acdae24f734c4812b584b0cf15a33194", "source valid" "bb2a1f10810a439eb2f0db745e55d1ee", "source" "walk in", "status valid" "eab221009ee34ab4bc1d14a42ed099aa", "status" "active", "subject" "unable to update information on pension system", "symptom" "needs instructions on how to access the system", "urgency valid" "44021b6cc6e44e598868c4b3306053ae", "urgency" "medium", "loginid" "djackson", "owner valid" "5918944fe08c4f088c5e02e27db7c6e3", "owner" "jclerk", }, get business object by filter example fetch incidents which has created date and time greater than 2016 07 24t23 42 48z url https //{tenant url}/api/odata/businessobject/incidents?$filter=createddatetime gt 2016 07 24t23 42 48z \<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" " https //ism mastertest tenant2 ivanticlouddev com/api/odata/$metadata#incidents ", "@odata count" 376, "value" \[ { "actualcategory valid" "6c23103f9bfd4906801fe833aef17cbb", "actualcategory" "how to", "category valid" "6c23103f9bfd4906801fe833aef17cbb", "category" "how to", "causecode valid" null, "causecode" null, "closedby" null, "closeddatetime" null, "closedduration" 0, "createdby" "ataylor", "createddatetime" "2019 09 19t06 38 37z ", "email" " agreen\@saasitdemo com ", "firstcallresolution" false, "impact valid" "1affc174c7ea4ab79cca6b15eb67006d", "impact" "medium", "incidentnumber" 11163, "isnotification" true, "isvip" false, "isworkaround" false, "lastmodby" "ataylor", "lastmoddatetime" "2019 09 19t06 39 04z ", "phone" "+61 2 8080 3300\r\n", "priority valid" "29cd5d78e16f4d82916c3e933a600096", "priority" "3", "profilefullname" "aaron a green", "profilelink category" "employee", "profilelink recid" "2f851094bfe5437c97d19871d1c539c7", "profilelink" "2f851094bfe5437c97d19871d1c539c7", "recid" "00c4c7922fe349bd8c251350fb9dc41e", }, { "actualcategory valid" null, "actualcategory" null, "category valid" null, "category" null, "causecode valid" null, "causecode" null, "closedby" null, "closeddatetime" null, "closedduration" 0, "createdby" "email listener", "createddatetime" "2019 07 05t09 25 41z ", "email" " sai sagar\@ivanti com ", "firstcallresolution" false, "impact valid" null, "impact" null, "incidentnumber" 11089, "isnotification" true, "isvip" false, "isworkaround" false, "lastmodby" "internalservices", "lastmoddatetime" "2019 07 05t09 25 53z ", "phone" null, "priority valid" "29cd5d78e16f4d82916c3e933a600096", "priority" "3", "profilefullname" "sai sagar", "profilelink category" "employee", "profilelink recid" "85a6d0bf5c6345ca8ac9332fb1d347ab", "profilelink" "85a6d0bf5c6345ca8ac9332fb1d347ab", "recid" "018089f51b0a4bc995f209a5d991742f", }, { "actualcategory valid" "b30a0bc3f3174b22b328d742c24b59c4", "actualcategory" "account lockout", "category valid" "b30a0bc3f3174b22b328d742c24b59c4", "category" "account lockout", "causecode valid" "e2489f3f7da34b898ccd9569ca5541f2", "causecode" "other", "closedby" "jclerk", "closeddatetime" "2018 09 29t15 04 00z ", "closedduration" 2966400, "createdby" "admin", "createddatetime" "2018 09 20t08 42 00z ", "email" " mhendrics\@saasitdemo com ", "firstcallresolution" false, "impact valid" "1affc174c7ea4ab79cca6b15eb67006d", "impact" "medium", "incidentnumber" 10325, "isnotification" true, "isvip" true, "isworkaround" false, "lastmodby" "jclerk", "lastmoddatetime" "2018 09 29t15 04 00z ", "phone" "+1 719 531 5007\r\n", "priority valid" "29cd5d78e16f4d82916c3e933a600096", "priority" "3", "profilefullname" "marcia s hendric", "profilelink category" "employee", "profilelink recid" "bb445711f9ff481daa59ed0d8381a911", "profilelink" "bb445711f9ff481daa59ed0d8381a911", "recid" "019a1ed9c77c4210b7054f47d214c004", }, get business object by filter example fetch incidents which has created date and time lesser than 2011 07 24t23 42 48z url https //{tenant url}/api/odata/businessobject/incidents?$filter=createddatetime lt 2011 07 24t23 42 48z \<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" " https //ism mastertest tenant2 ivanticlouddev com/api/odata/$metadata#incidents ", "@odata count" 243, "value" \[ { "actualcategory valid" "4a550ad1778746fcba65a19a630ac2c9", "actualcategory" "printer failure", "category valid" "4a550ad1778746fcba65a19a630ac2c9", "category" "printer failure", "causecode valid" "e2489f3f7da34b898ccd9569ca5541f2", "causecode" "other", "closedby" "jclerk", "closeddatetime" "2011 03 31t21 09 37z ", "closedduration" 6451200, "createdby" "admin", "createddatetime" "2011 03 25t20 42 37z ", "email" " sharon lowe\@saasitdemo com ", "firstcallresolution" true, "impact valid" "1affc174c7ea4ab79cca6b15eb67006d", "impact" "medium", "incidentnumber" 10073, "isnotification" true, "isvip" false, "isworkaround" false, "lastmodby" "jclerk", "lastmoddatetime" "2011 03 31t21 09 37z ", "phone" "+1 925 398 1800\r\n", "priority valid" "29cd5d78e16f4d82916c3e933a600096", "priority" "3", "profilefullname" "sharon lowe", "profilelink category" "employee", "profilelink recid" "0b2c886035fb4a0d837273226eae5de4", "profilelink" "0b2c886035fb4a0d837273226eae5de4", "recid" "030f0da291ec46c9953817f0e22f188e", "resolution" "resolved with user", }, { "actualcategory valid" "b30a0bc3f3174b22b328d742c24b59c4", "actualcategory" "account lockout", "category valid" "b30a0bc3f3174b22b328d742c24b59c4", "category" "account lockout", "causecode valid" "e2489f3f7da34b898ccd9569ca5541f2", "causecode" "other", "closedby" "jclerk", "closeddatetime" "2011 05 15t09 15 12z ", "closedduration" 5558400, "createdby" "admin", "createddatetime" "2011 05 10t04 42 00z ", "email" " blevitt\@saasitdemo com ", "firstcallresolution" false, "impact valid" "1affc174c7ea4ab79cca6b15eb67006d", "impact" "medium", "incidentnumber" 10137, "isnotification" true, "isvip" false, "isworkaround" false, "lastmodby" "jclerk", "lastmoddatetime" "2011 05 15t09 15 12z ", "phone" "+86 10 8520 0424", "priority valid" "29cd5d78e16f4d82916c3e933a600096", "priority" "3", "profilefullname" "bob m levitt", "profilelink category" "employee", "profilelink recid" "2b2b4a6813d944b89a8e0f25078a3ab8", "profilelink" "2b2b4a6813d944b89a8e0f25078a3ab8", "recid" "03c219dbc4ec49e6a5a320de542ad591", "resolution" "resolved with user", }, { "actualcategory valid" "426ade76be9348c5b7304b6d76e0efed", "actualcategory" "facility safety", "category valid" "426ade76be9348c5b7304b6d76e0efed", "category" "facility safety", "causecode valid" "e2489f3f7da34b898ccd9569ca5541f2", "causecode" "other", "closedby" "jclerk", "closeddatetime" "2011 05 15t21 38 00z ", "closedduration" 5558400, "createdby" "jclerk", "createddatetime" "2011 05 10t21 42 19z ", "email" " tjordan\@saasitdemo com ", "firstcallresolution" true, "impact valid" "1affc174c7ea4ab79cca6b15eb67006d", "impact" "medium", "incidentnumber" 10138, "isnotification" true, "isvip" false, "isworkaround" false, "lastmodby" "jclerk", "lastmoddatetime" "2011 05 15t21 38 00z ", "phone" "+61 2 8080 3300\r\n", "priority valid" "29cd5d78e16f4d82916c3e933a600096", "priority" "3", "profilefullname" "tom g jordan", "profilelink category" "employee", "profilelink recid" "e9e9c300e3e442978df40a35f39432c1", "profilelink" "e9e9c300e3e442978df40a35f39432c1", "recid" "03c7e9b0a56f4914b10028702dd52c7c", "resolution" "resolved with user", }, get business object by filter example fetch incidents which has owner value as null url https //{tenant url}/api/odata/businessobject/incidents?$filter=owner eq '$null' \<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" " https //ism mastertest tenant2 ivanticlouddev com/api/odata/$metadata#incidents ", "@odata count" 63, "value" \[ { "actualcategory valid" null, "actualcategory" null, "category valid" null, "category" null, "causecode valid" null, "causecode" null, "closedby" null, "closeddatetime" null, "closedduration" 0, "createdby" "email listener", "createddatetime" "2019 07 05t09 25 41z ", "email" " sai sagar\@ivanti com ", "firstcallresolution" false, "impact valid" null, "impact" null, "incidentnumber" 11089, "isnotification" true, "isvip" false, "isworkaround" false, "lastmodby" "internalservices", "lastmoddatetime" "2019 07 05t09 25 53z ", "phone" null, "status" "logged", "subject" "plain customer 2", "urgency valid" null, "urgency" null, "loginid" " sai sagar\@ivanti com ", "owner valid" null, "owner" null, "ownerteam valid" "2e4babd54fb9420d94f836f0d9b80c47", "ownerteam" "service desk", "ownertype" "employee", }, { "actualcategory valid" null, "actualcategory" null, "category valid" null, "category" null, "causecode valid" null, "causecode" null, "closedby" null, "closeddatetime" null, "closedduration" 0, "createdby" "email listener", "createddatetime" "2019 07 08t04 04 17z ", "email" " vishwanath kalavar\@ivanti com ", "firstcallresolution" false, "impact valid" null, "impact" null, "incidentnumber" 11107, "isnotification" true, "isvip" false, "isworkaround" false, "lastmodby" "internalservices", "lastmoddatetime" "2019 07 08t04 04 38z ", "phone" null, "status" "logged", "subject" "cambridge email fix 01", "urgency valid" null, "urgency" null, "loginid" " vishwanath kalavar\@ivanti com ", "owner valid" null, "owner" null, "ownerteam valid" "2e4babd54fb9420d94f836f0d9b80c47", "ownerteam" "service desk", "ownertype" "employee", }, { "actualcategory valid" null, "actualcategory" null, "category valid" null, "category" null, "causecode valid" null, "causecode" null, "closedby" null, "closeddatetime" null, "closedduration" 0, "createdby" "email listener", "createddatetime" "2019 10 11t06 03 20z ", "email" " ritesh kumar\@ivanti com ", "firstcallresolution" false, "impact valid" null, "impact" null, "incidentnumber" 11183, "isnotification" true, "isvip" false, "isworkaround" false, "lastmodby" "internalservices", "lastmoddatetime" "2019 10 11t06 03 21z ", "phone" null, "status" "logged", "subject" "re test", "urgency valid" null, "urgency" null, "loginid" " ritesh kumar\@ivanti com ", "owner valid" null, "owner" null, "ownerteam valid" "2e4babd54fb9420d94f836f0d9b80c47", "ownerteam" "service desk", "ownertype" "employee", 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 filter value scenario trying to fetch incidents without defining the filter value https //{tenant url}/api/odata/businessobject/incidents?$filter= header name authorization sessionkey code ism 5000 description invalid request message \[ "the filter value cannot be empty provide a valid value and try again" ] \<font color="#ffffff">http status code\</font> 500 invalid filter value scenario trying to fetch incident with invalid filter value https //{tenant url}/api/odata/businessobject/incidents?$filter=status eq 'new' header name authorization sessionkey code ism 4000 description invalid request message \[ "invalid filter value provide a valid filter value and try again" ] \<font color="#ffffff">http status code\</font> 400
