Fetch machine details
GET/api/v1/machines/:machineIdOrAlias
This API endpoint retrieve detailed information of a machine, including basic details, networking, telemetry, and system information. identified by the provided machineId or machine alias.
Request
Path Parameters
machineIdOrAlias stringrequired
The machineId - unique id of the machine, alias - machine alias
Responses
- 200
Success response
- application/json
- Schema
- Example (from schema)
- Fetch machine details example
Schema
Array [
]
success boolean
message string
status string
statusCode int32
errorCode string
subErrors object[]
payload
object
Schema for machines response type
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
{
"success": true,
"message": "string",
"status": "string",
"statusCode": 0,
"errorCode": "string",
"subErrors": [
{}
],
"payload": {
"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"
}
}
}
Fetch machine details response example
{
"success": true,
"message": "Machine details fetched successfully",
"status": "OK",
"statusCode": 200,
"errorCode": "",
"subErrors": [
{}
],
"payload": {
"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"
}
}
}
Loading...