tmp/src/things/things.py
def removeThing(self, thingTypeId, thingId):
        """
        Delete an existing thing.
        It accepts thingTypeId (string) and thingId (string) as parameters
        In case of failure it throws APIException
        """
        thingUrl = ApiClient.thingUrl % (self.host, thingTypeId, thingId)

        r = requests.delete(thingUrl, auth=self.credentials, verify=self.verify)
        status = r.status_code
        if status == 204:
            self.logger.debug("Thing was successfully removed")
            return True
        elif status == 401:
            raise ibmiotf.APIException(401, "The authentication token is empty or invalid", None)
        elif status == 403:
            raise ibmiotf.APIException(403, "The authentication method is invalid or the api key used does not exist", None)
        elif status == 404:
            raise ibmiotf.APIException(404, "A thing type or thing instance with the specified id does not exist.", None)
        elif status == 409:
            raise ibmiotf.APIException(409, "The thing instance is aggregated into another thing instance.", None)
        elif status == 500:
            raise ibmiotf.APIException(500, "Unexpected error", None)
        else:
            raise ibmiotf.APIException(None, "Unexpected error", None)
def removeThing(self, thingTypeId, thingId):
        """
        Delete an existing thing.
        It accepts thingTypeId (string) and thingId (string) as parameters
        In case of failure it throws APIException
        """
        thingUrl = ApiClient.thingUrl % (self.host, thingTypeId, thingId)

        r = requests.delete(thingUrl, auth=self.credentials, verify=self.verify)
        status = r.status_code
        if status == 204:
            self.logger.debug("Thing was successfully removed")
            return True
        elif status == 401:
            raise ibmiotf.APIException(401, "The authentication token is empty or invalid", None)
        elif status == 403:
            raise ibmiotf.APIException(403, "The authentication method is invalid or the api key used does not exist", None)
        elif status == 404:
            raise ibmiotf.APIException(404, "A thing type or thing instance with the specified id does not exist.", None)
        elif status == 409:
            raise ibmiotf.APIException(409, "The thing instance is aggregated into another thing instance.", None)
        elif status == 500:
            raise ibmiotf.APIException(500, "Unexpected error", None)
        else:
            raise ibmiotf.APIException(None, "Unexpected error", None)
Delete an existing thing.
        It accepts thingTypeId (string) and thingId (string) as parameters
        In case of failure it throws APIException