Was the US capture of Venezuela's president legal?

Was the US capture of Venezuela's president legal?