Resources Build Query Basic Info
Query Basic Info
Http Method
GET
End Point
/api/builds
Query Parameters
Parameter Description Required Example
query Syntax of this query is the same as query box in builds page No "Number" is "projectName#100"
offset Offset Yes 0
count Count Yes 100
Response
Operation Successful
Status Code
200
Response Body
Content Type
application/json
Example
[ {
"id" : 1 ,
"numberScopeId" : 1 ,
"projectId" : 1 ,
"submitterId" : 1 ,
"submitterName" : "string" ,
"cancellerId" : 1 ,
"cancellerName" : "string" ,
"jobName" : "string" ,
"jobWorkspace" : "string" ,
"refName" : "string" ,
"version" : "string" ,
"number" : 1 ,
"commitHash" : "string" ,
"status" : "WAITING" ,
"submitDate" : "2021-07-29T10:11:35.128+00:00" ,
"pendingDate" : "2021-07-29T10:11:35.128+00:00" ,
"runningDate" : "2021-07-29T10:11:35.128+00:00" ,
"finishDate" : "2021-07-29T10:11:35.128+00:00" ,
"retryDate" : "2021-07-29T10:11:35.128+00:00" ,
"submitReason" : "string" ,
"errorMessage" : "string" ,
"requestId" : 1
}
]
Operation Failed
Status code
Status code other than 200 indicating the error type
Response Body
Error detail of content type "text/plain"
cURL Example
$ curl -u <login name>:<password or access token> -G https://code.onedev.io/api/builds --data-urlencode 'query="Number" is "projectName#100"' --data-urlencode offset=0 --data-urlencode count=100
Please wait...
Page is in error, reload to recover