Enable network
POST/api/v1/machines/networks/enable
This API endpoint enables networking for the specified machine using the provided machineId. This action allows the machine to connect to the network and perform network-related operations.
Request
- application/json
Body
required
The request body containing the required details to enable networking
machineId stringrequired
ipv4Address string
networkId string
networkKey string
Responses
- 200
Success response
- application/json
- Schema
- Example (from schema)
- Enable network example
Schema
success boolean
message string
status string
statusCode int32
errorCode string
subErrors object[]
payload
object
Schema for network node response
nodeId string
ipv4Address string
ipv6Address string
networkId string
createdAt date-time
networks
object
Networks schema
networkId string
provider string
ipSubnet string
networkName string
isDefault boolean
isNetworkKeyManaged boolean
machineData
object
Schema for machine data in network node response
machineId string
displayIconMediaPath string
alias string
name string
lastActiveAt date-time
{
"success": true,
"message": "string",
"status": "string",
"statusCode": 0,
"errorCode": "string",
"subErrors": [
{}
],
"payload": {
"nodeId": "string",
"ipv4Address": "string",
"ipv6Address": "string",
"networkId": "string",
"createdAt": "2024-07-29T15:51:28.071Z",
"networks": {
"networkId": "string",
"provider": "string",
"ipSubnet": "string",
"networkName": "string",
"isDefault": true,
"isNetworkKeyManaged": true
},
"machineData": {
"machineId": "string",
"displayIconMediaPath": "string",
"alias": "string",
"name": "string",
"lastActiveAt": "2024-07-29T15:51:28.071Z"
}
}
}
Enable network response example
{
"success": true,
"message": "Networking enabled successfully",
"status": "OK",
"statusCode": 200,
"errorCode": "",
"subErrors": [
{}
],
"payload": {
"nodeId": "f32552de-903f-48a0-bb2d-4b39b016b3ef",
"ipv4Address": "100.64.0.1",
"ipv6Address": "string",
"networkId": "xxb63e2aaedx-pffc-123",
"createdAt": "2024-06-17T08:01:52.134Z",
"networks": {
"networkId": "xxb63e2aaedx-pffc-123",
"provider": "provider",
"ipSubnet": "10.0.0.0/24",
"networkName": "test",
"isDefault": true,
"isNetworkKeyManaged": true
},
"machineData": {
"machineId": "xxb63e2aaedx-xxxx-123",
"displayIconMediaPath": "string",
"alias": "test-alias",
"name": "Test machine",
"lastActiveAt": "2024-06-06T05:42:20.278Z"
}
}
}
Loading...