# 说明

返回符合查询条件的所有长短ID映射(分页显示,默认一页30条)

# url

https://apiv2.tapd.tencent.com/shard_id

# 支持格式

JSON/XML(默认JSON格式)

# HTTP请求方式

GET

# 请求数限制

默认返回 30 条。可通过传 limit 参数设置,最大取 200。也可以传 page 参数翻页

# 请求参数

字段名 必选 类型及范围 说明 特殊规则
workspace_id integer 项目ID
type string 业务对象类型。取值 story 、 bug 、 task
short_id integer 短ID 支持多ID查询
long_id integer 长ID 支持多ID查询
limit integer 设置返回数量限制,默认为30
page integer 返回当前数量限制下第N页的数据,默认为1(第一页)
order string 排序规则,规则:字段名 ASC或者DESC,然后 urlencode 如按创建时间逆序:order=created%20desc
fields string 设置获取的字段,多个字段间以','逗号隔开

# 调用示例及返回结果

获取短ID为500653853,500653833缺陷的长ID信息

# curl 使用 Basic Auth 鉴权调用示例

curl -u 'api_user:api_password' 'https://apiv2.tapd.tencent.com/shard_id?short_id=500653853,500653833&type=bug'

# curl 使用 OAuth Access Token 鉴权调用示例

curl -H 'Authorization: Bearer ACCESS_TOKEN' 'https://apiv2.tapd.tencent.com/shard_id?short_id=500653853,500653833&type=bug'

# 返回结果

{
    "status": 1,
    "data": [
        {
            "ShardIdMap": {
                "type": "bug",
                "short_id": "500653853",
                "workspace_id": "10158231",
                "long_id": "1010158231500653853"
            }
        },
        {
            "ShardIdMap": {
                "type": "bug",
                "short_id": "500653833",
                "workspace_id": "10093561",
                "long_id": "1010093561500653833"
            }
        }
    ],
    "info": "success"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

# 长短ID映射字段说明

# 长短ID映射重要字段说明

字段 说明
workspace_id 项目ID
type 业务对象类型。取值 story 、 bug 、 task
short_id 短ID
long_id 长ID
上次更新: 2024-05-16 14:58:20