def validate(self):
        """Checks that at least required params exist"""
        required = ['token', 'content']
        valid_data = {
            'exp_record': (['type', 'format'], 'record',
                'Exporting record but content is not record'),
            'imp_record': (['type', 'overwriteBehavior', 'data', 'format'],
                'record', 'Importing record but content is not record'),
            'metadata': (['format'], 'metadata',
                'Requesting metadata but content != metadata'),
            'exp_file': (['action', 'record', 'field'], 'file',
                'Exporting file but content is not file'),
            'imp_file': (['action', 'record', 'field'], 'file',
                'Importing file but content is not file'),
            'del_file': (['action', 'record', 'field'], 'file',
                'Deleteing file but content is not file'),
            'exp_event': (['format'], 'event',
                'Exporting events but content is not event'),
            'exp_arm': (['format'], 'arm',
                'Exporting arms but content is not arm'),
            'exp_fem': (['format'], 'formEventMapping',
                'Exporting form-event mappings but content != formEventMapping'),
            'exp_user': (['format'], 'user',
                'Exporting users but content is not user'),
            'exp_survey_participant_list': (['instrument'], 'participantList',
                'Exporting Survey Participant List but content != participantList'),
            'version': (['format'], 'version',
                'Requesting version but content != version')
        }
        extra, req_content, err_msg = valid_data[self.type]
        required.extend(extra)
        required = set(required)
        pl_keys = set(self.payload.keys())
        # if req is not subset of payload keys, this call is wrong
        if not set(required) <= pl_keys:
            # what is not in pl_keys?
            not_pre = required - pl_keys
            raise RCAPIError("Required keys: %s" % ', '.join(not_pre))
        # Check content, raise with err_msg if not good
        try:
            if self.payload['content'] != req_content:
                raise RCAPIError(err_msg)
        except KeyError:
            raise RCAPIError('content not in payload')
Checks that at least required params exist