全部产品
阿里云办公

查看项目

更新时间:2018-06-26 10:56:54

描述

说明:查看您在Codepipeline中创建的项目。

请求信息

请求行 RequestLine

  1. GET /job/{JobName} HTTP/1.1

请求行参数 URI Param

名称 类型 是否必须 描述
JobName String 项目名称

返回信息

返回行 ResponseLine

  1. HTTP/1.1 200 OK

返回码 HTTP Status Code

Status Code 描述
400 Invalid Job Name supplied
401 Authentication failed
403 The request was valid, but the server is refusing action. The user might not have the necessary permissions for a resource, or may need an account of some sort.
404 Job not found
500 Internal Error

返回体 ResponseBody

  1. {
  2. "JobName": "string",
  3. "LastFailedBuild": {
  4. "BuildEnv": "string",
  5. "BuildNumber": 0,
  6. "Duration": 0,
  7. "Log": "string",
  8. "RequestId": "string",
  9. "StartTime": 0
  10. },
  11. "LastSuccessfulBuild": {
  12. "BuildEnv": "string",
  13. "BuildNumber": 0,
  14. "Duration": 0,
  15. "Log": "string",
  16. "RequestId": "string",
  17. "StartTime": 0
  18. },
  19. "RequestId": "string",
  20. "SuccessRate": 0,
  21. "TotalBuilds": 0
  22. "NextBuildNumber": 1
  23. }

返回体解释

名称 类型 描述
TotalBuilds int 构建总数
LastFailedBuild 最近一次构建失败信息
LastSuccessfulBuild 最近一次构建成功信息
BuildNumber int 构建号
NextBuildNumber int 下一次构建号

示例

  1. @Test
  2. public void getJob() {
  3. GetJobRequest getJobRequest = new GetJobRequest();
  4. try {
  5. getJobRequest.setAcceptFormat(FormatType.JSON);
  6. getJobRequest.setJobName("test");
  7. getJobRequest.setMethod(MethodType.GET);
  8. GetJobResponse getJobResponse = client.getAcsResponse(getJobRequest);
  9. Assert.assertEquals("1111",getJobRequest.getJobName());
  10. } catch (ServerException e) {
  11. e.printStackTrace();
  12. Assert.fail();
  13. } catch (ClientException e) {
  14. e.printStackTrace();
  15. Assert.fail();
  16. }
  17. }