Delete File
In this example we will delete a file stored on the Kelvin Platform and receive the confirmation.
You can only delete one file at a time. You need to use the id of the file which will be a UUID number. You can not use the filename.
The delete is permanent and not recoverable.
curl -X "POST" \
"https://<url.kelvin.ai>/api/v4/filestorage/66fce65f-d43f-4424-89b8-e1dd01f9193b/delete" \
-H "Authorization: Bearer <Your Current Token>" \
-H "Accept: application/json" \
-d ''
The response code will be 200 or an error code from 4XX.
from kelvin.api.client import Client
# Login
client = Client(config={"url": "https://<url.kelvin.ai>", "username": "<your_username>"})
client.login(password="<your_password>")
# Delete File in Filestorage
response = client.filestorage.delete_file(
file_id='0107549c-2069-4824-bc4f-30c7bc94172e'
)
print(response)
You will see the output like this;
None