Shorturl API \ Read details of a shortened URL PHP SDK

Send a GET request to the following resource to retrieve the details and statistics of a shortened URL.

Resource/URI GET POST PUT DELETE
Shorturls /shorturls.json List all Shorturls Create a new Shorturl
Shorturl /shorturls/<shorturl_token>.json Read details of a Shorturl Delete a Shorturl

Workflow

Request: the code to send to the API

Send a GET request to the resource /shorturls/<shorturl_token>.json to retrieve the details and statistics of a shortened URL.

Result: the code returned by the API

The API will return the details of the shortened URL including it's click-throughs, referrals and IP addresses of the users who clicked on the URL link.

Example Resultset

		{
			"response": {
				"request": {
					"date": "Fri, 16 Sep 2011 17:42:02  0200",
					"resource": "/shorturls/dam3Y.json",
					"status": {
						"flag": "success",
						"code": 200,
						"info": "Your request has been processed successfully"
					}
				},
				 "result": {
				 	"data": {
				 		"shorturl": {
				 			"shorturl_token": "dam3Y",
				 			"original_url": "http://www.oneall.com",
				 			"short_url": "http://oal.lu/dam3Y",
				 			"date_creation": "Thu, 15 Sep 2011 11:27:27  0200",
				 			"date_last_referral": "Fri, 16 Sep 2011 07:24:36  0200",
				 			"num_referrals": 2,
				 			"referrals": {
				 				"count": 2,
				 				"entries": [
				 					{			 		
				 						"page": "http://www.facebook.com/",
				 						"ip_address": "123.123.123.123",
				 						"date_creation": "Fri, 16 Sep 2011 01:07:51  0200"
				 					},			 			
				 					{			 		
				 						"page": "http://www.example.com",
										"ip_address": "222.333.444.555",
										"date_creation": "Fri, 16 Sep 2011 02:08:07  0200"
									}							
								]
							}
						}
					}
				}
			}
		}

User Contributed Notes