Skip to content

Instantly share code, notes, and snippets.

@heitortsergent
Created March 31, 2016 22:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save heitortsergent/56f097ce0cf4679bea1839d1f9db8b19 to your computer and use it in GitHub Desktop.
Save heitortsergent/56f097ce0cf4679bea1839d1f9db8b19 to your computer and use it in GitHub Desktop.
Deleting events from Keen IO
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