Because you mentioned the Settings API I assume you want to do AJAX from the admin area of wordpress. You have some research to do, so my answer is to check out these:
http://dobsondev.com/2015/06/12/wordpress-ajax-example/
https://pippinsplugins.com/custom-database-api-reasons-for-custom-tables-and-an-api/
That should get you where you need to go. Happy WordPressing!