Post

2 followers Follow
0
Avatar

Queries on /data/ fail

Hi, I have run into a problem that I hope you can help me with.
I am building a web application that utilises your API and I try to query some data from the API.
I authenticate and log in just fine, and getting metadata also works.
However any query I try on the /data/ path results in a 500 Internal Server error returned. This goes for query, entityQuery, etc.

 

If I for instance retrieve /metadata/describeEntities on JobTitle I get a result just fine, but then running an entityQuery on JobTitle fails.

 

 

I understood that you have updated your service to only accept TLS 1.2+ recently, but according to a test query to https://www.howsmyssl.com/a/check my browser and code support up to TLS 1.3 so that should be alright, right?

Since I am developing on localhost there can't be an SSL certificate on my end but unless I understand the protocol wrong that shouldn't be required to issue a GET/POST request with authorization.

 

 

I am using AJAX in JavaScript to consult the API, example included below:

$.ajax({
type: "POST",
url: apiURL + "/data/entityQuery",
headers: {
    "Authorization": "Session " + sessionId
},
data: {
    typeName: "JobTitle",
},
success: function(res) {
    console.log(res);
}
});

 

Using a GET request yields the same result. What is going wrong?
I was expecting a normal error returned if I was messing up the syntax or anything, a 500 Internal has me at a loss.


Thanks!

Marijn Craenen Answered

Official comment

Avatar

Hello Marijn,

I've sent the exact request you are sending (using Postman) and it works fine. Can you please share the full URL you are using and when did you send the request?

 

Thanks

Elad Franklin
Comment actions Permalink

Please sign in to leave a comment.

2 comments

0
Avatar

Hi Elad,

I have now also tested it with Postman and that pointed me to my error, it was indeed in the URL that things went wrong.

Resolved!

Thanks for your time

Marijn Craenen 0 votes
Comment actions Permalink