API Reference (v2)UnitsSub-units
Remove sub-unit
Remove a sub-unit relationship from a parent unit by serial number. Only unlinks the parent-child relationship; neither unit is deleted from the system.
DELETE
/v2/units/{serial_number}/childrenAuthorizationBearer <token>
API key for authentication. Use format: Bearer YOUR_API_KEY
In: header
Path Parameters
serial_numberstring
Serial number of the parent unit
Query Parameters
child_serial_numberstring
Serial number of the sub-unit to remove
Length
1 <= length <= 60Response Body
from tofupilot.v2 import TofuPilot
# Initialize the TofuPilot client
client = TofuPilot()
# Execute the operation
result = client.units.remove_child(
serial_number="string",
child_serial_number="SUB-001"
)
# Handle response
print(result){
"id": "550e8400-e29b-41d4-a716-446655440000"
}{
"message": "Bad request",
"code": "BAD_REQUEST",
"issues": []
}{
"message": "Unauthorized",
"code": "UNAUTHORIZED",
"issues": []
}{
"message": "Not found",
"code": "NOT_FOUND",
"issues": []
}{
"message": "Internal server error",
"code": "INTERNAL_SERVER_ERROR",
"issues": []
}How is this guide?