Querying data with JPQL

Forum for users and developers of Bullhorn's API service.

Moderators: StaffingSupport, s.emmons, BullhornSupport

Post Reply
Posts: 12
Joined: Fri Jan 25, 2019 11:10 am

Querying data with JPQL

Post by ivandevpartner »


Reading through the docs on using the "query" mechanism on some entities, it states that the conditional clause ("where") uses JPQL.
I have tried unsuccessfully to get a Note from BH REST API that has a placement with a certain Id. I simplified the query to return the Notes that have one placement attached, like this:

Code: Select all

https://rest22.bullhornstaffing.com/rest-services/xxxxxx/search/Note?query=size(placements.data) = 1&fields=placements,action,dateAdded,dateLastModified,isDeleted,id,clientContacts(id),candidates(id),jobOrder(id),commentingPerson(id)&sort=noteID&count=60&start=0&BhRestToken=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
BH's response was simply the Note with id = 1.

Querying for Notes that have 73 placements attached, gives me the Note number 73:
Image - see attachment image

How can this behaviour be explained?
If I remove the "size" function from the "where" clause, leaving just

I get the same result. At that pint the query makes no sense and yet I get a result.

An additional related question - if a space on either side of the equals sign in the conditional clause is omitted, the response is an empty array. It does not return an error message specifying what the error is.

What is the correct way of formulating a query, where in one call I can get the Notes that have a placements with a specific Id?
BH.PNG (44.43 KiB) Viewed 5746 times
Post Reply