Update device
const url = 'http://localhost:3000/api/v1/devices/550e8400-e29b-41d4-a716-446655440000';const options = { method: 'PATCH', headers: {'X-API-Key': '<X-API-Key>', 'Content-Type': 'application/json'}, body: '{"name":"Production Edge Gateway 1","labels":{"environment":"production","region":"us-west","tier":"edge"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url http://localhost:3000/api/v1/devices/550e8400-e29b-41d4-a716-446655440000 \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <X-API-Key>' \ --data '{ "name": "Production Edge Gateway 1", "labels": { "environment": "production", "region": "us-west", "tier": "edge" } }'Updates device properties such as name and labels.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Example
550e8400-e29b-41d4-a716-446655440000Device UUID
Request Bodyrequired
Section titled “Request Bodyrequired”object
Human-readable device name
Example
Production Edge Gateway 1Key-value labels for device organization and filtering
object
Example
{ "environment": "production", "region": "us-west", "tier": "edge"}Responses
Section titled “Responses”Device updated successfully
object
Unique device identifier (UUID)
Client-provided device identifier
Human-readable device name
Current device status
Device capabilities as reported during onboarding
object
Key-value labels for device organization and filtering
object
Timestamp of last communication from device
Timestamp when device was registered
Timestamp of last device update
Margo self-reported DeviceId (properties.id from the device capabilities manifest). Unique per organization among non-deleted devices — null if this device has never reported capabilities, or if it collided with another device already holding the same value (FM-1043) and its write was rejected.
Latest reported CPU usage percentage (FM-770, from VictoriaMetrics). Null if the device has never reported telemetry.
Latest reported memory usage percentage (FM-770, from VictoriaMetrics). Null if the device has never reported telemetry.
Latest reported disk usage percentage (FM-770, from VictoriaMetrics). Null if the device has never reported telemetry.
Count of non-removed deployment instances currently targeting this device (FM-770). Always a real count, independent of telemetry availability.
Example
{ "id": "550e8400-e29b-41d4-a716-446655440000", "clientId": "edge-device-001", "name": "Production Edge Gateway 1", "status": "ONLINE", "capabilities": { "cpu": { "cores": 4, "architecture": "arm64" }, "memory": { "total": 8192 }, "containers": { "runtime": "containerd" } }, "labels": { "environment": "production", "region": "us-west", "tier": "edge" }, "lastSeenAt": "2024-01-15T10:30:00Z", "createdAt": "2024-01-01T00:00:00Z", "updatedAt": "2024-01-15T10:30:00Z", "reportedDeviceId": "wm-uc20-m3000-ax4b14pc7500001", "cpuUsagePercent": 42.5, "memoryUsagePercent": 67.2, "diskUsagePercent": 55.1, "runningWorkloadCount": 3}Bad Request - Invalid input data
Unauthorized - Invalid or missing authentication
Forbidden - Insufficient permissions
Device not found