Created
March 31, 2016 22:16
-
-
Save heitortsergent/56f097ce0cf4679bea1839d1f9db8b19 to your computer and use it in GitHub Desktop.
Deleting events from Keen IO
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Use the extraction endpoint first to make sure you're getting just the events you want to delete. Adjust it by changing the timeframe and filters parameters: | |
# GET | |
$ curl https://api.keen.io/3.0/projects/:PROJECT_ID/queries/extraction?api_key=READ_KEY&event_collection=EVENT_COLLECTION&timeframe=this_1_days | |
After you're sure of getting only the events you want to delete, just make a DELETE request to the endpoint below, with the same parameters you used in the previous request (with the exception of the MASTER_KEY in place of the READ_KEY): | |
# DELETE | |
$ curl https://api.keen.io/3.0/projects/:PROJECT_ID/events/:EVENT_COLLECTION?api_key=MASTER_KEY&timeframe=TIMEFRAME&filters=FILTERS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment