1. 获取job信息
1.1 无 parentPath
格式: GET /job/{jobName}/api/json HTTP/1.1
demo: parentPath:"", jobName:cyf444_job
GET /job/cyf444_job/api/json HTTP/1.1
1.2 有 parentPath
格式: GET /job/{parentPath}/job/{jobName}/api/json
demo: parentPath:cyfdir, jobName:cyf444_job
GET /job/cyfdir/job/cyfdirjob111/api/json HTTP/1.1
2. 创建job 传参数xml
2.1 无 parentPath
格式: POST /createItem/api/json?name={jobName} HTTP/1.1
demo: parentPath:"", jobName:cyf444_job 请求体参数 jobXml
POST /createItem/api/json?name=cyf444_job HTTP/1.1
2.2 有 parentPath
格式: POST /job/{parentPath}/createItem/api/json?name={jobName} HTTP/1.1
demo: parentPath:cyfdir, jobName:cyfdirjob111
POST /job/cyfdir/createItem/api/json?name=cyfdirjob111 HTTP/1.1
参数是jobXml
3. 删除job
3.1 无 parentPath
格式: POST /job/cyf444_job/doDelete/api/json HTTP/1.1
demo: parentPath:"", jobName:cyf444_job 请求体参数 jobXml
POST /job/{jobName}/doDelete/api/json HTTP/1.1
3.2 有 parentPath
格式: POST /job/{parentPath}/job/{jobName}/doDelete/api/json HTTP/1.1
demo: parentPath:cyfdir, jobName:cyfdirjob111
POST /job/cyfdir/job/cyfdirjob111/doDelete/api/json HTTP/1.1
4. 获取视图
4.1 无 parentPath
格式: GET /api/json/api/json
demo: parentPath:""
{jenkins_host}/api/json
GET /api/json/api/json
4.2 有 parentPath
格式: GET /job/{parentPath}/api/json/api/json HTTP/1.1
demo: parentPath:cyfdir
{jenkins_host}/job/cyfdir/api/json
5. job关联到指定视图路径
viewPath: {jenkins_host}/view/cyfview2/
POST /view/cyfview2/addJobToView?name=cyf444_job&json=%7B%22name%22%3A%22cyf444_job%22%7D HTTP/1.1
viewPath: {jenkins_host}/view/aa/
POST /view/aa/addJobToView?name=cyf444_job&json=%7B%22name%22%3A%22cyf444_job%22%7D HTTP/1.1