-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't add rows via API #1523
Comments
I don't know why, but with this escaped expression it is working:
Shouldn't be like that, or? |
Now in this example you need to escape it, otherwise you already have open double quotes. In the holidays i did some stuff and never had an issues with creating rows: https://codeberg.org/blizzz/fahrplan2tables/src/branch/main/src/Domain/Tables/Manager.php#L51-L57 Might be n8n is doing something there? 🤷 |
To check this I tried with curl -X 'POST' -u demo:'password'\
'https://wolke.netzinstitut.de/ocs/v2.php/apps/tables/api/2/tables/33/rows' \
-H 'accept: application/json' \
-H 'OCS-APIRequest: true' \
-H 'Content-Type: application/json' \
-d '{
"data": {
"columnId": 233,
"value": "Augusto"
}
}'
{"ocs":{"meta":{"status":"failure","statuscode":500,"message":""},"data":{"message":"Es ist ein unerwarteter Fehler aufgetreten. Weitere Details findest du in den Protokollen. Bitte wende dich an deine Administration."}}}%
Using the escaped format works as well: curl -X 'POST' -u demo:'password'\
'https://wolke.netzinstitut.de/ocs/v2.php/apps/tables/api/2/tables/33/rows' \
-H 'accept: application/json' \
-H 'OCS-APIRequest: true' \
-H 'Content-Type: application/json' \
-d '{"data": "{\"233\":\"Augusto\"}" }'
{"ocs":{"meta":{"status":"ok","statuscode":200,"message":"OK"},"data":{"id":3030,"tableId":33,"createdBy":null,"createdAt":null,"lastEditBy":null,"lastEditAt":null,"data":[{"columnId":233,"value":"Augusto"}]}}}% |
It's not an issue on our side (endpoint are also used from the web ui, for instance). Perhaps try |
Steps to reproduce
I'm trying to write a row via API to a table. To achieve this I'm using the HTTP request node of n8n. No matter if I'm using the API v1 or v2 I can't successfully execute the command. In the log of Nextcloud I'm getting
This is the body I'm trying to send:
Other commands like
GET /index.php/apps/tables/api/1/tables/33/columns
are working and it can be clearly seen that table33
has a column233
:The same with
GET /index.php/apps/tables/api/1/tables/33/rows
Expected behavior
Write the row.
Actual behavior
No line is written.
Tables app version
0.8.2
Browser
Firefox 133.0.3
Client operating system
Manjaro Linux
Operating system
Ubuntu 22.04
Web server
Apache
PHP engine version
PHP 8.2
Database
MariaDB
Additional info
No response
The text was updated successfully, but these errors were encountered: