Example: Deleting a file permanently¶
Frequency of use | Common |
---|---|
Trigger | User initiated |
Pre-conditions |
|
Actors |
|
Communication Flow: Kotlin
Files.delete.call(
bulkRequestOf(FindByStringId(
id = "/123/folder",
)),
user
).orThrow()
/*
BulkResponse(
responses = listOf(Unit),
)
*/
Communication Flow: Curl
# ------------------------------------------------------------------------------------------------------
# $host is the UCloud instance to contact. Example: 'http://localhost:8080' or 'https://cloud.sdu.dk'
# $accessToken is a valid access-token issued by UCloud
# ------------------------------------------------------------------------------------------------------
# Authenticated as user
curl -XDELETE -H "Authorization: Bearer $accessToken" -H "Content-Type: content-type: application/json; charset=utf-8" "$host/api/files" -d '{
"items": [
{
"id": "/123/folder"
}
]
}'
# {
# "responses": [
# {
# }
# ]
# }