Nuorodos
GET https://p9.lt/api/links/
curl --request GET \
--url 'https://p9.lt/api/links/' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://p9.lt/api/links/' \
--header 'Authorization: Bearer {api_key}' \
Parametrai | Informacija | Aprašymas |
---|---|---|
page | Pasirinktinai Sveikasis skaičius | Puslapio numeris, iš kurio norite gauti rezultatus. Pagal nutylėjimą yra 1 . |
results_per_page | Pasirinktinai Sveikasis skaičius | Kiek rezultatų norite matyti puslapyje. Leidžiamos reikšmės yra: 10 , 25 , 50 , 100 , 250 , 500 , 1000 . Numatytoji reikšmė yra 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
},
"pageviews": 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://p9.lt/api/links?&page=1",
"last": "https://p9.lt/api/links?&page=1",
"next": null,
"prev": null,
"self": "https://p9.lt/api/links?&page=1"
}
}
GET https://p9.lt/api/links/{link_id}
curl --request GET \
--url 'https://p9.lt/api/links/{link_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://p9.lt/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
},
"pageviews": 10,
"order": 0,
"start_date": null,
"end_date": null,
"date": "2020-11-15 12:00:00"
}
}
POST https://p9.lt/api/links
Parametrai | Informacija | Aprašymas |
---|---|---|
location_url | Reikalinga Eilutė | Galutinė nuoroda |
url | Pasirinktinai Eilutė | Sugeneruotos nuorodos URL pseidonimas. Palikite tuščią, jei norite atsitiktinai sugeneruoto. |
domain_id | Pasirinktinai Sveikasis skaičius | - |
project_id | Pasirinktinai Sveikasis skaičius | - |
pixels_ids | Pasirinktinai Masyvas Sveikasis skaičius | - |
schedule | Pasirinktinai Bulėanas | - |
start_date | Pasirinktinai Eilutė | Available when: schedule = true |
end_date | Pasirinktinai Eilutė | Available when: schedule = true |
pageviews_limit | Pasirinktinai Sveikasis skaičius | - |
expiration_url | Pasirinktinai Eilutė | - |
password | Pasirinktinai Eilutė | - |
forward_query_parameters_is_enabled | Pasirinktinai Bulėanas | - |
utm_source | Pasirinktinai missing_translation: api_documentation.strings | - |
utm_medium | Pasirinktinai missing_translation: api_documentation.strings | - |
utm_campaign | Pasirinktinai missing_translation: api_documentation.strings | - |
sensitive_content | Pasirinktinai Bulėanas | - |
http_status_code | Pasirinktinai Sveikasis skaičius | Leidžiamos reikšmės: 301 , 302 , 307 , 308 |
app_linking_is_enabled | Pasirinktinai Bulėanas | - |
cloaking_is_enabled | Pasirinktinai Bulėanas | - |
cloaking_title | Pasirinktinai Eilutė | - |
cloaking_favicon | Pasirinktinai Failas | - |
targeting_type | Pasirinktinai Eilutė | continent_code , country_code , device_type , browser_language , rotation , os_name , browser_name |
targeting_continent_code_key[index] | Pasirinktinai Eilutė | (targeting_type=continent_code) |
targeting_continent_code_value[index] | Pasirinktinai Eilutė | (targeting_type=continent_code) |
targeting_country_code_key[index] | Pasirinktinai Eilutė | (targeting_type=country_code) |
targeting_country_code_value[index] | Pasirinktinai Eilutė | (targeting_type=country_code) |
targeting_device_type_key[index] | Pasirinktinai Eilutė | (targeting_type=device_type) |
targeting_device_type_value[index] | Pasirinktinai Eilutė | (targeting_type=device_type) |
targeting_browser_language_key[index] | Pasirinktinai Eilutė | (targeting_type=browser_language) |
targeting_browser_language_value[index] | Pasirinktinai Eilutė | (targeting_type=browser_language) |
targeting_rotation_key[index] | Pasirinktinai Eilutė | (targeting_type=rotation) |
targeting_rotation_value[index] | Pasirinktinai Eilutė | (targeting_type=rotation) |
targeting_os_name_key[index] | Pasirinktinai Eilutė | (targeting_type=os_name) |
targeting_os_name_value[index] | Pasirinktinai Eilutė | (targeting_type=os_name) |
targeting_browser_name_key[index] | Pasirinktinai Eilutė | (targeting_type=browser_name) |
targeting_browser_name_value[index] | Pasirinktinai Eilutė | (targeting_type=browser_name) |
curl --request POST \
--url 'https://p9.lt/api/links' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'url=example' \
--form 'location_url=https://p9.lt/' \
--url 'https://p9.lt/api/links' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'url=example' \
--form 'location_url=https://p9.lt/' \
{
"data": {
"id": 1
}
}
POST https://p9.lt/api/links/{link_id}
Parametrai | Informacija | Aprašymas |
---|---|---|
location_url | Pasirinktinai Eilutė | Galutinė nuoroda |
url | Pasirinktinai Eilutė | Sugeneruotos nuorodos URL pseidonimas. Palikite tuščią, jei norite atsitiktinai sugeneruoto. |
domain_id | Pasirinktinai Sveikasis skaičius | - |
project_id | Pasirinktinai Sveikasis skaičius | - |
pixels_ids | Pasirinktinai Masyvas Sveikasis skaičius | - |
schedule | Pasirinktinai Bulėanas | - |
start_date | Pasirinktinai Eilutė | Available when: schedule = true |
end_date | Pasirinktinai Eilutė | Available when: schedule = true |
pageviews_limit | Pasirinktinai Sveikasis skaičius | - |
expiration_url | Pasirinktinai Eilutė | - |
password | Pasirinktinai Eilutė | - |
forward_query_parameters_is_enabled | Pasirinktinai Bulėanas | - |
utm_source | Pasirinktinai missing_translation: api_documentation.strings | - |
utm_medium | Pasirinktinai missing_translation: api_documentation.strings | - |
utm_campaign | Pasirinktinai missing_translation: api_documentation.strings | - |
sensitive_content | Pasirinktinai Bulėanas | - |
http_status_code | Pasirinktinai Sveikasis skaičius | Leidžiamos reikšmės: 301 , 302 , 307 , 308 |
app_linking_is_enabled | Pasirinktinai Bulėanas | - |
cloaking_is_enabled | Pasirinktinai Bulėanas | - |
cloaking_title | Pasirinktinai Eilutė | - |
cloaking_favicon | Pasirinktinai Failas | - |
targeting_type | Pasirinktinai Eilutė | continent_code , country_code , device_type , browser_language , rotation , os_name , browser_name |
targeting_continent_code_key[index] | Pasirinktinai Eilutė | (targeting_type=continent_code) |
targeting_continent_code_value[index] | Pasirinktinai Eilutė | (targeting_type=continent_code) |
targeting_country_code_key[index] | Pasirinktinai Eilutė | (targeting_type=country_code) |
targeting_country_code_value[index] | Pasirinktinai Eilutė | (targeting_type=country_code) |
targeting_device_type_key[index] | Pasirinktinai Eilutė | (targeting_type=device_type) |
targeting_device_type_value[index] | Pasirinktinai Eilutė | (targeting_type=device_type) |
targeting_browser_language_key[index] | Pasirinktinai Eilutė | (targeting_type=browser_language) |
targeting_browser_language_value[index] | Pasirinktinai Eilutė | (targeting_type=browser_language) |
targeting_rotation_key[index] | Pasirinktinai Eilutė | (targeting_type=rotation) |
targeting_rotation_value[index] | Pasirinktinai Eilutė | (targeting_type=rotation) |
targeting_os_name_key[index] | Pasirinktinai Eilutė | (targeting_type=os_name) |
targeting_os_name_value[index] | Pasirinktinai Eilutė | (targeting_type=os_name) |
targeting_browser_name_key[index] | Pasirinktinai Eilutė | (targeting_type=browser_name) |
targeting_browser_name_value[index] | Pasirinktinai Eilutė | (targeting_type=browser_name) |
curl --request POST \
--url 'https://p9.lt/api/links/{link_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'is_enabled=0' \
--url 'https://p9.lt/api/links/{link_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'is_enabled=0' \
{
"data": {
"id": 1
}
}
DELETE https://p9.lt/api/links/{link_id}
curl --request DELETE \
--url 'https://p9.lt/api/links/{link_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://p9.lt/api/links/{link_id}' \
--header 'Authorization: Bearer {api_key}' \