Hi,
I’m having problems to invoke ADD action using Rest API without URL rewrite. I’ve succesfully LOGGED IN and invoke VIEW action by REST API. I know I have to use Bearer token to call API methods.
But when I execute this on Postman:
URL: localhost/myfirstproject/api?action=add&object=tarea&area_responsable=6&procede=0
Method: POST
I get this message:
{
“success”: false,
“failureMessage”: “Failed to execute SQL. Error: SQLState: 42000\nError Code: 102\nMessage: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Incorrect syntax near ‘)’.\n (102)”,
“version”: “16.0.16”
}
As you see this an SQL syntax error, but I don’t know what the error is beacuse I don’t know the executed query.
The user I’m using for this test has add permissions to this table (tarea).
I’m using correct Bearer token (if it wasn’t the responde would be another one realted to permissions).
In DB, “area_responsable” and “procede” columns are int and tinyint respectively.
“Tarea” table has much more columns, but I’ve tried even trying to make an insert copying data from an existing register in db and adapting to an URL parameter format, having no luck. That’s the reason I’ tried to do the insert action using less parameters.
PHPMaker version 2020.0.16 (this is a problem I’m dealing with previous version of v2020)
Any idea or suggestion?
Another question: does anyone know if INSERT action of REST API also makes the same validations set on Fields Settings? or it just executes an insert directly to DB?