Removes one blob from a workspace's file store.
Removes one blob from a workspace's file store.
DELETE /v1/team/files/{workspace}/{filename}
| Address | https://api.hanzo.ai/v1/team/files/{workspace}/{filename} |
| Method | DELETE |
| Operation | delete_team_files_by_workspace_by_filename |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Removes one blob from a workspace's file store. The caller must hold a verified session AND be a member of the workspace; anything else — an unknown workspace, another tenant's workspace, a workspace the caller is not in — answers the same 404, so a probe learns nothing about what exists.
It is IDEMPOTENT: deleting a present or an absent blob both answer 204, so a delete never confirms a blob's existence and a foreign blob id (a physical key the caller can never name into another tenant's box) is a harmless no-op. A storage backend that is unavailable fails closed with 502 rather than lying about success.
Request
3 fields.
| Field | In | Type | Required | Description |
|---|---|---|---|---|
workspace | path | string | yes | Workspace is the workspace uuid the blob belongs to, from the path. |
filename | path | string | yes | Filename is the last path segment, which the front sets to the blob id when it sends no explicit file. |
file | query | string | — | File is the blob id, and wins over the path segment when both are present. |
Response
| Status | Body | Meaning |
|---|---|---|
204 | — | no content |
Failure carries the platform error shape — see Errors.
Examples
hanzo team files workspace rm <workspace> <filename>import { Configuration, TeamApi } from 'hanzoai';
const api = new TeamApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.deleteTeamFilesByWorkspaceByFilename({ workspace: 'workspace', filename: 'filename' });from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import TeamApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = TeamApi(client).delete_team_files_by_workspace_by_filename(workspace='workspace', filename='filename')cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.TeamAPI.DeleteTeamFilesByWorkspaceByFilename(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::apis::{configuration::Configuration, team_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = team_api::delete_team_files_by_workspace_by_filename(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.TeamApi;
ApiClient client = new ApiClient();
client.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + System.getenv("HANZO_API_KEY")));
var result = new TeamApi(client).deleteTeamFilesByWorkspaceByFilename();curl -X DELETE https://api.hanzo.ai/v1/team/files/<workspace>/<filename> \
-H "Authorization: Bearer $HANZO_API_KEY"The door reaches team through the team tool, which names its 18 operations with its own verbs — this one among them, under a name only the door declares. describe explains any of them:
curl -X POST https://api.hanzo.ai/v1/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "describe",
"arguments": {
"op": "get_collaborator"
}
}
}'How is this guide?