Hi Team,
I am trying to add new row to a datatable through data action. Below is the request template.
{
"requestUrlTemplate": "/api/v2/flows/datatables/${input.datatableid}/rows",
"requestType": "POST",
"headers": {
"Content-Type": "application/json"
},
"requestTemplate": "{\n "datatableid": "${input.datatableid}",\n "stringoutput": "${input.stringoutput}", \n "Key": "${input.Key}"\n}"
}
I am getting additional properties not allowed error.
{
"message": "The request could not be understood by the server due to malformed syntax.",
"code": "bad.request",
"status": 400,
"messageParams": {},
"contextId": "340264f1-ac23-4809-9936-bffd7d341a02",
"details": [
{
"errorCode": "ACTION.REMOTE_ENDPOINT"
}
],
"errors": [
{
"message": "REST call for action execute failed. Message: Request to backend service failed. Response from web service: {"message":"Additional properties are not allowed ('stringoutput', 'datatableid' were unexpected)\n\nFailed validating 'additionalProperties' in schema:\n {'$schema': 'http://json-schema.org/draft-04/schema#',\n 'additionalProperties': False,\n 'datatableId': 'e1d58615-1bf9-4080-a355-a292307c4026',\n 'properties': {'key': {'$id': '/properties/key',\n 'displayOrder': 0,\n 'maxLength': 256,\n 'minLength': 1,\n 'title': 'item',\n 'type': 'string'},\n 'string output': {'$id': '/properties/string output',\n 'displayOrder': 1,\n 'maxLength': 262144,\n 'minLength': 0,\n 'title': 'string_output',\n 'type': 'string'}},\n 'required': ['key'],\n 'title': 'testing api',\n 'type': 'object'}\n\nOn instance:\n {'datatableid': 'e1d58615-1bf9-4080-a355-a292307c4026',\n 'key': '26a141c1-6c30-4530-bd91-9797ce25d65e',\n 'string output': '',\n 'stringoutput': 'hi mansi'}","code":"flows.datatables.schema.exception","status":400,"messageParams":{},"contextId":"3b164e76-6fa2-4497-9a98-6b110ce409ca","details":[],"errors":[]} [340264f1-ac23-4809-9936-bffd7d341a02]",
"code": "BAD_REQUEST",
"status": 400,
"messageParams": {},
"details": [],
"errors": []
}
]
}
I checked this on developer tools and its working fine there but failing in data actions.
Please help me solve this error, guide me on whats wrong.
Thank you