Split verification of buildKite

The BuildKite setting in config page, the original api obtains verify and get info two parts, now it should be split.

  • Api Design
paths: api/v1/pipelines/{pipelineType}
method: post
request: {
  PipelineParam:{
  token:"your_token",
  startTime: "xxx",
  endTime:"xxx",
  }
}
responses:{
  "pipelineList":
  [{
    "id": "xxx",
    "name": "xxx",
    "orgId": "xxx",
    "orgName": "xxx",
    "repository": "xxx",
    "steps": [
     "xxx",
      ]
    }]
}
  • Sequence Diagram

The new api need to be called when the Verify button is clicked. If return 200, the verification is successful.Otherwise 401 exception will be thrown.

  • Api Design
paths: api/v1/pipelines/{pipelineType}/verify
method: post
request: {
  token: "your_token"
}
responses:
  Status Code: 204
  • Exception Handler
statusmessagehintInfo
400Token cannot be empty.
401Failed to get BuildKite info_status: 401 UNAUTHORIZED, reason: xxxToken is incorrect
403Failed to call BuildKite, because of insufficient permission!Permission deny
500Internal Server Error
  • Sequence Diagram

The api should be called when entering the Metrics page. Only after two parts of data(The api and previous getPipelineSteps api) are obtained can the loading disappear.

  • Api Design
paths: api/v1/pipelines/{pipelineType}/info
method: post
request: {
  token:"your_token",
}
responses:{
  "pipelineList":
  [{
    "id": "xxx",
    "name": "xxx",
    "orgId": "xxx",
    "orgName": "xxx",
    "repository": "xxx",
    "steps": [
     "xxx",
      ]
    }]
}
When pipelineList is empty, responses 204
  • Exception Handler
statusmessagehintInfo
400Token cannot be empty.
401Failed to get BuildKite info_status: 401 UNAUTHORIZED, reason: xxxToken is incorrect
403Failed to call BuildKite, because of insufficient permission!Permission deny
500Internal Server Error
  • Sequence Diagram