api/MarkLogic/MLPHP/RESTAPI.php
public function delete($client = null)
    {
        $this->client = $client ?: $this->client;
        // Delete content and modules as well
        $params = array('include' => array('content', 'modules'));
        $body = null;
        $headers = array();
        $request = new RESTRequest(
            'DELETE', 'rest-apis/' . $this->name, $params, $body, $headers
        );

        $this->client->send($request);

        // Wait for server reboot
        $requestWait = new RESTRequest('GET', 'rest-apis');
        $this->waitUntilSuccess($requestWait, 3, 10);
    }
public function delete($client = null)
    {
        $this->client = $client ?: $this->client;
        // Delete content and modules as well
        $params = array('include' => array('content', 'modules'));
        $body = null;
        $headers = array();
        $request = new RESTRequest(
            'DELETE', 'rest-apis/' . $this->name, $params, $body, $headers
        );

        $this->client->send($request);

        // Wait for server reboot
        $requestWait = new RESTRequest('GET', 'rest-apis');
        $this->waitUntilSuccess($requestWait, 3, 10);
    }
Delete a REST API.

@param boolean module Optional custom REST client object.