You can translate the question and the replies:

JSON HTTP Client

I have tested a call with a cursor url parameter in Postman without any issues. But, when I add the cursor url in Denodo, I receive an error. URL: https://api.mypurecloud.com/api/v2/analytics/conversations/details/jobs/##################/results?cursor=@{cursor} Error: {"message":"IOException reading next record: java.io.IOException: (line 1) invalid char between encapsulated token and delimiter","code":"bad.request","status":400,"messageParams":{},"contextId":"203f9058-54a1-4816-91ed-9b96bca91e88","details":[],"errors":[]} Any recommendations on how to debug this?
user
14-07-2020 16:27:55 -0400
code

5 Answers

Hi, It looks like there is additonal quotes you are putting either in the value of the cursor field or in the final request which is been sent from Denodo to your source as you are getting bad request error. I would probably reduce the log level of my Denodo Server to debug using this log category and executing this statement in VQL shell, to get more information on the exact request created by Denodo and troubleshoot the issue: `call logcontroller('com.denodo.parser.connection.http','DEBUG');` You can find more information on [Using logcontroller and useful log categories](https://community.denodo.com/kb/view/document/Using%20logcontroller%20and%20useful%20log%20categories?category=Operation) over here. Hope this helps!
Denodo Team
16-07-2020 03:41:38 -0400
code
Hi, I have not used a stored procedure in Denodo before. Do I execute this in VQL Shell? If so, I executed the following in VQL shell and executed: call logcontroller('com.denodo.parser.connection.http','DEBUG'); Response: Finished with error: The user does not have EXECUTE privileges on the procedure 'logcontroller' I have played around some since my initial question. I'm currently returning the following error: Finished with error: Error executing query. Total time 0.472 seconds. QUERY [PROJECTION] [ERROR] QUERY [SELECTION] [ERROR] GET_JOBID_RESULT_CURSOR1 [BASE] [ERROR] GET_JOBID_RESULT_CURSOR1 [JSON WRAPPER] [ERROR] GET_JOBID_RESULT_CURSOR1#0 [JSON ROUTE] [PARSE_ERROR] Received exception with message 'Error retrieving data from 'https://api.mypurecloud.com/api/v2/analytics/conversations/details/jobs/4137bc1a-5748-4545/results?cursor=Y3Vyc29yX3yNjg1NA=='. HTTP error code: 400.' I have found that the cursor value normally have an "=" character at the end which is represented as "%3D" when sent in a query. For testing purposes, I hardcoded by changing the "=" in my cursor to Y3Vyc29yX3yNjg1NA%3D%3D. Response: 'Error retrieving data from 'https://api.mypurecloud.com/api/v2/analytics/conversations/details/jobs/4137bc1a-5748-4545/results?cursor=Y3Vyc29yX3yNjg1NA%253D%**25**3D'. HTTP error code: 400.' I notice that Denodo added 25 between % and 3D. I have successfully tried this exact call using Postman: https://api.mypurecloud.com/api/v2/analytics/conversations/details/jobs/4137bc1a-5748-4545/results?cursor=Y3Vyc29yX3yNjg1NA**%3D%3D**
user
16-07-2020 11:35:13 -0400
Hi, You need to be an administrator to invoke the LogController stored procedure. You can find the manual on the same [here](https://community.denodo.com/docs/html/browse/latest/vdp/vql/stored_procedures/predefined_stored_procedures/logcontroller). Regarding your URL, I tried this exact URL when creating a JSON data source in Denodo using data route as HTTP Client with the Denodo 7.0 latest update: > https://api.mypurecloud.com/api/v2/analytics/conversations/details/jobs/4137bc1a-5748-4545/results?cursor=Y3Vyc29yX3yNjg1NA== And I get the HTTP 401 error rather than 400. This means its only the authentication issue and not the issue with Bad request. If you are still getting issue with bad request, I would recommend trying update your Denodo with latest update or log a ticket with Denodo Support Team.
Denodo Team
29-07-2020 05:50:11 -0400
code
Hi, I am gettign 400 error as well. I can run the API on web but when i run it on denodo its adding 25 before %26 and this is breaking the link. Any reference how to solve this? Error retrieving data from the API. This is the link from execution trace 'http://quickstats.nass.usda.gov/api/api_GET/?key=6CE3633D-8698-36BB-A143-EADF85F27BD0&source_desc=SURVEY&sector_desc=ANIMALS%2520%2526%2520PRODUCTS&group_desc=DAIRY&commodity_desc=BUTTER&statisticcat_desc=PRODUCTION&short_desc=BUTTER%20-%20PRODUCTION,%20MEASURED%20IN%20LB&year=2020&format=JSON'. HTTP error code: 400. Correct link: https://quickstats.nass.usda.gov/api/api_GET/?key=6CE3633D-8698-36BB-A143-EADF85F27BD0&source_desc=SURVEY&sector_desc=ANIMALS%20%26%20PRODUCTS&group_desc=DAIRY&commodity_desc=BUTTER&statisticcat_desc=PRODUCTION&short_desc=BUTTER%20-%20PRODUCTION,%20MEASURED%20IN%20LB&year=2020&format=JSON
user
18-05-2021 18:38:21 -0400
Hi, If the error related to the API persists then I would suggest you to set a higher log level and follow steps as suggested in this similar Community Question [HTTP 400 error](https://community.denodo.com/answers/question/details?questionId=9064u000000L8J4AAK&title=HTTP+400+error). Hope this helps!
Denodo Team
01-06-2021 05:28:36 -0400
code
You must sign in to add an answer. If you do not have an account, you can register here