:param alert_id: Alert identifier
            :return: TheHive Alert
            :rtype: json
486589
def get_alert(self, alert_id):
        
        req = self.url + "/api/alert/{}".format(alert_id)

        try:
            return requests.get(req, proxies=self.proxies, auth=self.auth, verify=self.cert)
        except requests.exceptions.RequestException as e:
            raise AlertException("Alert fetch error: {}".format(e))
889425
def get_notification(self, id):
        
        url = self._base_url + "/3/notification/{0}".format(id)
        resp = self._send_request(url)
        return Notification(resp, self)
719018
def get_registration_id_info(self, registration_id):
        
        response = self.registration_info_request(registration_id)
        if response.status_code == 200:
            return response.json()
        return None
46151
def get_alerts_for_trigger(trigger_id)
      # TODO: add additional filters
      return [] unless trigger_id

      url = '/?triggerIds=' + trigger_id
      ret = http_get(url)
      val = []
      ret.each { |a| val.push(Alert.new(a)) }
      val
    end
1220326
def get_log_id(cls, id):
        
        conn = Qubole.agent()
        r = conn.get_raw(cls.element_path(id) + "/logs")
        return r.text
496145
def get_notification(self, notification_id):
        
        log.debug("getting notification '{}'...".format(notification_id))
        cmd, url = DEVICE_URLS["get_notification"]
        return self._exec(cmd, url.replace(":id", notification_id))
360746
def dedup_alert(self, alert, history):
        
        query = {
            'environment': alert.environment,
            'resource': alert.resource,
            'event': alert.event,
            'severity': alert.severity,
            'customer': alert.customer
        }

        now = datetime.utcnow()
        update = {
            '$set': {
                'status': alert.status,
                'service': alert.service,
                'value': alert.value,
                'text': alert.text,
                'timeout': alert.timeout,
                'rawData': alert.raw_data,
                'repeat': True,
                'lastReceiveId': alert.id,
                'lastReceiveTime': now
            },
            '$addToSet': {'tags': {'$each': alert.tags}},
            '$inc': {'duplicateCount': 1}
        }

        # only update those attributes that are specifically defined
        attributes = {'attributes.' + k: v for k, v in alert.attributes.items()}
        update['$set'].update(attributes)

        if alert.update_time:
            update['$set']['updateTime'] = alert.update_time

        if history:
            update['$push'] = {
                'history': {
                    '$each': [history.serialize],
                    '$slice': -abs(current_app.config['HISTORY_LIMIT'])
                }
            }

        return self.get_db().alerts.find_one_and_update(
            query,
            update=update,
            return_document=ReturnDocument.AFTER
        )
1243284
def getAlertContacts(self, alertContacts=None, offset=None, limit=None):
            
            url = self.baseUrl
            url += "getAlertContacts?apiKey=%s" % self.apiKey
            if alertContacts:
                url += "&alertContacts=%s" % alertContacts
            if offset:
                url += "&offset=%s" % offset
            if limit:
                url += "&limit=%s" % limit
            url += "&format=json"
            return self.requestApi(url)
909901
def update(self, id, data):
        
        id = self.as_id(id)
        response = self.http.patch(
            '%s/%s' % (self, id), json=data, auth=self.auth
        )
        response.raise_for_status()
        return response.json()
949468
def alerts(self):
        """"""
        endpoint = '/'.join((self.endpoint, self.id, 'alerts'))
        return self.alertFactory.find(
            endpoint=endpoint,
            api_key=self.api_key,
        )
1078619
def get_alert(self, nbprocess=0, countmin=None, countmax=None, header="", log=False):
        """"""
        if nbprocess is None:
            return 'OK'
        if countmin is None:
            countmin = nbprocess
        if countmax is None:
            countmax = nbprocess
        if nbprocess > 0:
            if int(countmin) <= int(nbprocess) <= int(countmax):
                return 'OK'
            else:
                return 'WARNING'
        else:
            if int(countmin) == 0:
                return 'OK'
            else:
                return 'CRITICAL'
930579
def archive_all_alerts(self):
        
        js = json.dumps({'cmd': 'archive-all-alarms'})
        params = urllib.urlencode({'json': js})
        answer = self._read(self.api_url + 'cmd/evtmgr', params)
1085209
protected String getAlertUrl(BigInteger id) {
		String template = _config.getValue(Property.AUDIT_ALERT_URL_TEMPLATE.getName(), Property.AUDIT_ALERT_URL_TEMPLATE.getDefaultValue());

		return template.replaceAll("\\$alertid\\$", String.valueOf(id));
	}
418583
def wf_notificant_id?(id)
      return true if id.is_a?(String) && id =~ /^\w{16}$/
      raise Wavefront::Exception::InvalidNotificantId
    end
877358
def get_severity(self, alert):
        
        query = {
            'environment': alert.environment,
            'resource': alert.resource,
            '$or': [
                {
                    'event': alert.event,
                    'severity': {'$ne': alert.severity}
                },
                {
                    'event': {'$ne': alert.event},
                    'correlate': alert.event
                }],
            'customer': alert.customer
        }
        r = self.get_db().alerts.find_one(query, projection={'severity': 1, '_id': 0})
        return r['severity'] if r else None
771500
def _fix_alert_poster(self, state, shard):
        '''
        
        '''
        recp = recipient.Broadcast(AlertPoster.protocol_id, shard)
        state.alerter.update_recipients(recp)
1330447
def get_activity(self, id_num):
        
        url = self._build_url('my', 'activities', id_num)
        return self._json(url)