Sharing Analytics API \ Delete a Snapshot

Send a DELETE request to the following resource to delete an existing snapshot.

Sharing Analytics API Resources/URI GET POST PUT DELETE
Sharing Analytics Snapshots /sharing/analytics/snapshots.<format> List all Snapshots Initiate a new Snapshot
Sharing Analytics Snapshot /sharing/analytics/snapshots/<sharing_analytics_snapshot_token>.<format> Read details of a Snapshot Delete a Snapshot

Workflow

1. Request: the code to send to the API

Send a DELETE to /sharing/analytics/snapshots/<sharing_analytics_snapshot_token>.<format> to immediately remove an existing snapshot. The <sharing_analytics_snapshot_token> has to be replaced by the unique token of an existing snapshot.

You get a token after having initiated a new snapshot or by examining your existing snapshots.

Please note: To prevent you from unintentionally deleting a snapshot by mixing up the DELETE/GET methods you have to include the url parameter confirm_deletion=true in your DELETE requests. If you omit this parameter, the snapshot will not be deleted and an error will be thrown.

2. Result: the code returned by the API

If the snapshot has been deleted successfully, the API will return a HTTP Status Code 200. If the snapshot could not be deleted, the API will return a different HTTP Status Code and include an appropriate message with further details on the error that occured.

Code returned after successfully having deleted a snapshot:

		{
		  "response": {
		    "request": {
		      "date": "Fri, 27 Jan 2012 16:24:15 +0100",
		      "resource": "/sharing/analytics/snapshots/a5de98a6-50cc-4d69-916a-d1e7ca9bafd0.json",
		      "status": {
		        "flag": "success",
		        "code": 200,
		        "info": "The sharing analytics snapshot has been deleted successfully"
		      }
		    }
		  }
		}