开发者

工作空间

身份验证
API 密钥应作为 Bearer 令牌在请求的 Authorization 头中发送。 获取 API 密钥.
列表

API 端点

GET
https://clck.plus/api/v1/spaces

请求示例

curl --location --request GET 'https://clck.plus/api/v1/spaces' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'

参数

名称
类型
描述
search
选填 string
搜索查询.
search_by
选填 string
搜索字段. 可选值:名称 为 name。 默认值:name。
sort_by
选填 string
排序字段. 可选值:创建日期 为 id, 名称 为 name。 默认值:id。
sort
选填 string
排序顺序. 可选值:降序 为 desc, 升序 为 asc。 默认值:desc。
per_page
选填 integer
每页结果数. 可选值:10, 25, 50, 100。 默认值:50。
显示

API 端点

GET
https://clck.plus/api/v1/spaces/{id}

请求示例

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

API 端点

POST
https://clck.plus/api/v1/spaces

请求示例

curl --location --request POST 'https://clck.plus/api/v1/spaces' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer {api_key}' \
--data-urlencode 'name={name}'

参数

名称
类型
描述
name
必填 string
名称.
color
选填 integer
颜色. 可选值:1, 2, 3, 4, 5, 6。 默认值:1。
更新

API 端点

PUT PATCH
https://clck.plus/api/v1/spaces/{id}

请求示例

curl --location --request PUT 'https://clck.plus/api/v1/spaces/{id}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer {api_key}'

参数

名称
类型
描述
name
选填 string
名称.
color
选填 integer
颜色. 可选值:1, 2, 3, 4, 5, 6。
删除

API 端点

DELETE
https://clck.plus/api/v1/spaces/{id}

请求示例

curl --location --request DELETE 'https://clck.plus/api/v1/spaces/{id}' \
--header 'Authorization: Bearer {api_key}'