Overview
API uygulamamızla mevcut web sitenize kısa link işlevselliği sağlayın. Bir hesap oluşturduğunuzda, aşağıda listelenen domainlerde API çağrılarında kullanılması gereken benzersiz bir API key - anahtar oluşturuyoruz.
The examples below generate responses in json but you can also use xml by replacing the end of the url call with .xml.
Oluştur
Orijinal uzun link base64 kodlu sürümünü sağlayan yeni bir kısa link oluşturun.
Parameters:
Name: |
Type: |
Açıklama: |
key |
string |
API erişim anahtarınız. Login to view. |
url |
string |
Uzun linkiniz base64_encode() PHP de Base64 ile kodlanmış / şifrelenmiş. |
Return Values:
Name: |
Type: |
Açıklama: |
url_id |
integer |
Unique url id. |
short_url |
string |
Short url including domain name. |
short_url_part |
string |
Short url part. (excluding domain name) |
original_url |
string |
The original decoded long url. |
date_time |
string |
Date and time of the API call. In the format yyyy-mm-dd hh:mm:ss. |
Example Request:
API Adresi: https://yol.tc
GET //api/v1/1e95485005ec9b68d5f1e89be2ad287d/shorturl/create/url/BASE64_ENCODED_LONG_URL.json
Örnek Yanıt:
{
"code":200,
"data":{
"url_id":"1388597",
"short_url":"https://yol.tc/srt",
"short_url_part":"srt",
"original_url":"http://www.bbc.co.uk",
"date_time":"2013-04-04 16:18:05"
}
}
Oluştur (Ek Seçenekler)
Oluşturacağınız kısa URL 'ye - linke, son kullanma tarihi , şifreyle giriş gibi ek özellikleri - ayaları dahil edin.
Parameters:
Name: |
Type: |
Açıklama: |
key |
string |
API erişim anahtarınız. Login to view. |
url |
string |
Uzun linkiniz base64_encode() PHP de Base64 ile kodlanmış / şifrelenmiş. |
custom_url (optional) |
string |
Özel kısa URL parçası. |
password (optional) |
string |
Password to access url. |
expiry_date (optional) |
string |
Tarihinde sona erecek linkler. Tarih formatı yıl-ay-gün. |
base_domain (optional) |
string |
Url to use for the short url. Must already exist on the site. No http or trailing forward slash. i.e. domain.com |
Return Values:
Name: |
Type: |
Açıklama: |
url_id |
integer |
Unique url id. |
short_url |
string |
Short url including domain name. |
short_url_part |
string |
Short url part. (excluding domain name) |
original_url |
string |
The original decoded long url. |
date_time |
string |
Date and time of the API call. In the format yyyy-mm-dd hh:mm:ss. |
Example Request:
API Adresi: https://yol.tc
GET //api/v1/1e95485005ec9b68d5f1e89be2ad287d/shorturl/create/custom_url/CUSTOM_SHORT_URL/password/PASSWORD_TO_ACCESS/expiry_date/URL_EXPIRY_DATE/url/BASE64_ENCODED_LONG_URL.json
Örnek Yanıt:
{
"code":200,
"data":{
"url_id":"1388598",
"short_url":"https://yol.tc/bbc",
"short_url_part":"bbc",
"original_url":"http://www.bbc.co.uk",
"date_time":"2013-04-04 16:18:08"
}
}
Devre Dışı
Hesabınızda ki akitf bir kısa URL yi devre dışı bırakın.
Parameters:
Name: |
Type: |
Açıklama: |
key |
string |
API erişim anahtarınız. Login to view. |
short_url |
string |
Uzun linkiniz base64_encode() PHP de Base64 ile kodlanmış / şifrelenmiş. |
Return Values:
Name: |
Type: |
Açıklama: |
url_id |
integer |
Unique url id. |
status |
string |
Kısa link durumu. |
short_url |
string |
Short url including domain name. |
date_time |
string |
Date and time of the API call. In the format yyyy-mm-dd hh:mm:ss. |
Example Request:
API Adresi: https://yol.tc
GET //api/v1/1e95485005ec9b68d5f1e89be2ad287d/shorturl/disable/short_url/BASE64_ENCODED_SHORT_URL.json
Örnek Yanıt:
{
"code":200,
"data":{
"url_id":"1388598",
"status":"disabled",
"short_url":"https://yol.tc/bbc",
"date_time":"2013-04-04 17:01:42"
}
}
Aktif
Hesabınızda ki engelli bir kısa linki aktif edin.
Parameters:
Name: |
Type: |
Açıklama: |
key |
string |
API erişim anahtarınız. Login to view. |
short_url |
string |
Uzun linkiniz base64_encode() PHP de Base64 ile kodlanmış / şifrelenmiş. |
Return Values:
Name: |
Type: |
Açıklama: |
url_id |
integer |
Unique url id. |
status |
string |
Kısa link durumu. |
short_url |
string |
Short url including domain name. |
date_time |
string |
Date and time of the API call. In the format yyyy-mm-dd hh:mm:ss. |
Example Request:
API Adresi: https://yol.tc
GET //api/v1/1e95485005ec9b68d5f1e89be2ad287d/shorturl/enable/short_url/BASE64_ENCODED_SHORT_URL.json
Örnek Yanıt:
{
"code":200,
"data":{
"url_id":"1388598",
"status":"active",
"short_url":"https://yol.tc/bbc",
"date_time":"2013-04-04 17:01:42"
}
}
Bilgi
Hesabınızdaki herhangi bir kısa link için ayrıntılı bilgi alın.
Parameters:
Name: |
Type: |
Açıklama: |
key |
string |
API erişim anahtarınız. Login to view. |
short_url |
string |
Uzun linkiniz base64_encode() PHP de Base64 ile kodlanmış / şifrelenmiş. |
Return Values:
Name: |
Type: |
Açıklama: |
url_id |
integer |
Unique url id. |
short_url |
string |
Short url including domain name. |
short_url_part |
string |
Short url part. (excluding domain name) |
original_url |
string |
The original decoded long url. |
date_created |
string |
Bu kısa URL - Link tarih/saat de oluşturuldu. |
last_accessed |
string |
Bu kısa URL - Link 'e son erişim tarih / saat 'i. |
total_visits |
integer |
Total visits |
has_password |
bool |
Whether the url needs a password to access. |
expiry_date |
string |
The date/time the short url will expire. |
status |
string |
Kısa link durumu. |
date_time |
string |
Date and time of the API call. In the format yyyy-mm-dd hh:mm:ss. |
Example Request:
API Adresi: https://yol.tc
GET //api/v1/1e95485005ec9b68d5f1e89be2ad287d/shorturl/info/short_url/BASE64_ENCODED_SHORT_URL.json
Örnek Yanıt:
{
"code":200,
"data":{
"url_id":"13423436",
"short_url":"https://yol.tc/bbc",
"short_url_part":"bbc",
"original_url":"http://www.bbc.co.uk",
"date_created":"2013-04-04 12:36:09",
"last_accessed":"2013-05-02 12:32:05",
"total_visits":"3452",
"has_password":true,
"expiry_date":"2019-03-02 23:59:59",
"status":"active",
"date_time":"2013-04-04 17:10:14"
}
}
Liste
List all active urls within your account.
Parameters:
Name: |
Type: |
Açıklama: |
key |
string |
API erişim anahtarınız. Login to view. |
Return Values:
Name: |
Type: |
Açıklama: |
urls |
dizi |
List of short urls within the account. |
date_time |
string |
Date and time of the API call. In the format yyyy-mm-dd hh:mm:ss. |
Example Request:
API Adresi: https://yol.tc
GET //api/v1/1e95485005ec9b68d5f1e89be2ad287d/shorturl/list_active_urls.json
Örnek Yanıt:
{
"code":200,
"data":{
"urls":[
{
"short_url":"https://yol.tc/2F"
},
{
"short_url":"https://yol.tc/2q"
}
],
"date_time":"2013-04-09 09:48:05"
}
}