Hi experts,
I have created a connector to a tutorialDB in Cloud MySQL. I have also created an integration to the connector to GET information by employeeID.
By default the exmployID=1. The testing of the integration is successful.
I created a proxy api the the integration. "Set Integration Request" was attached to Preflow's Resuest flow by default. And a parameter with name "employeeID" was set with default value 2.
The test was successful by url: https://myServerIP/dbget .
However, test was failed by url: https://myServerIP/dbget?emplyeeID=1
The full error msg was as below:
{"error":{"code":400,"message":"Invalid JSON payload received. Unknown name \"employeelD\": Cannot bind query parameter. Field 'employeelD' could not be found in request message.","status":"INVALID_ARGUMENT","details":[{"@type":"type.googleapis.com/google.rpc.BadRequest","fieldViolations":[{"description":"Invalid JSON payload received. Unknown name \"employeelD\": Cannot bind query parameter. Field 'employeelD' could not be found in request message."}]}]}}
Appreciate any suggestions!
The error message you posted appears to refer to
employeelD
Maybe what you want is
employeeID
the first version is lowercase L. The second version is uppercase I.
Just a guess here.
Hi,
Thanks for pointing the mistake. However, I have noticed the typo and corrected it. There is still the problem.
{
"error": {
"code": 400,
"message": "Invalid JSON payload received. Unknown name \"employeeID\": Cannot bind query parameter. Field 'employeeID' could not be found in request message.",
"status": "INVALID_ARGUMENT",
"details": [
{
"@type": "type.googleapis.com/google.rpc.BadRequest",
"fieldViolations": [
{
"description": "Invalid JSON payload received. Unknown name \"employeeID\": Cannot bind query parameter. Field 'employeeID' could not be found in request message."
}
]
}
]
}
}
Here is the Set Integration Request file content:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<SetIntegrationRequest continueOnError="false" enabled="true" name="set-integration-request">
<DisplayName>Set Integration Request</DisplayName>
<ProjectId>nth-mantra-361012</ProjectId>
<IntegrationName>tutorialDBGet</IntegrationName>
<IntegrationRegion>asia-northeast1</IntegrationRegion>
<ApiTrigger>api_trigger/tutorialDBGet_API_GET</ApiTrigger>
<Parameters>
<Parameter name="employeeID" type="string">{request.queryparam.employeeID}</Parameter>
</Parameters>
</SetIntegrationRequest>
command:
https://34.160.58.180.nip.io/dbget?employeeID=123
Response:
{
"error": {
"code": 400,
"message": "Invalid JSON payload received. Unknown name \"employeeID\": Cannot bind query parameter. Field 'employeeID' could not be found in request message.",
"status": "INVALID_ARGUMENT",
"details": [
{
"@type": "type.googleapis.com/google.rpc.BadRequest",
"fieldViolations": [
{
"description": "Invalid JSON payload received. Unknown name \"employeeID\": Cannot bind query parameter. Field 'employeeID' could not be found in request message."
}
]
}
]
}
}
The field I see in your screenshot is "employee_id". Did you try that?
hi,
Finally the problem was resolved by adding Assignmessage policy step before "Set Integration Request" policy step.
Thanks.