PHP includes with AJAX actions

“…I need them to authenticate the database connection.”

Not exactly sure this is what you want, but in your ajax function you can connect to and use a database if you declare the global variable $wpdb.

Here’s a simple example:

function api_list_devices() {
    global $wpdb;

    $name = $_POST['name']; // ajax call sends "name"

    // try to insert $name into "people" tables "name" column
    if($wpdb->insert('people',array(
        'name'=>$name 
    ))===FALSE){
        echo "Error";
    }
    else {
        echo "Person '".$name. "' has been successfully added;
    }
}