Sharing Analytics API \ List all snapshots PHP SDK

Resource/URI GET POST PUT DELETE
Sharing Analytics Snapshots /sharing/analytics/snapshots.json List all snapshots Initiate a new snapshot
Sharing Analytics Snapshot /sharing/analytics/snapshots/<sharing_analytics_snapshot_token>.json Retrieve snapshot details Delete a snapshot

Workflow

Request: the code to send to the API

Send a GET request to the resource /sharing/analytics/snapshots.json to obtain the list of your snapshots. The following optional query arguments can be used to filter the result:

Query argument Description
identity_token List only snapshots for content that has been published for the given identity.
Example: snapshots.json?identity_token=09d593eb-7f50-4da9-bcb9-b36dd30f650e
user_token List only snapshots for content that has been published for the given user.
Example: snapshots.json?user_token=221c7bdf-d2b7-4ee4-99f4-34d0d550ecf6

Result: the code returned by the API

The API will return the list of your snapshots. Requests that return multiple entries will be paginated to 250 items by default. Each entry contains a sharing_analytics_snapshot_token that you can use to obtain more details about a snapshot.

Example Resultset

		{
		  "response": {
		    "request": {
		      "date": "Fri, 27 Jan 2012 15:43:10 +0100",
		      "resource": "/sharing/analytics/snapshots.json",
		      "status": {
		        "flag": "success",
		        "code": 200,
		        "info": "Your request has been processed successfully"
		      }
		    },
		    "result": {
		      "data": {
		        "sharing_analytics_snapshots": {
		        	"pagination": {      
								"current_page": 1,
								"total_pages": 1,
								"entries_per_page": 250,
								"total_entries": 2,
								"order": {
									"field": "date_creation",
									"direction": "asc"
	              }
	            },
		          "count": 2,
		          "entries": [
		            {
		              "sharing_analytics_snapshot_token": "080bf89e-8b59-46e6-945c-93fe64a7ce1a",
		              "date_initiated": "Thu, 26 Jan 2012 12:09:35 +0100",
		              "status": "processed",
		              "date_finished": "Thu, 26 Jan 2012 12:15:23 +0100",
		              "sharing_message": {
		                "sharing_message_token": "09d593eb-7f50-4da9-bcb9-b36dd30f650e",
		                "date_creation": "Wed, 21 Dec 2011 01:31:20 +0100",
		                "date_last_published": "Fri, 27 Jan 2012 13:30:02 +0100"
		              }
		            },
		            {
		              "sharing_analytics_snapshot_token": "184c6ba6-49cf-465d-b6f0-77863e84537f",
		              "date_initiated": "Thu, 26 Jan 2012 19:51:45 +0100",
		              "status": "processing",
		              "sharing_message": {
		                "sharing_message_token": "221c7bdf-d2b7-4ee4-99f4-34d0d550ecf6",
		                "date_creation": "Tue, 24 Jan 2012 23:38:55 +0100",
		                "date_last_published": "Tue, 24 Jan 2012 23:38:56 +0100"
		              }
		            }
		          ]
		        }
		      }
		    }
		  }
		}

User Contributed Notes