Rest api request pool/dataset/id/<id> deleting the children dataset

Hi,

response = s.request('pool/dataset/')
print(response.json())

this will print
[{'id': 'test', 'type': 'FILESYSTEM', 'children': [{'id': 'test/newtest', 'type': 'FILESYSTEM', 'children': [], 'name': 'test/newtest', 'pool': 'test', 'encrypted': False, ...
(removed full output. )
Note there is a children dataset named test/newtest
now to delete this dataset -

response = s.request('pool/dataset/id/test/newtest', method='DELETE')
print(response.text)

will result into
404: Not Found

Not sure if i am missing something here - to delete the children dataset of the root dataset ?

Hello, I worked with this endpoint API as well. Within the ID the / need to be replaced with %2F. So your URL pool/dataset/id/test/newtest would become pool/dataset/id/test%2Fnewtest.

1 Like