{"error":{"code": UNICODE,"message":"Bad Request - Error in query syntax."}}

I am having trouble understanding the issue with my error:

{"error":{"code":"56fd4342-550b-46f2-89ef-4fe959695b15","message":"Bad Request - Error in query syntax."}}

I've reviewed my syntax for the request several times and it seems okay. is there anywhere I can go to look up more details regarding this error?

edit: this can be ignored, I entered the link correctly and got the following message (with IDs removed):

@{"@odata.context":"https://selectapi.datascope.refinitiv.com/RestApi/v1/$metadata#RawExtractionResults/$entity","JobId":"________","Notes":["Extraction Services Version 17.0.1.45073 (______), Built Feb 9 2023 16:14:08\nUser ID: ______\nExtraction ID: _______\nCorrelation ID: CiD/_____/_______/RESTAPI-I/EXT._______\nSchedule: __________(ID = _______)\nInput List (2 items): (ID = ________) Created: 03/13/2023 17:06:39 Last Modified: 03/13/2023 17:06:39\nReport Template (20 fields): ________(ID = _______) Created: 03/13/2023 16:54:00 Last Modified: 03/13/2023 16:54:00\nSchedule dispatched via message queue (__________), Data source identifier (____________)\nSchedule Time: 03/13/2023 16:54:00\nProcessing started at 03/13/2023 16:54:00\nProcessing completed successfully at 03/13/2023 17:06:40\nExtraction finished at 03/13/2023 17:06:40 UTC, with servers: _______, TRTH (738.781 secs)\nInstrument expanded to 12 RIC instances: ESH24 to ESZ3.\nInstrument expanded to 20 RIC instances: ESH24-M24 to ESZ3-M24.\nTotal instruments after instrument expansion = 32\n\n\nQuota Message: WARNING: Not permissioned to extract Instrument (RIC, ESH3) - Not in Broker Package\nQuota Message: WARNING: Not permissioned to extract Instrument (RIC, ESH3-M3) - Not in Broker Package\nQuota Message: WARNING: Not permissioned to extract Instrument (RIC, ESM3) - Not in Broker Package\nQuota Message: WARNING: Not permissioned to extract Instrument (RIC, ESU2) - Not in Broker Package\nQuota Message: WARNING: Not permissioned to extract Instrument (RIC, ESU2-H3) - Not in Broker Package\nQuota Message: WARNING: Not permissioned to extract Instrument (RIC, ESU2-M3) - Not in Broker Package\nQuota Message: WARNING: Not permissioned to extract Instrument (RIC, ESU2-Z2) - Not in Broker Package\nQuota Message: WARNING: Not permissioned to extract Instrument (RIC, ESU3) - Not in Broker Package\nQuota Message: WARNING: Not permissioned to extract Instrument (RIC, ESZ2) - Not in Broker Package\nQuota Message: WARNING: Not permissioned to extract Instrument (RIC, ESZ2-H3) - Not in Broker Package\nQuota Message: WARNING: Not permissioned to extract Instrument (RIC, ESZ2-M3) - Not in Broker Package\nQuota Message: WARNING: Not permissioned to extract Instrument (RIC, ESZ24) - Not in Broker Package\nQuota Message: WARNING: Not permissioned to extract Instrument (RIC, ESZ3) - Not in Broker Package\n"]}

Best Answer

  • Jirapongse
    Jirapongse ✭✭✭✭✭
    Answer ✓

    @ejaner

    According to the new information, you got the Notes in the HTTP response which means that the syntax of the request message is correct.

    The Notes indicate permission issues. You may need to contact your Refinitiv Account team or Tick History support team directly via MyRefinitiv to check your permissions.


Answers

  • Hi @ejaner ,

    Could you please provide the endpoint you've been using for a further suggestions? and the request header and body if possible.

  • ejaner
    ejaner Newcomer
    requestUrl = "{}/Extractions/ExtractRaw".format(url_base) 
    requestHeaders = {
         "Prefer":"respond-async",
         "Content-Type":"application/json",
         "Authorization": "token " + token
    }
    contents = open(json_test, 'rb').read()
    jsonExtracRawResp = requests.post(requestUrl, data=contents, headers=requestHeaders)  

    contents is the attached text file saved as a json futures_TimeAndSales.txt

    @raksina.samasiri thanks for checking!