链接

笔记
专家级别
API密钥应在请求的授权标题中作为携带者令牌发送。 获取您的API key.
列表

API端点:

GET
https://kdwz.cn/api/v1/links

请求示例:

curl --location --request GET 'https://kdwz.cn/api/v1/links' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'
范围
类型
描述
search
可选的 string
Search query.
search_by
可选的 string
搜索. 可能的值是标题title, 短链alias, URLurl。 默认值为titles。
status
可选的 integer
地位. 可能的值是全部0, 激活1, 已到期2, 禁用3。 默认值为0s。
space_id
可选的 integer
Space ID.
domain_id
可选的 integer
Domain ID.
pixel_id
可选的 integer
Pixel ID.
sort_by
可选的 string
排序方式. 可能的值是创建日期id, 点击次数clicks, 标题title, 短链alias, URLurl。 默认值为ids。
sort
可选的 string
种类. 可能的值是下降desc, 上升asc。 默认值为descs。
per_page
可选的 integer
每页结果. 可能的值是10, 25, 50, 100。 默认值为25s。
显示

API端点:

GET
https://kdwz.cn/api/v1/links/{id}

请求示例:

curl --location --request GET 'https://kdwz.cn/api/v1/links/{id}' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'
店铺

API端点:

POST
https://kdwz.cn/api/v1/links

请求示例:

curl --location --request POST 'https://kdwz.cn/api/v1/links' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer {api_key}' \
--data-urlencode 'url={url}' \
--data-urlencode 'domain={id}'
范围
类型
描述
url
必需的 string
Destination URL.
domain_id
必需的 integer
Domain ID.
alias
可选的 string
短链.
space_id
可选的 integer
Space ID.
pixel_ids[]
可选的 array
Pixel IDs.
redirect_password
可选的 string
Redirect password.
sensitive_content
可选的 integer
Sensitive content. 可能的值是0, 是的1。 默认值为0s。
privacy
可选的 integer
Stats privacy. 可能的值是公开0, 私人1, 密码2。 默认值为0s。
password
可选的 string
Stats password. Only works with privacy field set to 2.
active_period_start_at
可选的 string
Active period starting date in Y-m-d H:i format.
active_period_end_at
可选的 string
Active period ending date in Y-m-d H:i format.
clicks_limit
可选的 integer
Clicks limit.
expiration_url
可选的 string
Expiration URL.
targets_type
可选的 string
定位. 可能的值是Continentscontinents, Countriescountries, Operating systemsoperating_systems, Browsersbrowsers, Languageslanguages, Devicesdevices, Rotationsrotations
targets[index][key]
可选的 string
For targets_type=country, the value must be in ISO 3166-1 alpha-2 format.
For targets_type=operating_systems, the possible values are iOS, Android, Windows, OS X, Linux, Ubuntu, Chrome OS.
For targets_type=browsers, the possible values are: Chrome, Chromium, Firefox, Firefox Mobile, Edge, Internet Explorer, Mobile Internet Explorer, Vivaldi, Brave, Safari, Opera, Opera Mini, Opera Mobile, Opera Touch, Yandex Browser, UC Browser, Samsung Internet, QQ Browser, BlackBerry Browser, Maxtho.
For targets_type=devices, the possible values are: Desktop, Mobile, Tablet, Watch, Television.
For targets_type=languages, the value must be in ISO 639-1 alpha-2 format.
For targets_type=continents, the possible values are: AfricaAF, AntarcticaAN, AsiaAS, EuropeEU, North AmericaNA, OceaniaOC, South AmericaSA.
targets[index][value]
可选的 string
Destination URL.
更新

API端点:

PUT PATCH
https://kdwz.cn/api/v1/links/{id}

请求示例:

curl --location --request PUT 'https://kdwz.cn/api/v1/links/{id}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer {api_key}' \
--data-urlencode 'url={url}'
范围
类型
描述
url
可选的 string
Destination URL.
alias
可选的 string
短链.
space_id
可选的 integer
Space ID.
pixel_ids[]
可选的 array
Pixel IDs.
redirect_password
可选的 string
Redirect password.
sensitive_content
可选的 integer
Sensitive content. 可能的值是0, 是的1
privacy
可选的 integer
Stats privacy. 可能的值是公开0, 私人1, 密码2
password
可选的 string
Stats password. Only works with privacy field set to 2.
active_period_start_at
可选的 string
Active period starting date in Y-m-d H:i format.
active_period_end_at
可选的 string
Active period ending date in Y-m-d H:i format.
clicks_limit
可选的 integer
Clicks limit.
expiration_url
可选的 string
Expiration URL.
targets_type
可选的 string
定位. 可能的值是Continentscontinents, Countriescountries, Operating systemsoperating_systems, Browsersbrowsers, Languageslanguages, Devicesdevices, Rotationsrotations
targets[index][key]
可选的 string
For targets_type=country, the value must be in ISO 3166-1 alpha-2 format.
For targets_type=operating_systems, the possible values are iOS, Android, Windows, OS X, Linux, Ubuntu, Chrome OS.
For targets_type=browsers, the possible values are: Chrome, Chromium, Firefox, Firefox Mobile, Edge, Internet Explorer, Mobile Internet Explorer, Vivaldi, Brave, Safari, Opera, Opera Mini, Opera Mobile, Opera Touch, Yandex Browser, UC Browser, Samsung Internet, QQ Browser, BlackBerry Browser, Maxtho.
For targets_type=devices, the possible values are: Desktop, Mobile, Tablet, Watch, Television.
For targets_type=languages, the value must be in ISO 639-1 alpha-2 format.
For targets_type=continents, the possible values are: AfricaAF, AntarcticaAN, AsiaAS, EuropeEU, North AmericaNA, OceaniaOC, South AmericaSA.
targets[index][value]
可选的 string
Destination URL.
删除

API端点:

DELETE
https://kdwz.cn/api/v1/links/{id}

请求示例:

curl --location --request DELETE 'https://kdwz.cn/api/v1/links/{id}' \
--header 'Authorization: Bearer {api_key}'