链接列表

笔记
专家级
应用API接口密钥应该作为承载令牌在请求的授权头中发送 获取您的应用API接口密钥.
目录

API 接口:

GET
https://yyds.lt/api/v1/links

请求示例:

curl --location --request GET 'https://yyds.lt/api/v1/links' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'
参数
类型
描述
search
可选择的 string
The search query.
search_by
可选择的 string
搜索依据. Possible values are: title for 标题, alias for 自定义后缀, url for 链接. Defaults to: title.
status
可选择的 integer
Filter by status. Possible values are: 0 for 全部, 1 for 活跃的, 2 for 到期, 3 for 禁用. Defaults to: 0.
space_id
可选择的 integer
Filter by space ID.
domain_id
可选择的 integer
Filter by domain ID.
pixel_id
可选择的 integer
Filter by pixel ID.
sort_by
可选择的 string
Sort by. Possible values are: id for Date created, clicks for 点击, title for 标题, alias for 自定义后缀, url for 链接. Defaults to: id.
sort
可选择的 string
分类. Possible values are: desc for Descending, asc for Ascending. Defaults to: desc.
per_page
可选择的 int
每页结果. Possible values are: 10, 25, 50, 100. Defaults to: 10.
显示

API 接口:

GET
https://yyds.lt/api/v1/links/{id}

请求示例:

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

API 接口:

POST
https://yyds.lt/api/v1/links

请求示例:

curl --location --request POST 'https://yyds.lt/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_id
需要 integer
The domain ID the link to be saved under.
alias
可选择的 string
链接后缀
password
可选择的 string
链接密码
space_id
可选择的 integer
The space ID the link to be saved under.
pixel_ids
可选择的 array
The pixel IDs to be integrated in the link.
disabled
可选择的 integer
Whether the link is disabled or not. Possible values are: 0 for 活跃的, 1 for 禁用. Defaults to: 0.
privacy
可选择的 integer
Whether the link stats are public or not. Possible values are: 0 for 开放的, 1 for 私人的, 2 for 密码. Defaults to: 0.
privacy_password
可选择的 string
The password for the statistics page. Only works with privacy set to 2.
expiration_url
可选择的 string
一旦链接过期,用户将被重定向的链接
expiration_date
可选择的 string
链接到期日期采用:格式
expiration_time
可选择的 string
格式格式的链接到期时间
expiration_clicks
可选择的 integer
链接过期后的点击次数
target_type
可选择的 integer
The type of targeting. Possible values are: 0 for , 1 for 地理位置, 2 for 平台, 4 for 多链接随机跳转.
country[index][key]
可选择的 string
The code of the targeted country. The code must be in ISO 3166-1 alpha-2 standard.
country[index][value]
可选择的 string
The link where the user will be redirected to.
platform[index][key]
可选择的 string
The name of the targeted platform. Possible values are: iOS, Android, Windows, OS X, Linux, Ubuntu, Chrome OS.
platform[index][value]
可选择的 string
The link where the user will be redirected to.
language[index][key]
可选择的 string
The code of the targeted language. The code must be in ISO 639-1 alpha-2 standard.
language[index][value]
可选择的 string
The link where the user will be redirected to.
rotation[index][value]
可选择的 string
The link where the user will be redirected to.
更新

API 接口:

PUT PATCH
https://yyds.lt/api/v1/links/{id}

请求示例:

curl --location --request PUT 'https://yyds.lt/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_id
可选择的 integer
The space ID the link to be saved under.
pixel_ids
可选择的 array
The pixel IDs to be integrated in the link.
disabled
可选择的 integer
Whether the link is disabled or not. Possible values are: 0 for 活跃的, 1 for 禁用.
privacy
可选择的 integer
Whether the link stats are public or not. Possible values are: 0 for 开放的, 1 for 私人的, 2 for 密码.
privacy_password
可选择的 string
The password for the statistics page. Only works with privacy set to 2.
expiration_url
可选择的 string
一旦链接过期,用户将被重定向的链接
expiration_date
可选择的 string
链接到期日期采用:格式
expiration_time
可选择的 string
格式格式的链接到期时间
expiration_clicks
可选择的 integer
链接过期后的点击次数
target_type
可选择的 integer
The type of targeting. Possible values are: 0 for , 1 for 地理位置, 2 for 平台, 4 for 多链接随机跳转.
country[index][key]
可选择的 string
The code of the targeted country. The code must be in ISO 3166-1 alpha-2 standard.
country[index][value]
可选择的 string
The link where the user will be redirected to.
platform[index][key]
可选择的 string
The name of the targeted platform. Possible values are: iOS, Android, Windows, OS X, Linux, Ubuntu, Chrome OS.
platform[index][value]
可选择的 string
The link where the user will be redirected to.
language[index][key]
可选择的 string
The code of the targeted language. The code must be in ISO 639-1 alpha-2 standard.
language[index][value]
可选择的 string
The link where the user will be redirected to.
rotation[index][value]
可选择的 string
The link where the user will be redirected to.
删除

API 接口:

DELETE
https://yyds.lt/api/v1/links/{id}

请求示例:

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