Service Desk Practitioners Forum
cancel

ovsd webapi - complex searching

Highlighted
John_Baker
Super Contributor.

ovsd webapi - complex searching

Hello,

Is it possible to do 'or' searches with the webapi 4.5?

I'd like to search for all incidents submitted by someone with the surname Baker.

This seems to involve looking up IPersons with the surname Baker, which is easy, and then creating an IRegsitrationWhere and adding this to the IIncidentWhere as follows: iwhere.addCriteriumOnRegistration(rw);

However, the addCriteriumOnRegistration call seems to be misleading as it suggests I can add multiple IRegistrationWhere objects, but doesn't let me specify AND/OR. Also, I'm not even sure if the addX methods actually mean "add" but should be called setX - is it possible to call the method more than once?


John
3 REPLIES
Radovan Skolnik
Acclaimed Contributor.

Re: ovsd webapi - complex searching

All added I*Where objects comprise AND condition. WEB-API does not have means to do OR searches - you need to combine more searches. There is an internal API that SD client and server use that allows for complex conditions using AND OR NOT LIKE, ... However this is not documented and uses different style of object representation. If you find that interesting try to find API documentation of SD 3.x or 4.0.
John_Baker
Super Contributor.

Re: ovsd webapi - complex searching

Hi,

Is that API present in the Java web API, or do I need to be looking elsewhere? If you could point me in the right direction then I'd be grateful. A lack of documentation isn't so much of an issue if it's in Java.


John
Radovan Skolnik
Acclaimed Contributor.

Re: ovsd webapi - complex searching

It is not part of the WEB API. It is "internal" API that is unsupported (and undocumented) in 4.5 (but is still there). Have a look at this document: http://support.openview.hp.com/selfsolve/document/KM2015/binary/sd4apg_pdf That provides all the docs there is. It may have been altered slightly in 4.5 but the basics are still valid. Still will require some hacker abilities to make it work.

Though it provides what you're looking for it is completely different in nature from WEB API (in fact WEB API is internally mapped to this one). It has different session handling, different object styles, etc. So when you find the objects you want you will need to get their OIDs and retrieve WEB API style objects using them.

Please have a look at these tools I have made - they may be useful to you:
http://www.skolnik.info/sdutils/sso/readme.html
http://www.skolnik.info/sdutils/sftp/readme.html
http://www.skolnik.info/sdutils/ldap/readme.html

Hope it helps...