public function exportMetadata($format = 'php', $fields = [], $forms = [])
    {
        $data = array(
                'token' => $this->apiToken,
                'content' => 'metadata',
                'returnFormat' => 'json'
        );
        
        #---------------------------------------
        # Process format
        #---------------------------------------
        $legalFormats = array('csv', 'json', 'php', 'xml');
        $data['format'] = $this->processFormatArgument($format, $legalFormats);
        $data['forms']  = $this->processFormsArgument($forms);
        $data['fields'] = $this->processFieldsArgument($fields);
        
        #-------------------------------------------
        # Get and process metadata
        #-------------------------------------------
        $metadata = $this->connection->callWithArray($data);
        $metadata = $this->processExportResult($metadata, $format);
        
        return $metadata;
    }