Page 1 of 1

How to return all entities of type x? - 02309317

Posted: Wed Jul 20, 2016 3:52 am
by spryce
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

Re: How to return all entities of type x?

Posted: Wed Jul 20, 2016 4:29 am
by spryce
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.

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

Posted: Mon Aug 15, 2016 10:16 am
by DanJSupport
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