def query_put_tags(classifier, classifier_id, new_value): data = json.loads(json.dumps(query_get_tags(classifier, classifier_id))) data[0]['values'].append(new_value) payload = json.dumps(data) queryURL = connection.read_cred( )['env']['PREDIX_DATA_ASSET_URI'] + "/" + classifier + "/" + classifier_id response_data = requests.put(queryURL, data=payload, headers=connection.create_asset_header()) return response_data
def query_get_tags(classifier, classifier_id): queryURL = connection.read_cred( )['env']['PREDIX_DATA_ASSET_URI'] + "/" + classifier + "/" + classifier_id response_data = requests.get(queryURL, headers=connection.create_asset_header()) return response_data.json()