Sharing API \ List all published messages PHP SDK

Resource/URI GET POST PUT DELETE
Sharing API Messages /sharing/messages.json List published messages Publish a new message
Sharing API Message /sharing/messages/<sharing_message_token>.json Get message details Re-Publish a message Delete a message

Workflow

Request: the code to send to the API

Send a GET request to the resource /sharing/messages.json to obtain the list of shared messages.

Result: the code returned by the API

The API will return a list of shared messages. Requests that return multiple entries will be paginated to 250 items by default. Each message contains a sharing_message_token that you can use to obtain more details about the message.

Example Resultset

		{
		  "response": {
		    "request": {
		      "date": "Fri, 27 Jan 2012 16:33:13 +0100",
		      "resource": "/sharing/messages.json",
		      "status": {
		        "flag": "success",
		        "code": 200,
		        "info": "Your request has been processed successfully"
		      }
		    },
		    "result": {
		      "data": {
		        "sharing_messages": {
		        	"pagination": {      
								"current_page": 1,
								"total_pages": 1,
								"entries_per_page": 250,
								"total_entries": 2,
								"order": {
									"field": "date_creation",
									"direction": "desc"
		          	}
							},
		          "count": 2,
		          "entries": [
		            {
		              "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 16:30:03 +0100"
		            },
		            {
		              "sharing_message_token": "a33ee832-4cb4-4fea-a6ca-9e93a8271380",
		              "date_creation": "Wed, 21 Dec 2011 18:01:29 +0100",
		              "date_last_published": "Wed, 21 Dec 2011 18:01:30 +0100"
		            }
		          ]
		        }
		      }
		    }
		  }
		}

User Contributed Notes