-
Notifications
You must be signed in to change notification settings - Fork 2
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
RS-418: Document new API for record removing #93
Conversation
atimin
commented
Sep 4, 2024
•
edited
Loading
edited
- Refactored the Entry API section
- Documented the new endpoints
- Extended the Data Management guide with examples of how to remove data using SDKs and HTTP API.
Azure Static Web Apps: Your stage site is ready! Visit it here: https://salmon-bush-0fb136503-93.westeurope.5.azurestaticapps.net |
1 similar comment
Azure Static Web Apps: Your stage site is ready! Visit it here: https://salmon-bush-0fb136503-93.westeurope.5.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://salmon-bush-0fb136503-93.westeurope.5.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://salmon-bush-0fb136503-93.westeurope.5.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://salmon-bush-0fb136503-93.westeurope.5.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://salmon-bush-0fb136503-93.westeurope.5.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://salmon-bush-0fb136503-93.westeurope.5.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://salmon-bush-0fb136503-93.westeurope.5.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://salmon-bush-0fb136503-93.westeurope.5.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://salmon-bush-0fb136503-93.westeurope.5.azurestaticapps.net |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice structure! I only found small typos and had some thoughts to check in the comments.
<> | ||
The method removes a record from an entry or the entire entry. | ||
If the `ts` query parameter is set, the record with the timestamp is removed. | ||
Otherwise, the entire entry is removed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By reading the statement, I realized that it could be risky (if someone set ts to None accidentally). InfluxDb makes the time range mandatory: https://docs.influxdata.com/influxdb/v2/write-data/delete-data/
Maybe something for another release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just realized that you have the "Remove records within a time range" endpoint. Maybe that endpoint can also remove a single record (for example if start = stop), and the /api/v1/b/:bucket_name/:entry_name removes the entire entry
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's dangerous if you use the HTTP API directly, but in the SDKs it's wrapped in methods. My intention was to keep the same structure of endpoints as for read and write operations, assuming that users would use SDKs or wrap the HTTP calls and test them.
description: | ||
"A UNIX timestamp in microseconds. If not set, the query starts from the oldest record in the entry.", | ||
dataType: "Integer", | ||
isRequired: false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not mandatory to set the time range?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, the idea is that you can use labels over the entire dataset. However, I can add a check to return an error when no parameter is set to prevent deleting the entire entry.
<> | ||
The method removes a batch of records from an entry. The list of records to remove is sent in the headers of | ||
the request. | ||
See the Batch Protocol section for more details. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If possible adding link to "http-api/entry-api#batch-protocol"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't find how =( This must be a versioned link and it works only for md links like [...](..)
. I can add the link in the introduction text of the section.
Azure Static Web Apps: Your stage site is ready! Visit it here: https://salmon-bush-0fb136503-93.westeurope.5.azurestaticapps.net |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect!