'400: Bad Request' when I try to use Accelerated Queries API endpoint on Postman | Community
Skip to main content
New Participant
June 17, 2023
Solved

'400: Bad Request' when I try to use Accelerated Queries API endpoint on Postman

  • June 17, 2023
  • 1 reply
  • 2349 views

I got the following SQL statement:

 

SELECT DISTINCT branchID, branchName FROM ds_sucursales WHERE branchName IS NOT NULL LIMIT 5

 

ds_sucursales is a dataset based on a branch type schema. The statement was saved on Query Service UI with the ID 4aaf637a-0712-4342-b549-4e77c0382057.

 

I want to execute the statement using the Accelerated Queries API endpoint on Postman, so I follow the Accelerated Queries API Endpoint Doc.

 

I put the request headers. Likewise, I include the Postman generated headers, that include Accept, Accept-Encoding, etc.

 

Then, I put the request body:

 

 

I get ACCELERATED_STORE_DATABASE and ACCELERATED_STORE_SCHEMA using the following SQL statement:

 

SHOW SCHEMAS

 

Query response showed two databases and two schemas:

DATABASESCHEMA
qsaccelprofile_agg
cjm_qsaccelcjm_reporting_aggs

 

I built the dbName using the following pattern:

 

{SANDBOX_NAME}:{ACCELERATED_STORE_DATABASE}.{ACCELERATED_STORE_SCHEMA}

 

 

When I try to send the request, I get the error:

 

I also tried to build the dbName using the another database and schema, but it doesn't work. Likewise, I tried to build the dbName using the following pattern:

 

{SANDBOX_NAME}:{ACCELERATED_STORE_DATABASE}:{ACCELERATED_STORE_SCHEMA}

 

I tried this one because request sample uses : instead of . on dbName. But when I send the request I get a 500: Internal Server Error:

 

What am I doing wrong?

 

Thanks in advance

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by adobechat

@edgar_herrera 

A '400 Bad Request' error typically indicates that the server could not understand the request due to invalid syntax. This can often occur because of incorrect headers, query parameters, or body in the HTTP request - please check keys, org id, access token, JSON body and also if you and retry.

Firstly, try endpoint as

https://platform.adobe.io/data/foundation/accelerated-query/queries

Let me know.

Thanks

Madhan

1 reply

adobechat
adobechatAccepted solution
New Participant
June 22, 2023

@edgar_herrera 

A '400 Bad Request' error typically indicates that the server could not understand the request due to invalid syntax. This can often occur because of incorrect headers, query parameters, or body in the HTTP request - please check keys, org id, access token, JSON body and also if you and retry.

Firstly, try endpoint as

https://platform.adobe.io/data/foundation/accelerated-query/queries

Let me know.

Thanks

Madhan