链接

笔记
专家级
API密钥应作为请求的授权头中的承载令牌发送。 获取API密钥.
列表

API终结点:

GET
https://link.xxbtop.com/api/v1/links

请求示例:

curl --location --request GET 'https://link.xxbtop.com/api/v1/links' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'
参数
类型
说明
search
可选 string
搜索查询。
by
可选 string
搜索依据。 可能的值是: 职务的值, 别名的值, 统一资源定位地址的值。 默认为:title
status
可选 integer
按状态筛选。 可能的值是: 全部的值, 活跃的值, 期满的值, 残疾人的值。 默认为:0
space
可选 integer
按空间id筛选。
domain
可选 integer
按域id筛选。
sort
可选 string
排序. 可能的值是: 降序的值, 提升的值, 最佳表现的值, 表现最差的的值。 默认为:desc
per_page
可选 int
每页结果数. 可能的值是:10100。 默认为:
显示

API终结点:

GET
https://link.xxbtop.com/api/v1/links/{id}

请求示例:

curl --location --request GET 'https://link.xxbtop.com/api/v1/links/{id}' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'
商场

API终结点:

POST
https://link.xxbtop.com/api/v1/links

请求示例:

curl --location --request POST 'https://link.xxbtop.com/api/v1/links' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer {api_key}' \
--data-urlencode 'url={url}'
参数
类型
说明
url
要求的 string
要缩短的链接。
alias
可选 string
链接别名。
password
可选 string
链接密码。
space
可选 integer
要保存的链接所在的空间id。
domain
可选 integer
要保存的链接所在的域id。
pixels
可选 array
The pixel IDs to be integrated in the link.
disabled
可选 integer
链接是否被禁用。 可能的值是: 活跃的值, 残疾人的值。 默认为:0
privacy
可选 integer
链接统计信息是否公开。 可能的值是: 公开的值, 私人的值, 密码的值。 默认为:0
privacy_password
可选 string
统计信息页的密码。 仅适用于privacy设置为2
expiration_url
可选 string
链接过期后将重定向用户的链接。
expiration_date
可选 string
链接过期日期YYYY-MM-DD
expiration_time
可选 string
链接过期时间HH:MM
expiration_clicks
可选 integer
链接过期后的单击次数。
target_type
可选 integer
目标类型。 可能的值是: 没有的值, 地理的的值, 站台的值, 旋转的值。
country[index][key]
可选 string
目标国家的代码。 代码必须为ISO 3166-1 alpha-2
country[index][value]
可选 string
将用户重定向到的链接。
platform[index][key]
可选 string
目标平台的名称。 可能的值是:iOS, Android, Windows, OS X, Linux, Ubuntu, Chrome OS
platform[index][value]
可选 string
将用户重定向到的链接。
language[index][key]
可选 string
目标语言的代码。 代码必须为ISO 639-1 alpha-2
language[index][value]
可选 string
将用户重定向到的链接。
rotation[index][value]
可选 string
将用户重定向到的链接。
更新

API终结点:

PUT PATCH
https://link.xxbtop.com/api/v1/links/{id}

请求示例:

curl --location --request PUT 'https://link.xxbtop.com/api/v1/links/{id}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer {api_key}' \
--data-urlencode 'url={url}'
参数
类型
说明
url
可选 string
要缩短的链接。
alias
可选 string
链接别名。
password
可选 string
链接密码。
space
可选 integer
要保存的链接所在的空间id。
domain
可选 integer
要保存的链接所在的域id。
pixels
可选 array
The pixel IDs to be integrated in the link.
disabled
可选 integer
链接是否被禁用。 可能的值是: 活跃的值, 残疾人的值。
privacy
可选 integer
链接统计信息是否公开。 可能的值是: 公开的值, 私人的值, 密码的值。
privacy_password
可选 string
统计信息页的密码。 仅适用于privacy设置为2
expiration_url
可选 string
链接过期后将重定向用户的链接。
expiration_date
可选 string
链接过期日期YYYY-MM-DD
expiration_time
可选 string
链接过期时间HH:MM
expiration_clicks
可选 integer
链接过期后的单击次数。
target_type
可选 integer
目标类型。 可能的值是: 没有的值, 地理的的值, 站台的值, 旋转的值。
country[index][key]
可选 string
目标国家的代码。 代码必须为ISO 3166-1 alpha-2
country[index][value]
可选 string
将用户重定向到的链接。
platform[index][key]
可选 string
目标平台的名称。 可能的值是:iOS, Android, Windows, OS X, Linux, Ubuntu, Chrome OS
platform[index][value]
可选 string
将用户重定向到的链接。
language[index][key]
可选 string
目标语言的代码。 代码必须为ISO 639-1 alpha-2
language[index][value]
可选 string
将用户重定向到的链接。
rotation[index][value]
可选 string
将用户重定向到的链接。
删除

API终结点:

DELETE
https://link.xxbtop.com/api/v1/links/{id}

请求示例:

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