How to return all entities of type x? - 02309317

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

Moderators: StaffingSupport, s.emmons, BullhornSupport

Post Reply
spryce
User
Posts: 2
Joined: Wed Jul 20, 2016 1:54 am

How to return all entities of type x? - 02309317

Post by spryce » Wed Jul 20, 2016 3:52 am

Hi there,

The request for an entity of type CorporateUser with id=3 looks like this:

.../entity/CorporateUser/3?fields=*

Yet I cant find a way to return all CorporateUsers.

Usually in a REST API this would simply be:

.../entity/CorporateUsers/

and if you wanted a specific user you would include the id: .../entity/CorporateUsers/3

So how can I get a list of all CorporateUsers?

Thanks

spryce
User
Posts: 2
Joined: Wed Jul 20, 2016 1:54 am

Re: How to return all entities of type x?

Post by spryce » Wed Jul 20, 2016 4:29 am

I found I can use something like this to get a result:

.../query/CorporateUser?fields=name,id&where=id%3E0

Surely that is not the best way to do this?

Please advise.

DanJSupport
User
Posts: 46
Joined: Mon Aug 15, 2016 9:57 am

Re: How to return all entities of type x? - 02309317

Post by DanJSupport » Mon Aug 15, 2016 10:16 am

Hi Spryce,

This is Dan with Bullhorn Support. The best way to get a list of all the CorporateUsers would be a query such as:

query/CorporateUser?where=enabled=true&fields=id&count=500

This will return all the enabled users.

Thanks,
Dan
Bullhorn Support
Dan Johnson
Tier 2 / Enterprise Support
Bullhorn Support US: 617-478-9126
Bullhorn Support UK: 44 800 032 2848
Bullhorn Support Australia: 61 28 073 5089
Bullhorn Support International: 617-478-9131

Post Reply