code: def create_case_observable(self, case_id, case_observable):
  
          
  
          req = self.url + "/api/case/{}/artifact".format(case_id)
  
          if case_observable.dataType == 'file':
              try:
                  mesg = json.dumps({ "dataType": case_observable.dataType,
                      "message": case_observable.message,
                      "tlp": case_observable.tlp,
                      "tags": case_observable.tags,
                      "ioc": case_observable.ioc
                      })
                  data = {"_json": mesg}
                  return requests.post(req, data=data, files=case_observable.data[0], proxies=self.proxies, auth=self.auth, verify=self.cert)
              except requests.exceptions.RequestException as e:
                  raise CaseObservableException("Case observable create error: {}".format(e))
          else:
              try:
                  return requests.post(req, headers={'Content-Type': 'application/json'}, data=case_observable.jsonify(), proxies=self.proxies, auth=self.auth, verify=self.cert)
              except requests.exceptions.RequestException as e:
                  raise CaseObservableException("Case observable create error: {}".format(e))
docs: :param case_id: Case identifier
          :param case_observable: TheHive observable
          :type case_observable: CaseObservable defined in models.py
          :return: TheHive observable
          :rtype: json