COST
扣费规则
items 表示本次响应实际返回的记录条数,按记录数计算后再应用最低扣费。
按本页返回条数计费,0.05 额度/条,向上取整,最低扣费额度为 1
实际扣费以响应头 x-api-cost 为准;请求失败时也可能触发最低扣费。
请求说明
参数
路径参数
emuCodestring 必填
要查询的车组编号,例如 CR400AF-C-2214。
示例:CR400AF-C-2214
查询参数
startinteger
起始时间戳,单位秒,包含边界;留空表示从最早记录开始。
示例:1735689600
endinteger
结束时间戳,单位秒,包含边界;留空表示读到最新记录。
示例:1738367999
limitinteger
正整数分页大小;当请求值超过服务端配置上限时,服务端会自动截断。
示例:20
cursorstring
分页游标。
示例:1741996800:1024
响应说明
状态码与响应格式
200
一页车组历史记录。
响应头
x-api-remainx-api-cost
application/jsonobject
响应结构
{
"type": "object",
"required": [
"ok",
"data",
"error"
],
"properties": {
"ok": {
"type": "boolean",
"required": true
},
"data": {
"type": "object",
"required": true,
"shape": {
"type": "object",
"required": [
"emuCode",
"cursor",
"limit",
"nextCursor",
"items"
],
"properties": {
"emuCode": {
"type": "string",
"required": true
},
"start": {
"type": "integer | null"
},
"end": {
"type": "integer | null"
},
"cursor": {
"type": "string",
"required": true
},
"limit": {
"type": "integer",
"required": true
},
"nextCursor": {
"type": "string",
"required": true
},
"items": {
"type": "array<object>",
"required": true,
"shape": {
"type": "array",
"items": {
"type": "object",
"required": [
"startAt",
"endAt",
"id",
"trainCode",
"startStation",
"endStation",
"line"
],
"properties": {
"startAt": {
"type": "integer",
"required": true
},
"endAt": {
"type": "integer",
"required": true
},
"id": {
"type": "string",
"required": true
},
"trainCode": {
"type": "string",
"required": true
},
"startStation": {
"type": "string",
"required": true
},
"endStation": {
"type": "string",
"required": true
},
"line": {
"type": "array<string>",
"required": true,
"shape": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
}
}
}
},
"error": {
"type": "string",
"required": true
}
}
}示例响应
{
"ok": true,
"data": {
"emuCode": "CR400AF-C-2214",
"start": 0,
"end": 9999999999,
"cursor": "",
"limit": 1,
"nextCursor": "1775388780:207709",
"items": [
{
"startAt": 1775388780,
"endAt": 1775393040,
"id": "207709",
"trainCode": "C2739",
"startStation": "北京西",
"endStation": "雄安",
"line": []
}
]
},
"error": ""
}400
Invalid path or query parameters.
响应头
x-api-remainx-api-cost
application/jsonobject
响应结构
{
"type": "object",
"required": [
"ok",
"data",
"error"
],
"properties": {
"ok": {
"type": "boolean",
"required": true
},
"data": {
"type": "string",
"required": true
},
"error": {
"type": "string",
"required": true
}
}
}示例响应
{
"ok": false,
"data": "emuCode 不能为空。",
"error": "invalid_param"
}