1. tamikura@github

    No comment

    tamikura@github
Changes in body
Source | HTML | Preview
@@ -149,5 +149,81 @@
```
buildableがジョブの有効・無効
durationが実行時間(ミリ秒)
timestampが開始時刻(UNIX時刻&ミリ秒)
+## ジョブ単体の情報取得
+api/jsonはジョブ全てだが、個別のジョブ情報は「job/\<job_name>/api/json」で取得可能
+
+```shell-session:ジョブ=test1のリクエスト
+curl http://<jenkins host>/job/test1/api/json
+```
+
+```json:レスポンス
+{
+ "actions": [ ],
+ "description": "",
+ "displayName": "test1",
+ "displayNameOrNull": null,
+ "name": "test1",
+ "url": "http://<jenkins host>/job/test1/",
+ "buildable": true,
+ "builds": [
+ {
+ "number": 2,
+ "url": "http://<jenkins host>/job/test1/2/"
+ },
+ {
+ "number": 1,
+ "url": "http://<jenkins host>/job/test1/1/"
+ }
+ ],
+ "color": "blue",
+ "firstBuild":
+ {
+ "number": 1,
+ "url": "http://<jenkins host>/job/test1/1/"
+ },
+ "healthReport":[
+ {
+ "description": "ビルドの安定性: 最近のビルドは失敗してません。",
+ "iconClassName": "icon-health-80plus",
+ "iconUrl": "health-80plus.png",
+ "score": 100
+ }
+ ],
+ "inQueue": false,
+ "keepDependencies": false,
+ "lastBuild":
+ {
+ "number": 2,
+ "url": "http://<jenkins host>/job/test1/2/"
+ },
+ "lastCompletedBuild":
+ {
+ "number": 2,
+ "url": "http://<jenkins host>/job/test1/2/"
+ },
+ "lastFailedBuild": null,
+ "lastStableBuild":
+ {
+ "number": 2,
+ "url": "http://<jenkins host>/job/test1/2/"
+ },
+ "lastSuccessfulBuild":
+ {
+ "number": 2,
+ "url": "http://<jenkins host>/job/test1/2/"
+ },
+ "lastUnstableBuild": null,
+ "lastUnsuccessfulBuild": null,
+ "nextBuildNumber": 3,
+ "property": [ ],
+ "queueItem": null,
+ "concurrentBuild": false,
+ "downstreamProjects": [ ],
+ "scm": { },
+ "upstreamProjects": [ ]
+}
+```
+
+複数のジョブ情報を取得したい場合は、複数回リクエストしないといけないので、api/jsonでdepth & treeで絞ったほうが良い感じ