获取属性选项
POST/field/options
功能概要
-
获取指定属性的选项数据,支持多种属性类型(选项、成员、项目等)。
-
支持关键词搜索、UUID过滤、字段选择等功能。
-
不同属性类型返回的字段结构不同,如选项类型包含颜色信息,成员类型包含头像等。
常见用法
- 获取优先级选项:返回包含
uuid、value、background_color、color的选项列表 - 获取成员列表:返回包含
uuid、name、avatar的用户信息 - 获取项目列表:返回包含
uuid、name、status的项目信息
示例
{
"field_uuid": "field012",
"include_fields": ["uuid", "value", "background_color", "color"],
"keyword": "",
"limit": 100
}
Request
Query Parameters
teamID stringrequired
团队ID
- application/json
Body
field_uuid stringrequired
属性UUID
uuids string[]
指定返回的选项UUID列表
include_fields string[]
指定返回的字段列表
keyword string
关键词搜索
limit integer
Default value: 20
返回数量限制
offset integer
Default value: 0
偏移量
Responses
- 200
- 401
- 403
- 404
- 500
请求成功
返回示例
[
{
"uuid": "TcCM4kwC",
"value": "最高",
"background_color": "#e63422",
"color": "#FFFFFF"
},
{
"uuid": "QA5U45FD",
"value": "较高",
"background_color": "#ffe9e2",
"color": "#ff6a39"
},
{
"uuid": "BcDf5gHi",
"value": "中等",
"background_color": "#ffd700",
"color": "#000000"
}
]
字段说明
uuid: 选项的唯一标识符value: 选项的显示名称background_color: 选项的背景颜色(十六进制)color: 选项的文字颜色(十六进制)
注意: 不同属性类型返回的字段结构可能不同,上述示例为选项类型属性的返回格式。
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
property name* any
属性选项对象,字段结构因属性类型而异
[
{}
]
如果身份验证凭据不正确或丢失,则返回
- application/json
- Schema
- Example (from schema)
Schema
result string
本次请求结果,SUCCESS|FAIL
errorCode string
本次请求错误码
errorMsg string
本次请求错误信息
{
"result": "FAIL",
"errorCode": "Unauthorized",
"errorMsg": "Access token is invalid"
}
如果scope检验不通过,则返回
- application/json
- Schema
- Example (from schema)
Schema
result string
本次请求结果,SUCCESS|FAIL
errorCode string
本次请求错误码
errorMsg string
本次请求错误信息
{
"result": "FAIL",
"errorCode": "Forbidden",
"errorMsg": "Scope is invalid"
}
如果未找到资源对象,则返回
- application/json
- Schema
- Example (from schema)
Schema
result string
本次请求结果,SUCCESS|FAIL
errorCode string
本次请求错误码
errorMsg string
本次请求错误信息
{
"result": "FAIL",
"errorCode": "NotFound",
"errorMsg": "Not Found"
}
内部服务器错误
- application/json
- Schema
- Example (from schema)
Schema
result string
本次请求结果,SUCCESS|FAIL
errorCode string
本次请求错误码
errorMsg string
本次请求错误信息
{
"result": "FAIL",
"errorCode": "Internal Server Error",
"errorMsg": "Internal Server Error"
}
Loading...