网站

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

API 端点:

GET
https://yzl.cc/api/v1/websites

请求示例:

curl --location --request GET 'https://yzl.cc/api/v1/websites' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'
参数
类型
描述
search
可选 string
搜索查询.
search_by
可选 string
搜索方式. 可能的值为:domain (针对 域名)。 默认值为:domain
favorite
可选 boolean
按收藏筛选。
sort_by
可选 string
排序方式. 可能的值为:id (针对 创建日期), domain (针对 域名)。 默认值为:id
sort
可选 string
排序. 可能的值为:desc (针对 降序), asc (针对 升序)。 默认值为:desc
per_page
可选 integer
每页结果数. 可能的值为:10, 25, 50, 100。 默认值为:25
显示

API 端点:

GET
https://yzl.cc/api/v1/websites/{id}

请求示例:

curl --location --request GET 'https://yzl.cc/api/v1/websites/{id}' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'
存储

API 端点:

POST
https://yzl.cc/api/v1/websites

请求示例:

curl --location --request POST 'https://yzl.cc/api/v1/websites' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer {api_key}' \
--data-urlencode 'domain={domain}'
参数
类型
描述
domain
必需 string
域名
privacy
可选 integer
隐私. 可能的值为:0 (针对 公开), 1 (针对 私有), 2 (针对 密码)。 默认值为:1
password
可选 string
密码. 仅在 privacy 字段设置为 2 时有效。
email
可选 integer
定期邮件报告。 可能的值为:0 (针对 已禁用), 1 (针对 已启用)。 默认值为:0
exclude_bots
可选 integer
排除常见机器人,不进行跟踪。 可能的值为:0 (针对 已禁用), 1 (针对 已启用)。 默认值为:1
exclude_params
可选 string
Exclude URL query parameters from being tracked. 每行一个。
exclude_ips
可选 string
排除特定 IP,不进行跟踪。 每行一个。
favorited_at
可选 string
Favorited at date in Y-m-dTH:i:s format.
更新

API 端点:

PUT PATCH
https://yzl.cc/api/v1/websites/{id}

请求示例:

curl --location --request PUT 'https://yzl.cc/api/v1/websites/{id}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer {api_key}'
参数
类型
描述
privacy
可选 integer
隐私. 可能的值为:0 (针对 公开), 1 (针对 私有), 2 (针对 密码)。
password
可选 string
密码. 仅在 privacy 字段设置为 2 时有效。
email
可选 integer
定期邮件报告。 可能的值为:0 (针对 已禁用), 1 (针对 已启用)。
exclude_bots
可选 integer
排除常见机器人,不进行跟踪。 可能的值为:0 (针对 已禁用), 1 (针对 已启用)。
exclude_params
可选 string
Exclude URL query parameters from being tracked. 每行一个。
exclude_ips
可选 string
排除特定 IP,不进行跟踪。 每行一个。
favorited_at
可选 string
Favorited at date in Y-m-dTH:i:s format.
删除

API 端点:

DELETE
https://yzl.cc/api/v1/websites/{id}

请求示例:

curl --location --request DELETE 'https://yzl.cc/api/v1/websites/{id}' \
--header 'Authorization: Bearer {api_key}'