# 说明
返回符合查询条件的所有分组(分页显示,默认一页30条)
# 提示
”未分组“id为 -1,不可查询不可修改不可删除
# url
https://api.tapd.cn/mini_item_categories
# 支持格式
JSON/XML(默认JSON格式)
# HTTP请求方式
GET
# 请求数限制
默认返回 30 条。可通过传 limit 参数设置,最大取 200。也可以传 page 参数翻页
# 请求参数
字段名 | 必选 | 类型及范围 | 说明 | 特殊规则 |
---|---|---|---|---|
id | 否 | integer | id | 支持多ID查询 |
workspace_id | 是 | integer | 空间ID | |
name | 否 | string | 分组名称 | 支持模糊匹配 |
created | 否 | datetime | 创建时间 | 支持时间查询 |
modified | 否 | datetime | 最后修改时间 | 支持时间查询 |
limit | 否 | integer | 设置返回数量限制,默认为30 | |
page | 否 | integer | 返回当前数量限制下第N页的数据,默认为1(第一页) | |
order | 否 | string | 排序规则,规则:字段名 ASC或者DESC,然后 urlencode | 如按创建时间逆序:order=created%20desc |
fields | 否 | string | 设置获取的字段,多个字段间以','逗号隔开 |
# 调用示例及返回结果
# 获取空间下分组
# curl 使用 Basic Auth 鉴权调用示例
curl -u 'api_user:api_password' 'https://api.tapd.cn/mini_item_categories?workspace_id=69993260'
# curl 使用 OAuth Access Token 鉴权调用示例
curl -H 'Authorization: Bearer ACCESS_TOKEN' 'https://api.tapd.cn/mini_item_categories?workspace_id=69993260'
# 返回结果
{
"status": 1,
"data": [
{
"Category": {
"id": "1069993260001015127",
"workspace_id": "69993260",
"name": "test",
"description": null,
"parent_id": "0",
"modified": "2023-07-03 20:15:36",
"created": "2023-07-03 20:14:28",
"creator": "orangecyang",
"modifier": "orangecyang"
}
},
{
"Category": {
"id": "1069993260000103441",
"workspace_id": "69993260",
"name": "my_cate",
"description": null,
"parent_id": "0",
"modified": "2022-12-28 11:06:29",
"created": "2022-12-28 11:06:26",
"creator": "orangecyang",
"modifier": "orangecyang"
}
}
],
"info": "success"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# 分组字段说明
# 分组重要字段说明
字段 | 说明 |
---|---|
id | id |
workspace_id | 空间ID |
name | 分组名称 |
created | 创建时间 |
modified | 最后修改时间 |