4 Replies
Hi Jeff you can use something like this :
import requestsimport json api_url = "https://{ip}/api/rest/2.0/metadata/delete'" data = { "metadata": [ { "identifier": "$id" } ], "delete_disabled_objects": false } headers = {"Content-Type":"application/json", "Authorization": "Bearer x"} response = requests.post(api_url, data=json.dumps(data), headers=headers) response.json() There might be some issues, but those should be solvable
Thank you @shikharTS
I used to write a request URL inside a python script like this using Version 1.. You think this request URL will work in DELETE api?
https://{ip}/callosum/v1/tspublic/v1/metadata/delete?type=QUESTION_ANSWER_BOOK&id=["GUID here"]
I am not sure if adding as url params would work. Can you pass it as data to the API. But if a curl of this url works. This should work in the python script as well.
Thank you @shikharTS , will try your suggested script