Comments (8)
Just tried sending "{}" as the body and that worked, a bit odd though?
from api-docs.
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....
from api-docs.
Regarding the “invalid JSON”, are you sending a Content-Type: application/json
header with the DELETE request? I think if you do that, it expects a JSON body, and an empty body is not valid JSON. That's why the {}
body works. A cleaner solution, I think, is to omit the Content-Type header.
from api-docs.
Regarding IDs: The API thinks about record IDs as just integers. If you're seeing record bodies that include id: "Record 3"
or something similar, it's probably because you have an column in your sheet named “ID”. This will shadow the real ID. The best thing to do is to name that column something else. (Sorry, this is a bit awkward, and we'll come up with a better solution in the future.)
from api-docs.
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?
from api-docs.
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!
from api-docs.
Yep, the advice was good, all sorted now!
from api-docs.
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.
from api-docs.
Related Issues (14)
- Feature Request: Query by saved views HOT 4
- Access last or first item, Pagination or Sheet info HOT 2
- Feature Request: Access to column names HOT 6
- afterChange fired multiple times HOT 2
- Metadata API: Access the sheet to which a field/column is linked HOT 1
- Fetching image field and uploading to cloudinary fails HOT 1
- Return All Books HOT 3
- Formula data in responses HOT 1
- Add new fields to a sheet
- Feature Request: updated_at field HOT 3
- Feature Request: filter/query by list of items HOT 1
- Feature request: Eager loading related rows HOT 16
- Feature request: change notification via webhook HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from api-docs.