Fetch machines list
POST/api/v1/machines/list
This API endpoint retrieve a paginated list of machines with detailed information, including basic details, networking, telemetry, and system information.
Request
Query Parameters
allParams objectrequired
allParams - pageNo, pageSize, sortBy, sortDirection, etc.
- application/json
Body
array
required
The request body containing tag's key value to search
Array [
]
property name* string
Responses
- 200
Success response
- application/json
- Schema
- Example (from schema)
- Fetch machines list example
Schema
Array [
Array [
]
]
success boolean
message string
status string
statusCode int32
errorCode string
subErrors object[]
payload
object
Schema for paginated response
content
object[]
machineId string
name string
displayIconMediaPath string
alias string
tags
object[]
key string
value string
telemetry
object
Schema for telemetry in machines response type
status int32
isMetricsEnabled boolean
isLogsEnabled boolean
lastActiveAt date-time
networking
object
Schema for networking in machines response type
fullDNSName string
ipv4Address string
networkIpSubnet string
networkId string
nodeId string
networkName string
sysInfo
object
Schema for sysinfo in machines response type
hostname string
osName string
osVersion string
osBuild string
platform string
platformRelease string
arch string
agentVersion string
agentName string
updatedAt date-time
totalPages int32
totalRecordCount int64
pageSize int32
{
"success": true,
"message": "string",
"status": "string",
"statusCode": 0,
"errorCode": "string",
"subErrors": [
{}
],
"payload": {
"content": [
{
"machineId": "string",
"name": "string",
"displayIconMediaPath": "string",
"alias": "string",
"tags": [
{
"key": "string",
"value": "string"
}
],
"telemetry": {
"status": 0,
"isMetricsEnabled": true,
"isLogsEnabled": true
},
"lastActiveAt": "2024-07-29T15:51:28.071Z",
"networking": {
"fullDNSName": "string",
"ipv4Address": "string",
"networkIpSubnet": "string",
"networkId": "string",
"nodeId": "string",
"networkName": "string"
},
"sysInfo": {
"hostname": "string",
"osName": "string",
"osVersion": "string",
"osBuild": "string",
"platform": "string",
"platformRelease": "string",
"arch": "string",
"agentVersion": "string",
"agentName": "string",
"updatedAt": "2024-07-29T15:51:28.071Z"
}
}
],
"totalPages": 0,
"totalRecordCount": 0,
"pageSize": 0
}
}
Fetch machines list response example
{
"success": true,
"message": "Machines fetched successfully",
"status": "OK",
"statusCode": 200,
"errorCode": "",
"subErrors": [
{}
],
"payload": {
"content": [
{
"machineId": "xxb63e2aaedx-xxxx-123",
"name": "Test machine",
"displayIconMediaPath": "http://example.com",
"alias": "test-alias",
"tags": [
{
"key": "test",
"value": "testValue"
}
],
"telemetry": {
"status": 0,
"isMetricsEnabled": true,
"isLogsEnabled": true
},
"lastActiveAt": "2024-06-07T07:56:57.244Z",
"networking": {
"fullDNSName": "test.test-network.mec.sh",
"ipv4Address": "100.64.0.1",
"networkIpSubnet": "100.64.0.0/24",
"networkId": "xxxx3e2aaed8-xxxx-123",
"nodeId": "cf7db4ff-4ce6-4e4c-b752-16602067c354",
"networkName": "test-network"
},
"sysInfo": {
"hostname": "12343c771234",
"osName": "linux",
"osVersion": "5.15.98-fly",
"osBuild": "string",
"platform": "string",
"platformRelease": "5.15.98-fly",
"arch": "x86-64",
"agentVersion": "1.0.0",
"agentName": "mecha-agent",
"updatedAt": "2024-06-07T07:56:57.244Z"
}
}
],
"totalPages": 2,
"totalRecordCount": 2,
"pageSize": 1
}
}
Loading...