@jsexpose(body_cls=TriggerAPI, status_code=http_client.CREATED)
    def post(self, trigger):
        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, str(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 trigger_api
Create a new trigger.
dataset/ETHPy150Open StackStorm/st2/st2api/st2api/controllers/v1/triggers.py/TriggerController.post