Subscription ids and how to create one

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

Moderators: StaffingSupport, s.emmons, BullhornSupport

Post Reply
jeffsacco
User
Posts: 6
Joined: Thu Jul 25, 2013 1:32 pm

Subscription ids and how to create one

Post by jeffsacco » Tue Jul 30, 2013 3:15 pm

Hello all

This is my first post to the forum. I am trying to get some guidance on the GET /event call. The API documentation references a subscriptionId as part of the call and I just cannot figure out how to create this subscriptionid. Is there another end point in the API I need to call to create this subscriptionId, are there some pre-built subscriptionId's?

Any help or guidance would be appreciated with some step by step instructions.

Thanks in advance.

s.emmons
User
Posts: 333
Joined: Wed Dec 31, 1969 8:00 pm

Re: Subscription ids and how to create one

Post by s.emmons » Tue Aug 06, 2013 11:26 am

Hi jeffsacco,

You need to create the subscription first before running the GET call to retrieve any events queued up to that subscription.

Using a PUT call, you can create a subscription by passing the following URI:

https://rest.bullhorn.com/e999/event/su ... ED,DELETED

In this example, "Abcde" would become the subscriptionId, so you can name it yourself when you run the PUT call. Note: names and eventTypes parameters must be comma separated. This example would be setting up a subscription to just listen for Candidate events, but you can use one subscriptionId to listen to mulitple entities.

A successful PUT /event call will return a response like this:

Code: Select all

{'lastRequestId': 0,
'subscriptionId': 'abcde',
'createdOn': 1335285871323,
'jmsSelector': "JMSType='ENTITY' AND BhCorpId=44 AND
BhEntityName='Candidate' AND BhEntityEventType IN
('UPDATED','INSERTED','DELETED')"}
Once the subscription is created, you can use the GET /event call to retrieve events. For further information on both of these calls, please refer to the REST reference documentation starting on page 35: http://developer.bullhorn.com/sites/def ... TAPI_0.pdf
Sam Emmons
Enterprise Team Lead
BULLHORN
US Support 617-478-9126

Post Reply