相关疑难解决方法(0)

Jenkins REST API - 使用树来引用JSON数组中的特定项

我可以使用Jenkins API通过url获取有关我的构建的信息

http://localhost:8080/job/myjob/149/api/json
Run Code Online (Sandbox Code Playgroud)

我希望能够使用树查询字符串参数查询changeSet节点.我可以成功查询非索引节点,如"duration"via

http://localhost:8080/job/myjob/149/api/json?tree=duration
Run Code Online (Sandbox Code Playgroud)

如何查询像changeSet这样的索引节点?我似乎无法在任何地方找到任何文档.

{
    "actions": [
        {
            "causes": [
                {
                    "shortDescription": "Started by an SCM change"
                }
            ]
        },
        {},
        {},
        {}
    ],
    "artifacts": [],
    "building": false,
    "description": null,
    "duration": 80326,
    "estimatedDuration": 68013,
    "executor": null,
    "fullDisplayName": "my project #149",
    "id": "2013-06-14_14-31-06",
    "keepLog": false,
    "number": 149,
    "result": "SUCCESS",
    "timestamp": 1371234666000,
    "url": "http://localhost:8080/job/my project/149/",
    "builtOn": "",
    "changeSet": {
        "items": [
            {
                "affectedPaths": [
                    "SearchViewController.m",
                    "Sample.strings"
                ],
                "author": {
                    "absoluteUrl": "http://localhost:8080/user/my user",
                    "fullName": "My User"
                },
                "commitId": "9032",
                "timestamp": 1371234304048, …
Run Code Online (Sandbox Code Playgroud)

rest json jenkins

33
推荐指数
1
解决办法
5万
查看次数

标签 统计

jenkins ×1

json ×1

rest ×1