Network
Host network interfaces.
2 endpoints · Plakar Control Plane v0.18 · Base URL, authentication and errors
List the network interfaces
GET
Badge
/api/v1/network/interfaces
Response 200 OK application/json
-
interfacesarray[object]-
addressesarray[string] -
macstring -
mtuinteger -
namestring -
oper_statestring -
upboolean
-
Errors
- 400 Bad Request (validation or deserialization error)
- 401 Missing, invalid or expired credentials
- 403 The caller may not do this
- 500 Internal Server Error (panics)
Every error returns the standard error body.
Request
curl 'https://pcp.example.com/api/v1/network/interfaces' \
-H 'Authorization: Bearer <badge>'Response 200
{
"interfaces": [
{
"addresses": [
"string"
],
"mac": "string",
"mtu": 0,
"name": "string",
"oper_state": "string",
"up": true
}
]
}Configure a network interface
POST
Badge
/api/v1/network/interfaces
Request body application/json required
-
interfacestring required -
mtuinteger
Response 200 OK application/json
-
addressesarray[string] -
macstring -
mtuinteger -
namestring -
oper_statestring -
upboolean
Errors
- 400 Bad Request (validation or deserialization error)
- 401 Missing, invalid or expired credentials
- 403 The caller may not do this
- 500 Internal Server Error (panics)
Every error returns the standard error body.
Request
curl -X POST 'https://pcp.example.com/api/v1/network/interfaces' \
-H 'Authorization: Bearer <badge>' \
-H 'Content-Type: application/json' \
-d '{
"interface": "string",
"mtu": 0
}'Response 200
{
"addresses": [
"string"
],
"mac": "string",
"mtu": 0,
"name": "string",
"oper_state": "string",
"up": true
}