If using GET, this function will list your data bundles. If using DELETE this function will delete data bundles
See the bundle creation API for an example of how to use this alongside bundle creation and file filtering to download data.
Parameters can be provided
bundlename: Lists data bundles with the exact bundlename as provided character string
bundlename__in: Lists data bundles with a bundlename as in the provided list of character strings
ready: If true only lists bundles ready to download. If False only lists bundles which are not ready
api_url = "https://arisemdsvm.science.uva.nl//api-token-auth/"
response = requests.post(api_url,{"username":username,"password":password})
token=response.json()['token']
#list all your bundles
api_url = "https://arisemdsvm.science.uva.nl//api/Databundle/"
response = requests.get(api_url,
headers={'Authorization': 'token {}'.format(token)}
)
print(response.json())
#list only ready bundles
api_url = "https://arisemdsvm.science.uva.nl//api/Databundle/"
response = requests.get(api_url,
headers={'Authorization': 'token {}'.format(token)},
params={"ready":True}
)
print(response.json())
#delete bundle with a specific name
response = requests.delete(api_url,
headers={'Authorization': 'token {}'.format(token)},
params={"bundlename":"bundlename"}
)
URL : api/Databundle/
Method : GET
DELETE
Auth required : YES
Permissions required : None
```