RESTp - Get all tables of database Rest API to get all tables of DB

You can retrieve all tables of database easily by specifying the GET parameter. You need to pass GET parameter op="tables" to get the primary key.

  
                                //init curl
                                $ch = curl_init();
                                 //set http headers
                                curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json'));
                                // URL to be called
                                curl_setopt($ch, CURLOPT_URL, "http://pdocrud.com/RESTP/api/orders?op=tables");
                               //return as output instead of printing it
                                curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
                                //execute curl request
                                $result = curl_exec($ch);
                                //close curl connection
                                curl_close($ch);
                                //print result
                                print_r($result);
                            
  
                                jQuery(document).ready(function () {
                                    jQuery.ajax({
                                        url: "http://pdocrud.com/RESTP/api/orders?op=tables",
                                        success: function (response) {
                                            console.log(response);
                                            jQuery("#js_output").text(response);
                                        }
                                    });
                                });