diff --git a/python/src/cm_api/endpoints/services.py b/python/src/cm_api/endpoints/services.py
index <HASH>..<HASH> 100644
--- a/python/src/cm_api/endpoints/services.py
+++ b/python/src/cm_api/endpoints/services.py
@@ -299,6 +299,17 @@ class ApiService(BaseApiObject):
     )
     return self._cmd('hdfsEnableHa', data = json.dumps(args))
 
+  def failover_hdfs(self, active_name, standby_name):
+    """
+    Initiate a failover of an HDFS NameNode HA pair.
+
+    @param active_name: name of active NameNode.
+    @param standby_name: name of stand-by NameNode.
+    @return: Reference to the submitted command.
+    """
+    args = { ApiList.LIST_KEY : [ active_name, standby_name ] }
+    return self._cmd('hdfsFailover', data = json.dumps(args))
+
   def format_hdfs(self, *namenodes):
     """
     Format NameNode instances of an HDFS service.
[API] Add HDFS failover command.

A check for the validity of the HA pair was added to the command itself,
and a whitelist for internal commands was added to the CommandPurpose test,
so that exposing this command through the API requires less code.