How to change user fields with API

hello! I want to know how to get index of user_fields? I should go to the web controller and get the index?Is there have api for getting the user_fields? Then i could get the index. Thanks.