def create_indicator(
        self,
        cofense_object,
        indicator_threat_type,
        indicator_source,
        threat_level,
        threat_value,
        sentinel_indicator_name,
    ):
        """To create indicators into cofense triage."""
        try:
            __method_name = inspect.currentframe().f_code.co_name
            # Posting indicator into cofense triage.
            (
                post_indicator_status_code,
                post_response_json,
            ) = cofense_object.post_indicators(
                threat_level=threat_level,
                threat_type=indicator_threat_type,
                threat_value=threat_value,
                threat_source=SENTINEL_SOURCE_PREFIX + indicator_source,
                sentinel_indicator_name=sentinel_indicator_name,
            )

            # if status code is 200-299.
            if post_indicator_status_code >= 200 and post_indicator_status_code <= 299:
                # getting the cofense triage indicator id.
                cofense_id = post_response_json.get("data", {}).get("id")

                applogger.debug(
                    "{}(method={}) : {} : "
                    "Indicator successfully created into Cofense with id : {}.".format(
                        LOGS_STARTS_WITH, __method_name, SENTINEL_TO_COFENSE, cofense_id
                    )
                )

                # updating the sentinel name - cofense id into the id table.
                self.sentinel_cofense_id_table[sentinel_indicator_name] = cofense_id
                try:
                    self.sentinel_cofense_id_table_state.post(
                        json.dumps(self.sentinel_cofense_id_table)
                    )
                except Exception as error:
                    applogger.error(
                        "{}(method={}) : {} Error: {} : "
                        "Error occurred while posting sentinel cofense mapping id table data"
                        " to sentinel cofense id table state manager.".format(
                            LOGS_STARTS_WITH, __method_name, SENTINEL_TO_COFENSE, error
                        )
                    )
                    raise error

            # nothing for 422 status code.

        except CofenseException as error:
            applogger.error(
                "{}(method={}) : {} : Error occurred while creating indicator in cofense : {}".format(
                    LOGS_STARTS_WITH, __method_name, SENTINEL_TO_COFENSE, error
                )
            )
            raise CofenseException()
To create indicators into cofense triage.
Solutions/CofenseTriage/Data Connectors/CofenseTriageDataConnector/NonCofenseBasedIndicatorCreatorToCofense/sentinel.py