后端是 Django Python 框架,它为此应用程序提供 REST API。下面是 REST URL 的输出。
{
meta: {
limit: 1,
next: "/api/v2.0/deliverable/?limit=1&format=json&order_by=-id&numb=339&offset=1",
offset: 0,
previous: null,
total_count: 200
},
objects: [
{
bcontext: "/api/v2.0/numbcontext/2/",
bugs: [ ],
numid: {
numtype: "beta",
branch: "mybranch",
numidstatus: [
{
numid: "/api/v2.0/numid/525030/",
failurereason: "",
id: "372734",
lastupdate: "2013-04-29T11:28:47",
overridden: false,
overridedesc: "",
overrideuser: null,
recommended: true,
resource_uri: "/api/v2.0/numidstatus/372734/",
stype: {
id: "1",
name: "2hr",
resource_uri: "/api/v2.0/s/1/"
}
},
{
numid: "/api/v2.0/numid/525031/",
failurereason: "",
id: "372735",
lastupdate: "2013-04-29T11:28:48",
overridden: false,
overridedesc: "",
overrideuser: null,
recommended: true,
resource_uri: "/api/v2.0/numidstatus/372735/",
stype: {
id: "1",
name: "2hr",
resource_uri: "/api/v2.0/s/1/"
}
}
]
id: "904930",
cset: 2268936,
coverage: false
},
endtime: "2013-04-29T08:32:27",
starttime: "2013-04-29T07:50:15"
}
]
}
此查询返回 20 个结果,因此我通过 limit=1 对其进行过滤。但我只需要访问numid的子组件,即我想访问值为989898的cset。
我试过这个网址,但它不起作用;“ http://example.com/api/v2.0/deliverable/?numb=339&cset=989898&limit=1&order_by=-id&format=json ”
请帮我。