I’m in a company that have worked in GoodData platform for a few months now, and to prepare our switching to the Growth plan (we are in free plan from now), I was trying to make the API calls work with a local software : Postman.
Yet, despite the detailed documentation about APIs I found here : https://help.gooddata.com/doc/enterprise/en/expand-your-gooddata-platform/api-reference#section/Use-Cases, I was not able to even log in with Postman. I suppose something is missing, I receive an answer 400 - Bad request, but I’m not understanding what. Does somebody has an idea? Thanks in advance, I’ll help me a lot understanding what are the basics of the GoodData API I’m missing!
NB : I’m precising that I’m the administrator of the Free Domain
What I’m trying to call :
Method : POST
URL : https://<my_company_domain>.on.gooddata.com/gdc/account/login
- Content-Type = application/json
- Accept = application/json
- User-Agent = PostmanRuntime-Login/7.28.0
Thanks for your help!
NB : the exact error message answered :
Best answer by Moises MoralesView original
This error usually indicates that the code in your body request is incorrect. Can you please make sure you are not missing any brackets and avoid any formatting between the double quotes for the value in “login” and “password”?
If the request is not successful again, please send over here the error_id so we can look further into it.
Thanks for your answer! I’ve checked the number of brackets, they are correct, and except the “@” of the mail adress, there is neither space or special character in the login string. Still it doesn’t work.
I’ve received the following error_id when I tried again :
I can see your request is failing with this error:
Can you please make sure it looks as follow (you must use your own domain):
Ok it works, thanks for your help! I compared the number of headers, and my error was coming from that.
For the rest of the community who may face the same issue : An additional header is required for the query to work :
- Content-Length = <number_of_characters in your body (integer)>
- Host = <autogenerated by Postman> : it was necessary to make the API understand that the login was expected on the domain sent in the URL