Resources Agent Query Basic Info
Query Basic Info
Http Method
GET
End Point
/api/agents
Query Parameters
Parameter Description Required Example
query Syntax of this query is the same as query box in agent management page No "Name" is "agentName"
offset Offset Yes 0
count Count Yes 100
Response
Operation Successful
Status Code
200
Response Body
Content Type
application/json
Example
[ {
"id" : 1 ,
"tokenId" : 1 ,
"name" : "string" ,
"ipAddress" : "string" ,
"os" : "WINDOWS" ,
"osVersion" : "string" ,
"osArch" : "string" ,
"cpu" : 1 ,
"memory" : 1 ,
"paused" : true ,
"lastUsedDate" : "2021-10-27T00:38:18.230+00:00"
}
]
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/agents --data-urlencode 'query="Name" is "agentName"' --data-urlencode offset=0 --data-urlencode count=100
Please wait...
Page is in error, reload to recover