Shorturl API \ List all shortened URLs PHP SDK

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

Workflow

Request: the code to send to the API

Send a GET request to the resource /shorturls.json to obtain the list of shortened URLs.

Result: the code returned by the API

The API will return the list of shortened URLs. Requests that return multiple entries will be paginated to 250 items by default. Each entry contains a shorturl_token that you can use to obtain more details about the URL.

Example Resultset

		{
			"response": {
				"request": {
					"date": "Fri, 16 Sep 2011 15:43:39  0200",
					"resource": "/shorturls.json",
					"status": {
						"flag": "success",
						"code": 200
					}
				},
				"result": {
					"data": {
						"shorturls": {					
							"pagination": {
						    "current_page": 1,
						    "total_pages": 1,
						    "entries_per_page": 250,
						    "total_entries": 2,
						    "order": {
						      "field": "date_creation",
						      "direction": "desc"
						    }
						  },
							"count": 2,
							"entries": [ 
								{						
									"shorturl_token": "NoFSx",
									"original_url": "http://www.oneall.com",
									"short_url": "http://oal.lu/NoFSx",
									"date_creation": "Thu, 15 Sep 2011 11:00:56  0200",
									"num_referrals": 0							
								},
		         		{	         
		          		"shorturl_token": "dam3Y",
		          		"original_url": "http://www.oneall.com/services/",
		          		"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": 10	          	
		          	}
							]
		        }				
					}
				}
			}
		}

User Contributed Notes