Add network
POST/api/v1/networks
This API endpoint add a network to an account. You can specify details during the addition process, including a network key managed by Mecha or providing your own key.
Request
- application/json
Body
required
The request body containing the required details to add network
ipSubnet stringrequired
Allowed with CIDR /24
networkName stringrequired
networkKey string
isDefault boolean
isNetworkKeyManaged boolean
Responses
- 200
Success response
- application/json
- Schema
- Example (from schema)
- Create network details example
Schema
success boolean
message string
status string
statusCode int32
errorCode string
subErrors object[]
payload
object
Networks schema
networkId string
provider string
ipSubnet string
networkName string
isDefault boolean
isNetworkKeyManaged boolean
{
"success": true,
"message": "string",
"status": "string",
"statusCode": 0,
"errorCode": "string",
"subErrors": [
{}
],
"payload": {
"networkId": "string",
"provider": "string",
"ipSubnet": "string",
"networkName": "string",
"isDefault": true,
"isNetworkKeyManaged": true
}
}
Create network details response example
{
"success": true,
"message": "Network added successfully",
"status": "OK",
"statusCode": 200,
"errorCode": "",
"subErrors": [
{}
],
"payload": {
"networkId": "xxb63e2aaedx-pffc-123",
"provider": "provider",
"ipSubnet": "10.0.0.0/24",
"networkName": "test",
"isDefault": true,
"isNetworkKeyManaged": true
}
}
Loading...