Unable to search a tearsheet from description at query endpoint.

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

Moderators: StaffingSupport, s.emmons, BullhornSupport

Post Reply
hitesh30
User
Posts: 6
Joined: Wed May 05, 2021 6:12 am

Unable to search a tearsheet from description at query endpoint.

Post by hitesh30 »

Hello Team,

Unable to search a tearsheet using description string:-

lv_url = "My_URL/query/Tearsheet?fields=id,name,candidates,owner,isPrivate,isDeleted,description"

body = { "where": "description = 'pool_outreach_tearsheet_1'"}

headers = {"Content-Type": "application/json"}
response = requests.post(lv_url, data = json.dumps(body), headers = headers)
response.json()

Getting an error message: "{'errorMessage': 'javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not extract ResultSet',
'errorCode': 400}"

Thank You
juanvargas
User
Posts: 9
Joined: Fri Oct 16, 2020 9:15 am

Re: Unable to search a tearsheet from description at query endpoint.

Post by juanvargas »

Hello,

In a GET Request everything should be present within the URL.

As long as you follow the format you should be able to execute the call without error and get a 200 response.

Example Queries to search against tearsheets:
query/Tearsheet?fields=id,name,candidates,owner,isPrivate,isDeleted,description&BhRestToken=(xxxx)&where=name='Test'

query/Tearsheet?fields=id,name,candidates,owner,isPrivate,isDeleted,description&BhRestToken=(xxxx)&where=description='pool_outreach_tearsheet_1'

Let me know if you are able to query against the tearsheets and if you have any questions. Thank you!
hitesh30
User
Posts: 6
Joined: Wed May 05, 2021 6:12 am

Re: Unable to search a tearsheet from description at query endpoint.

Post by hitesh30 »

Hello,

Trying to get all candidates added to a tearsheet using the following logice but getting an error 400.

{corpToken}/entity/{entityType}/{id}/{toManyFieldName}s?fields={field-list}

Using the following code in python:

lv_url = f"My_URL/entity/Tearsheet/{Tearsheet_ID}/Candidates?fields=id,firstName"
response = requests.get(lv_url, headers = {"Content-Type": "application/json"})
print(response.json())

Get the following error:

{'errorMessage': 'Unknown or badly structured command: /entity/Tearsheet/4XXX7/Candidates/.', 'errorMessageKey': 'errors.badCommand'}

Pleas help.

Thank You
Post Reply