def _event(self, title, text, date_happened=None, handle=None, priority=None, related_event_id=None, tags=None, host=None, device_name=None, aggregation_key=None, source_type_name=None,**kwargs):
        body = {
            'title': title,
            'text': text,
        }

        if date_happened is not None:
            body['date_happened'] = date_happened

        if handle is not None:
            body['handle'] = handle

        if priority is not None:
            body['priority'] = priority

        if related_event_id is not None:
            body['related_event_id'] = related_event_id

        if tags is not None:
            body['tags'] = ','.join(tags)

        if host is not None:
            body['host'] = host

        if device_name is not None:
            body['device_name'] = device_name

        if aggregation_key is not None:
            body['aggregation_key'] = aggregation_key

        if source_type_name is not None:
            body['source_type_name'] = source_type_name

        body.update(kwargs)

        return self.http_request('POST', '/events', body,
            response_formatter=lambda x: x['event']['id'],
        )
Post an event.
dataset/ETHPy150Open DataDog/dogapi/src/dogapi/http/events.py/EventApi._event