question

Upvotes
Accepted
3 0 0 3

{"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"]}
datascope-select#product
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

@ejaner

Hi,

Thank you for your participation in the forum.

Are any of the replies below satisfactory in resolving your query?

If yes please click the 'Accept' text next to the most appropriate reply. This will guide all community members who have a similar question.

Otherwise please post again offering further insight into your question.

Thanks,

AHS

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,


AHS

Upvotes
Accepted
79.1k 250 52 74

@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.


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
14.2k 30 5 10

Hi @ejaner ,

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

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
3 0 0 3
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!


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.