Skip to content
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

Add Delete blocks #144

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

Add Delete blocks #144

wants to merge 10 commits into from

Conversation

tothmano
Copy link
Collaborator

@tothmano tothmano commented Nov 7, 2024

restapi/delete-blocks.mdx Outdated Show resolved Hide resolved
Copy link
Member

@dominicchapman dominicchapman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of comments for consideration here, but mhr3 better placed to give green light.

restapi/delete-blocks.mdx Outdated Show resolved Hide resolved
sidebarTitle: 'Delete blocks'
---

After data ingestion, Axiom stores events in blocks of tens of thousands of events. You cannot delete individual events after you send them to Axiom, but you can delete entire blocks of data. With the `/v2/datasets/_apl/delete` endpoint, you can specify an APL query and delete all blocks that contain matching events.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You cannot delete individual events after you send them to Axiom

right now you cannot, that will hopefully change in the future

After data ingestion, Axiom stores events in blocks of tens of thousands of events. You cannot delete individual events after you send them to Axiom, but you can delete entire blocks of data. With the `/v2/datasets/_apl/delete` endpoint, you can specify an APL query and delete all blocks that contain matching events.

<Warning>
The `/v2/datasets/_apl/delete` endpoint deletes all blocks containing events that match your query. For example, even if a block only contains one event that matches your query, the endpoint removes all 65,536 events in the block. For this reason, using this endpoint may remove more data than your query specifies.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all 65,536 events

there could be anywhere from 1 to a few million events in a block

<Warning>
The `/v2/datasets/_apl/delete` endpoint deletes all blocks containing events that match your query. For example, even if a block only contains one event that matches your query, the endpoint removes all 65,536 events in the block. For this reason, using this endpoint may remove more data than your query specifies.

Deleting data using this endpoint is slow and expensive. Only use this endpoint when you have sent sensitive data to Axiom by mistake and you need to immediately delete it for regulatory reasons.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for regulatory reasons

do we need to specify reason they have for deletion?


Deleting data using this endpoint is slow and expensive. Only use this endpoint when you have sent sensitive data to Axiom by mistake and you need to immediately delete it for regulatory reasons.

Use the block deletion endpoint for deleting less than one million rows in one request. To delete more than one million rows, send a number of requests and delete a limited number of rows in each request. If you delete too many rows in one request, the request might fail unexpectedly.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might fail unexpectedly.

If we're telling them about it, is it unexpected?


## Best practices

- Start with a dry run. Set `commit` to `false` to safely review which events are to be deleted by your request.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Start with a dry run. Set `commit` to `false` to safely review which events are to be deleted by your request.
- Start with a dry run. Set `commit` to `false` to safely review the number of events to be deleted by your request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants