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

        Handles requests:
            POST /triggertypes/
        """

        try:
            triggertype_db = TriggerTypeAPI.to_model(triggertype)
            triggertype_db = TriggerType.add_or_update(triggertype_db)
        except (ValidationError, ValueError) as e:
            LOG.exception("Validation failed for triggertype data=%s.", triggertype)
            abort(http_client.BAD_REQUEST, six.text_type(e))
            return
        else:
            extra = {"triggertype_db": triggertype_db}
            LOG.audit(
                "TriggerType created. TriggerType.id=%s" % (triggertype_db.id),
                extra=extra,
            )
            if not triggertype_db.parameters_schema:
                TriggerTypeController._create_shadow_trigger(triggertype_db)

        triggertype_api = TriggerTypeAPI.from_model(triggertype_db)

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

        Create a new triggertype.

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