WesselsW
WesselsW

Reputation: 69

Query on JSON response returns, Parse exception Unexpected end of input

Good day,

Hope you are well.

I am trying to use the Vincere API, and trying to query the response to only return where private_job:0. I am using Postman to test the API.

When I use the below request, doing my best to follow the instructions on the Documentation:

https://domain.vincere.io/api/v2/job/search/fl=job_title,private_job;sort=published_date asc?q=private_job:0

I get the following response:

"Parse exception Unexpected end of input, expected term_char, ws0, term or term_end (line 1, pos 14):\nprivate_job:0\n             ^\n"

If I remove ?q=private_job:0, I get a valid response.

I am clearly doing something wrong. Please assist.

Upvotes: 0

Views: 282

Answers (2)

C Sinclair
C Sinclair

Reputation: 186

This stumped me as well, turns out my issue was twofold.

Firstly, this error refers to their URL parser expecting to see the end character %23, so your query string needs to end with that.

Secondly, I was attempting to query the job_type and using the actual string value ie. job_type:PERMANENT%23. This actually needs to be the enum value (1 in this case).

Upvotes: 0

PDHide
PDHide

Reputation: 19979

in query parameter the key name is q ,

q=private_job:0

but in documentation it says instead of q it should be fq

https://domain.vincere.io/api/v2/job/search/fl=job_title,private_job;sort=published_date asc?fq=private_job:0

Also if you are using special character q=private_job:0 # , then give the value in the query parameter session of postman it will url encode it automatically for you

Upvotes: 1

Related Questions