/v1/expand.php
Parameters
* format (optional) indicates the requested response format. supported formats: json (default), xml.
* hash OR hash[] (optional) use hash for a single value hash[] when providing an array of values.
* short_url (optional) you can provide a single or multiple short urls.
* x_login (optional) is the end-user's login when make requests on behalf of another ity.im user. This allows application developers to pass along an end user's ity.im login.
* x_apikey (optional) is the end-user's apiKey when making requests on behalf of another ity.im user. This allows application developers to pass along an end user's ity.im apiKey.
Notes
* When providing (short_url's) do not encode them.
* When including x_login and x_apiKey, the shortened URL will be inserted into the history for the user specified by x_login. it will not be inserted into the history for the user specified by login.
Output
* short_url is the actual link that should be used, and is a unique value for the given ity.im account.
* hash is a ity.im identifier for long_url.
* long_url is an echo back of the long_url request parameter. This may not always be equal to the URL requested. That's because some URL normalization may occur (e.g., due to encoding differences, or case differences in the domain). This long_url will always be functionally identical to the request parameter.
* clicks_today is the amount of clicks on the short url today
* clicks_month is the amount of clicks on the short url this month
* clicks_overall is the amount of clicks on the short url overall
Examples
* json format http://api.ity.im/v1/expand.php?login=apidemo@ity.im&apikey=2147483647&hash[]=00y&hash[]=00U&shorturl[]=http://ity.im/09K&format=json
{
"status_code": 200, "status_txt": "OK", "data": {
"expand":
[{
"short_url": "http://ity.im/00y",
"hash": "00y",
"long_url": "http://www.majon.com/blog-marketing-promotion.html",
"clicks_today": "0",
"clicks_month": "0",
"clicks_overall": "37"
},{ "short_url": "http://ity.im/00U",
"hash": "00U",
"long_url": "http://www.majon.com/safeannounce/",
"clicks_today": "",
"clicks_month": "",
"clicks_overall": ""
},{ "short_url": "http://ity.im/09K",
"hash": "09K",
"long_url": "http://test",
"clicks_today": "",
"clicks_month": "",
"clicks_overall": ""
}]
}
}
"status_code": 200, "status_txt": "OK", "data": {
"expand":
[{
"short_url": "http://ity.im/00y",
"hash": "00y",
"long_url": "http://www.majon.com/blog-marketing-promotion.html",
"clicks_today": "0",
"clicks_month": "0",
"clicks_overall": "37"
},{ "short_url": "http://ity.im/00U",
"hash": "00U",
"long_url": "http://www.majon.com/safeannounce/",
"clicks_today": "",
"clicks_month": "",
"clicks_overall": ""
},{ "short_url": "http://ity.im/09K",
"hash": "09K",
"long_url": "http://test",
"clicks_today": "",
"clicks_month": "",
"clicks_overall": ""
}]
}
}
* xml format http://api.ity.im/v1/expand.php?login=apidemo@ity.im&apikey=2147483647&hash[]=00y&hash[]=00U&shorturl[]=http://ity.im/09K&format=xml
<?xml version="1.0" encoding="UTF-8"?>
<response>
<status_code>200</status_code>
<status_txt>OK</status_txt>
<data>
<entry>
<short_url>http://ity.im/00y</short_url>
<hash>00y</hash>
<long_url>http://www.majon.com/blog-marketing-promotion.html</long_url>
<clicks_today>0</clicks_today>
<clicks_month>0</clicks_month>
<clicks_overall>37</clicks_overall>
</entry>
<entry>
<short_url>http://ity.im/00U</short_url>
<hash>00U</hash>
<long_url>http://www.majon.com/safeannounce/</long_url>
<clicks_today></clicks_today>
<clicks_month></clicks_month>
<clicks_overall></clicks_overall>
</entry>
<entry>
<short_url>http://ity.im/09K</short_url>
<hash>09K</hash>
<long_url>http://test</long_url>
<clicks_today></clicks_today>
<clicks_month></clicks_month>
<clicks_overall></clicks_overall>
</entry>
</data>
</response>
<response>
<status_code>200</status_code>
<status_txt>OK</status_txt>
<data>
<entry>
<short_url>http://ity.im/00y</short_url>
<hash>00y</hash>
<long_url>http://www.majon.com/blog-marketing-promotion.html</long_url>
<clicks_today>0</clicks_today>
<clicks_month>0</clicks_month>
<clicks_overall>37</clicks_overall>
</entry>
<entry>
<short_url>http://ity.im/00U</short_url>
<hash>00U</hash>
<long_url>http://www.majon.com/safeannounce/</long_url>
<clicks_today></clicks_today>
<clicks_month></clicks_month>
<clicks_overall></clicks_overall>
</entry>
<entry>
<short_url>http://ity.im/09K</short_url>
<hash>09K</hash>
<long_url>http://test</long_url>
<clicks_today></clicks_today>
<clicks_month></clicks_month>
<clicks_overall></clicks_overall>
</entry>
</data>
</response>
Example usage with ityim PHP class









