Modify api.py to allow the third parameter for headnode_create