tmp/src/things/things.py
def updateSchema(self, schemaId, schemaDefinition):
        """
        Update a schema. Throws APIException on failure.
        """
        req = ApiClient.oneSchemaUrl % (self.host, "/draft", schemaId)
        body = {"schemaDefinition": schemaDefinition}
        resp = requests.put(req, auth=self.credentials, headers={"Content-Type":"application/json"},
                           data=json.dumps(body),  verify=self.verify)
        if resp.status_code == 200:
            self.logger.debug("Schema updated")
        else:
            raise ibmiotf.APIException(resp.status_code, "HTTP error updating schema", resp)
        return resp.json()
def updateSchema(self, schemaId, schemaDefinition):
        req = ApiClient.oneSchemaUrl % (self.host, "/draft", schemaId)
        body = {"schemaDefinition": schemaDefinition}
        resp = requests.put(req, auth=self.credentials, headers={"Content-Type":"application/json"},
                           data=json.dumps(body),  verify=self.verify)
        if resp.status_code == 200:
            self.logger.debug("Schema updated")
        else:
            raise ibmiotf.APIException(resp.status_code, "HTTP error updating schema", resp)
        return resp.json()
def updateSchema ( self , schemaId , schemaDefinition ) : req = ApiClient . oneSchemaUrl % ( self . host , "/draft" , schemaId ) body = { "schemaDefinition" : schemaDefinition } resp = requests . put ( req , auth = self . credentials , headers = { "Content-Type" : "application/json" } , data = json . dumps ( body ) , verify = self . verify ) if resp . status_code == 200 : self . logger . debug ( "Schema updated" ) else : raise ibmiotf . APIException ( resp . status_code , "HTTP error updating schema" , resp ) return resp . json ( )
Update a schema. Throws APIException on failure.
Update a schema . Throws APIException on failure .