Handle Escaped Values in Query Endpoint

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

Moderators: StaffingSupport, s.emmons, BullhornSupport

Post Reply
Kazemi
User
Posts: 41
Joined: Tue Oct 11, 2016 1:26 pm

Handle Escaped Values in Query Endpoint

Post by Kazemi » Thu Mar 30, 2017 2:27 pm

We need to query for a corporate user. Let's say we're searching using someone's name, which for this example is Joe O'Brien. Using the /query endpoint, how should we escape the name in the url properly?

Here are a couple examples we've tried:
https://rest32.bullhornstaffing.com/res ... "name='Joe O'Brien'"
https://rest32.bullhornstaffing.com/res ... "name='Joe O\'Brien'"

In both cases, Bullhorn is interpreting the apostrophe in O'Brien as the end of the name field, and the latter part of the name, "Brien", is seen as extraneous and causes a 400 response.

Kazemi
User
Posts: 41
Joined: Tue Oct 11, 2016 1:26 pm

Re: Handle Escaped Values in Query Endpoint

Post by Kazemi » Thu Apr 06, 2017 7:43 pm

Hi Bullhorn team, any updates?

Kazemi
User
Posts: 41
Joined: Tue Oct 11, 2016 1:26 pm

Re: Handle Escaped Values in Query Endpoint

Post by Kazemi » Fri Apr 07, 2017 3:50 pm

Through trial and error, we found the solution to be using double apostrophes. E.g.,

https://rest32.bullhornstaffing.com/res ... "name='Joe O''Brien'"

Your documentation fails to reflect this.

Post Reply