链接

备注
专家级
API 密钥应作为 Bearer 令牌放在请求的 Authorization 标头中发送。 获取 API 密钥.
列表

API 接口:

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

请求示例:

curl --location --request GET 'https://v8x.cn/api/v1/links' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'
参数
类型
描述
search
可选 string
搜索关键词。
search_by
可选 string
搜索字段. 可选值:标题 的 title, 自定义别名 的 alias, 网址 的 url。 默认值:title。
status
可选 integer
按状态筛选。 可选值:全部 的 0, 启用中 的 1, 已过期 的 2, 已禁用 的 3。 默认值:0。
space
可选 integer
按分组 ID 筛选。
domain
可选 integer
按域名 ID 筛选。
pixel
可选 integer
按追踪像素 ID 筛选。
sort_by
可选 string
排序依据. 可选值:创建日期 的 id, 点击量 的 clicks, 标题 的 title, 自定义别名 的 alias, 网址 的 url。 默认值:id。
sort
可选 string
排序. 可选值:降序 的 desc, 升序 的 asc。 默认值:desc。
per_page
可选 int
每页结果数. 可选值:10, 25, 50, 100。 默认值:10。
查看

API 接口:

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

请求示例:

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

API 接口:

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

请求示例:

curl --location --request POST 'https://v8x.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
要缩短的链接。
domain
必填 integer
保存此链接的域名 ID。
alias
可选 string
链接别名。
password
可选 string
链接密码。
space
可选 integer
保存此链接的分组 ID。
pixels
可选 array
The pixel IDs to be integrated in the link.
disabled
可选 integer
链接是否禁用。 可选值:启用中 的 0, 已禁用 的 1。 默认值:0。
privacy
可选 integer
链接统计是否公开。 可选值:公开 的 0, 私密 的 1, 密码 的 2。 默认值: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
定向类型。 可选值:无 的 0, 地理位置 的 1, 平台 的 2, 轮换 的 4。
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://v8x.cn/api/v1/links/{id}

请求示例:

curl --location --request PUT 'https://v8x.cn/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。
pixels
可选 array
The pixel IDs to be integrated in the link.
disabled
可选 integer
链接是否禁用。 可选值:启用中 的 0, 已禁用 的 1。
privacy
可选 integer
链接统计是否公开。 可选值:公开 的 0, 私密 的 1, 密码 的 2。
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
定向类型。 可选值:无 的 0, 地理位置 的 1, 平台 的 2, 轮换 的 4。
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://v8x.cn/api/v1/links/{id}

请求示例:

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