0

This sanitized cURL query works fine [1]:

curl -X POST https://adb-<workspaceId>.azuredatabricks.net/api/2.0/sql/statements/ \
-H "Authorization: Bearer <myPersonalAccessToken>" \
-H "Content-Type: application/json" \
-d '{
  "warehouse_id": "<myWareHouseId>",                                                                                     
  "catalog": "hive_metastore",                                                                                            
  "schema": "dev.bronze",                                                                                              
  "statement": "SELECT * FROM dev.bronze.shawn_test_table;"
}'

Unfortunately, when I try to put the cURL command into the desktop version of Power Automate, I get the error:
{"error_code":"MALFORMED_REQUEST","message":"Invalid JSON given in the body of the request - failed to parse given JSON"}

My Parameters for Power Automate Invoke Web Service

What am I doing wrong in Power Automate?

[1] - Various AI engines helped write that query.
[2] - See Also: Arrogant Sage Media, "Power Automate Desktop - Connect to API, Read & Process JSON & Create and Post JSON", YouTube: https://www.youtube.com/watch?v=RSWqw8kJYrw , June 14, 2023, Last Visited: August 23, 2024

2
  • what are trying to do here? are you trying to execute your script using REST API? Commented Aug 23, 2024 at 3:53
  • @RakeshGovindula - I'm trying to run the cURL command shown above in Microsoft Power Automate. The cURL command has been sanitized to remove sensitive information, but it works fine. The problem is I can't get the Invoke Web Service step of MS Power Automate to work. Commented Aug 23, 2024 at 13:27

1 Answer 1

2

Eventually, Microsoft Copilot clued me in on the problem by telling me more than once to check the "Encode Request Body" option. It suggested that I turn the option on, but ironically, the solution was to turn the feature off. enter image description here

You will find the "Encode request body" switch in the Advanced section on the current version of Power Automate.

The setting was apparently on by default for my program.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.