-
Notifications
You must be signed in to change notification settings - Fork 17
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
Deleting an item #11
Comments
Just tried sending "{}" as the body and that worked, a bit odd though? |
I've tried deleting items created through the API that have their ID set to 'Record X'. Sending it to the API as 'record_x' didn't work as the API wants a number and changing it to 'x' seemed to work (returned 204) but it's still there on a refresh.... |
Regarding the “invalid JSON”, are you sending a |
Regarding IDs: The API thinks about record IDs as just integers. If you're seeing record bodies that include |
The record should be gone from the sheet after you delete it, though. When you say “still there on a refresh”, are you refreshing the sheet view? The record detail page? What exactly? |
Yep sending json content type with all requests. Works with the GET request but did wonder if the DELETE was getting confused by that. I'll probably remove it where it's not necessary (making an iOS SDK incidentally, will tell you when it's usable!) You're right that I have an ID field... For no reason at all.... Especially seeing as there's an underlying one. Probably best to prevent people naming their columns the same as any under the hood for now at least! Or maybe the special Id should be named something like fieldbook_id? Not necessarily an easy change though! I'll get rid of my id column and see if that works better! Thanks for the help! |
Yep, the advice was good, all sorted now! |
Great! Yes, we plan to have a better way to deal with conflicting field names in the future. For now, if you're using the API, just avoid having an “ID” field. |
Hi,
I'm trying to delete a record with the API, following the docs here. They just say to call DELETE .../book/sheet/record but I get a 400 response from the API stating 'invalid json, empty body'... so is there some json I should also be providing?
The text was updated successfully, but these errors were encountered: