Deze pagina is nog niet beschikbaar in uw eigen taal. We werken er hard aan om meer taalversies toe te voegen. Bedankt voor uw steun.
Querying the Latest Successful Build History of a Specified Code Repository
Function
Querying the Latest Successful Build History of a Specified Code Repository
Calling Method
For details, see Calling APIs.
URI
GET /v3/jobs/{project_id}/last-history
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
CodeArts project ID, which is a string of 32 digits and lowercase letters. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
repository_name |
Yes |
String |
Name of the code repository. Chinese characters are not supported. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. Obtain the value by calling the IAM service interface. (value of X-Subject-Token in the response header). Global tenant tokens are not supported. Use a region-level token whose scope is project. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
record_id |
String |
Build record ID, which is a unique key. |
job_id |
String |
build task ID |
job_name |
String |
build task Name |
build_number |
Integer |
Build ID |
start_time |
String |
Start time of the build. |
end_time |
String |
End time of the build. |
result |
String |
Build Execution Result |
commit_id |
String |
commitId |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error Codes |
error_msg |
String |
Description |
Status code: 401
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error Codes |
error_msg |
String |
Description |
Status code: 403
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error Codes |
error_msg |
String |
Description |
Status code: 404
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error Codes |
error_msg |
String |
Description |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error Codes |
error_msg |
String |
Description |
Example Requests
GET https://{endpoint}/v3/jobs/6ecbc5bac7c8442fb3d2563d53c13582/last-history?repository_name=maven-demo
Example Responses
Status code: 200
OK
{ "record_id" : "20210722.16", "job_id" : "37be03edd1da430c8079504d546cc499", "job_name" : "Test Task 01", "build_number" : 16, "start_time" : "2021-07-22T16:26:52+08:00", "end_time" : "2021-07-22T16:27:15+08:00", "result" : "SUCCESS", "commit_id" : "e311c54476e0e536f0ecdeeba8dc184216fa2057" }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
400 |
Bad Request |
401 |
Unauthorized |
403 |
Forbidden |
404 |
Not Found |
500 |
Internal Server Error |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.