def post(self, trigger):
        """
        Create a new trigger.

        Handles requests:
            POST /triggers/
        """
        try:
            trigger_db = TriggerService.create_trigger_db(trigger)
        except (ValidationError, ValueError) as e:
            LOG.exception("Validation failed for trigger data=%s.", trigger)
            abort(http_client.BAD_REQUEST, six.text_type(e))
            return

        extra = {"trigger": trigger_db}
        LOG.audit("Trigger created. Trigger.id=%s" % (trigger_db.id), extra=extra)
        trigger_api = TriggerAPI.from_model(trigger_db)

        return Response(json=trigger_api, status=http_client.CREATED)

        Create a new trigger.

        Handles requests:
            POST /triggers/
        
st2api/st2api/controllers/v1/triggers.py