鏈接
GET https://ja-t.net/api/links/
curl --request GET \
--url 'https://ja-t.net/api/links/' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://ja-t.net/api/links/' \
--header 'Authorization: Bearer {api_key}' \
參數 | 詳情 | 描述 |
---|---|---|
page | 可選 整數 | 您希望從中得到結果的頁碼。 默認為 1 |
results_per_page | 可選 整數 | 每頁需要多少個結果。 允許的值為:10 , 25 , 50 , 100 , 250 , 500 , 1000 默認為 25 |
{
"data": [
{
"id": 1,
"project_id": null,
"domain_id": 0,
"type": "link",
"url": "example",
"location_url": "https://example.com/",
"settings": {
"password": null,
"sensitive_content": false
},
"clicks": 10,
"order": 0,
"start_date": null,
"end_date": null,
"date": "2020-11-15 12:00:00"
}
],
"meta": {
"page": 1,
"results_per_page": 25,
"total": 1,
"total_pages": 1
},
"links": {
"first": "https://ja-t.net/api/links?&page=1",
"last": "https://ja-t.net/api/links?&page=1",
"next": null,
"prev": null,
"self": "https://ja-t.net/api/links?&page=1"
}
}
GET https://ja-t.net/api/links/{link_id}
curl --request GET \
--url 'https://ja-t.net/api/links/{link_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://ja-t.net/api/links/{link_id}' \
--header 'Authorization: Bearer {api_key}' \
{
"data": {
"id": 1,
"project_id": null,
"domain_id": 0,
"type": "link",
"url": "example",
"location_url": "https://example.com/",
"settings": {
"password": null,
"sensitive_content": false
},
"clicks": 10,
"order": 0,
"start_date": null,
"end_date": null,
"date": "2020-11-15 12:00:00"
}
}
POST https://ja-t.net/api/links
參數 | 詳情 | 描述 |
---|---|---|
type | 可選 字串 | link |
location_url | 必須 字串 | 鏈接的目標地 |
url | 可選 字串 | 生成鏈接的別名,隨機生成則可以留空 |
domain_id | 可選 整數 | - |
project_id | 可選 整數 | - |
pixels_ids | 可選 陣列 整數 | - |
schedule | 可選 布爾 | - |
start_date | 可選 字串 | Available when: schedule = true |
end_date | 可選 字串 | Available when: schedule = true |
clicks_limit | 可選 整數 | - |
expiration_url | 可選 字串 | - |
sensitive_content | 可選 布爾 | - |
http_status_code | 可選 整數 | 允許的值 301 , 302 , 307 , 308 |
app_linking_is_enabled | 可選 布爾 | - |
cloaking_is_enabled | 可選 布爾 | - |
cloaking_title | 可選 字串 | - |
cloaking_favicon | 可選 文件 | - |
password | 可選 字串 | - |
forward_query_parameters_is_enabled | 可選 布爾 | - |
utm_source | 可選 missing_translation: api_documentation.strings | - |
utm_medium | 可選 missing_translation: api_documentation.strings | - |
utm_campaign | 可選 missing_translation: api_documentation.strings | - |
targeting_type | 可選 字串 | country_code , device_type , browser_language , rotation , os_name |
targeting_country_code_key[index] | 可選 字串 | (targeting_type=country_code) |
targeting_country_code_value[index] | 可選 字串 | (targeting_type=country_code) |
targeting_device_type_key[index] | 可選 字串 | (targeting_type=device_type) |
targeting_device_type_value[index] | 可選 字串 | (targeting_type=device_type) |
targeting_browser_language_key[index] | 可選 字串 | (targeting_type=browser_language) |
targeting_browser_language_value[index] | 可選 字串 | (targeting_type=browser_language) |
targeting_rotation_key[index] | 可選 字串 | (targeting_type=rotation) |
targeting_rotation_value[index] | 可選 字串 | (targeting_type=rotation) |
targeting_os_name_key[index] | 可選 字串 | (targeting_type=os_name) |
targeting_os_name_value[index] | 可選 字串 | (targeting_type=os_name) |
curl --request POST \
--url 'https://ja-t.net/api/links' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'url=example' \
--form 'location_url=https://ja-t.net/' \
--url 'https://ja-t.net/api/links' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'url=example' \
--form 'location_url=https://ja-t.net/' \
{
"data": {
"id": 1
}
}
POST https://ja-t.net/api/links/{link_id}
參數 | 詳情 | 描述 |
---|---|---|
location_url | 可選 字串 | 鏈接的目標地 |
url | 可選 字串 | 生成鏈接的別名,隨機生成則可以留空 |
domain_id | 可選 整數 | - |
project_id | 可選 整數 | - |
pixels_ids | 可選 陣列 整數 | - |
schedule | 可選 布爾 | - |
start_date | 可選 字串 | Available when: schedule = true |
end_date | 可選 字串 | Available when: schedule = true |
clicks_limit | 可選 整數 | - |
expiration_url | 可選 字串 | - |
sensitive_content | 可選 布爾 | - |
http_status_code | 可選 整數 | 允許的值 301 , 302 , 307 , 308 |
app_linking_is_enabled | 可選 布爾 | - |
cloaking_is_enabled | 可選 布爾 | - |
cloaking_title | 可選 字串 | - |
cloaking_favicon | 可選 文件 | - |
password | 可選 字串 | - |
forward_query_parameters_is_enabled | 可選 布爾 | - |
utm_source | 可選 missing_translation: api_documentation.strings | - |
utm_medium | 可選 missing_translation: api_documentation.strings | - |
utm_campaign | 可選 missing_translation: api_documentation.strings | - |
targeting_type | 可選 字串 | country_code , device_type , browser_language , rotation , os_name |
targeting_country_code_key[index] | 可選 字串 | (targeting_type=country_code) |
targeting_country_code_value[index] | 可選 字串 | (targeting_type=country_code) |
targeting_device_type_key[index] | 可選 字串 | (targeting_type=device_type) |
targeting_device_type_value[index] | 可選 字串 | (targeting_type=device_type) |
targeting_browser_language_key[index] | 可選 字串 | (targeting_type=browser_language) |
targeting_browser_language_value[index] | 可選 字串 | (targeting_type=browser_language) |
targeting_rotation_key[index] | 可選 字串 | (targeting_type=rotation) |
targeting_rotation_value[index] | 可選 字串 | (targeting_type=rotation) |
targeting_os_name_key[index] | 可選 字串 | (targeting_type=os_name) |
targeting_os_name_value[index] | 可選 字串 | (targeting_type=os_name) |
curl --request POST \
--url 'https://ja-t.net/api/links/{link_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'is_enabled=0' \
--url 'https://ja-t.net/api/links/{link_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'is_enabled=0' \
{
"data": {
"id": 1
}
}
DELETE https://ja-t.net/api/links/{link_id}
curl --request DELETE \
--url 'https://ja-t.net/api/links/{link_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://ja-t.net/api/links/{link_id}' \
--header 'Authorization: Bearer {api_key}' \