Hi everyone,
I'm trying to make a POST request to the Snowflake Cortex API (using the endpoint described here), but it's not working in Copilot Studio.
HTTP request failed with status code 400 BadRequest. Error code: HttpRequestFailure.
Here's the situation:
- I’m using the same Body and Headers in both Postman and Copilot Studio.
- The request successfully returns a 200 status in Postman with the same data.
- However, in Copilot Studio, I’m getting no response or an error.
I was wondering if there's something specific I need to adjust in Copilot Studio that might differ from Postman? Could the issue be with how the Body is formatted, or is there something else I should check with the request setup?
Content-Type: application/json
Authorization: Bearer <token>
X-Snowflake-Authorization-Token-Type: KEYPAIR_JWT
{
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "find client TEST"
}
]
}
],
"semantic_model_file": "@DB.SCHEMA.STAGE/SEMANTICFILE.yaml"
}
Yaml Portion:
- kind: HttpRequestAction
id: Ym4X1Z
displayName: CortexREST
method: Post
url: =Topic.CortexAPIEndpoint
headers:
Authorization: Bearer ey...
Content-Type: application/json
X-Snowflake-Authorization-Token-Type: KEYPAIR_JWT
Any insights or troubleshooting steps would be greatly appreciated!
Thanks!