REST API - Get using dates not working as expected

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

Moderators: StaffingSupport, s.emmons, BullhornSupport

Post Reply
bcadmin
User
Posts: 2
Joined: Sun Oct 15, 2017 1:28 am

REST API - Get using dates not working as expected

Post by bcadmin » Mon Aug 06, 2018 10:16 pm

Hi,

I am using the following to retrieve Job Orders between a certain date range:

https://rest91.bullhornstaffing.com/res ... =dateAdded:[20180806 TO *]&fields=id,title,status,employmentType,owner,clientContact,clientCorporation,dateAdded&BhRestToken=****&count=50&start=1

I created a job order, that retrieves in JSON with a dateAdded of "1533599728217", which converts to 6-Aug-2017 (using epoch converter).

When I try to retrieve this job using the above query, nothing is retrieved until I change the date to 20180802, several days before the dateAdded in the database.

I expect that using the date of 20180806 should work. What am I missing?

Thanks,

Brad

bcadmin
User
Posts: 2
Joined: Sun Oct 15, 2017 1:28 am

Re: REST API - Get using dates not working as expected

Post by bcadmin » Tue Aug 07, 2018 12:58 am

Hi,

As a follow-up, did something in Bullhorn change on the 26-June-2018?

When I search our sandbox version of BH:
https://****/search/JobOrder?query=dateAdded:[20180625 TO *]****

I get 6 matches, 2 of which are created in August (ID=76,77)

When I change it by 1 day to

https://****/search/JobOrder?query=dateAdded:[20180626 TO *]****

I get 1 match only (ID=77).

The 26-06 is where we starting noticing some strange behaviour in BH in that we have been getting very inconsistent results from the API GET/search calls.

Any help would be greatly appreciated.

Brad

webtech4rindia
User
Posts: 11
Joined: Fri Dec 12, 2014 11:56 am

Re: REST API - Get using dates not working as expected

Post by webtech4rindia » Thu Feb 07, 2019 10:58 pm

Hello,
I was in process of getting API query but having an issue with Dateadded fields. I tried several combinations of date format to work but none of them any records. Some of them even not throwing error, just showing ZERO record.

Here are a few examples:

Url: https://rest41.bullhornstaffing.com/res ... sOpen:true AND

Condition#1:

dateAdded:['1546873357727' TO '1546534749010']

Condition#2:
dateAdded>={1546873357727} AND dateAdded<={1546534749010}

Conditions#3:
dateAdded:"[1546873357727 TO 1546534749010]"
Condition:#4:
dateAdded>1544418000000 AND dateAdded<= 1544418000000

And above conditions with different DateTime Format.

Any other filtration like by Category, Speciality, etc working as per expected.

Appreciate a quick around time.

webtech4rindia
User
Posts: 11
Joined: Fri Dec 12, 2014 11:56 am

Re: REST API - Get using dates not working as expected

Post by webtech4rindia » Tue Feb 19, 2019 12:35 pm

Any finding or any help on the same?

Appreciate support on that.


Thanks,

Post Reply