Common Foundation Tutorial for details) + upload completion callback, instant upload, external import, new file fingerprint dedup, graffiti callback; batch packaged zip + progress query; single file download URL (302 redirect to OSS).flight_id); batch query by multiple flight_ids.upload-callback to register metadata (EXIF / GPS / shooting device / associated flight task). See Common Foundation Tutorial for details.DELETE /files is soft delete into the recycle bin, recoverable in the "Recycle Bin" module; DELETE /files/direct is hard delete not into the recycle bin, irrecoverable. Both requests return 200 immediately after being received, with actual operations executed asynchronously in the background; need to confirm results via the list interface.GET /files/{id}/url does not return business JSON; it directly 302 redirects to the OSS signed URL. The client just follows the browser / SDK default behavior.POST /files/tiny-fingerprints for dedup; for existing fingerprints, directly POST /fast-upload to register without actually transferring the file.Check New File Fingerprint Existence Status (POST /openapi/v2.0/media/api/v1/workspaces/{workspace_id}/files/tiny-fingerprints) — Before uploading, batch dedup with small fingerprints; the front-end takes the difference set to decide which files to upload.Fast Upload Media File (POST /openapi/v2.0/media/api/v1/workspaces/{workspace_id}/fast-upload) — For files with the same fingerprint already existing on OSS, skip actual upload and directly register records to the media library.Get Media Upload STS Credentials (POST /openapi/v2.0/media/api/v1/workspaces/{workspace_id}/sts) to get credentials, then use the object storage SDK to directly upload.Media Upload Completion Callback (POST /openapi/v2.0/media/api/v1/workspaces/{workspace_id}/upload-callback) — Top-level fields defined by spec: object_key, name, fingerprint, path, parent_id, sub_file_type, ext, metadata, automatic_rename, media_source, file_type, ai_alarm_objs. Business context such as EXIF / GPS / associated flight task ID is usually placed in nested fields within ext / metadata; the specific structure is subject to the interface schema.Graffiti Callback (POST /openapi/v2.0/media/api/v1/workspaces/{workspace_id}/files/{id}/graffiti-callback) — After the client uploads the graffiti annotation layer (containing several graffiti items) made on the image to OSS, call this interface to register.Import Media File (POST /openapi/v2.0/media/api/v1/workspaces/{workspace_id}/files/import) — Import media from external sources (such as datahub datasets / AI task workflow nodes) into the current project media library.Get Media File List (GET /openapi/v2.0/media/api/v1/workspaces/{workspace_id}/files) — Supports multi-dimensional filtering by file type combination, show on map, folder hierarchy, keyword, device / payload model, time range, tag, task type, etc.Get Media Resource Files (Image + Folder) (GET /openapi/v2.0/media/api/v1/workspaces/{workspace_id}/resource_files) — The server forces file_types=[image, dir], only returns images and folders, does not return videos; suitable for advanced filtering (mobile scenarios, complex multi-filter).Get Media File Details (GET /openapi/v2.0/media/api/v1/workspaces/{workspace_id}/files/{id}) — Includes basic properties / EXIF / GPS / shooting device / tags / share status / AI video processing status / panorama slice status, etc.Get Media File Count (Folder Granularity) (GET /openapi/v2.0/media/api/v1/workspaces/{workspace_id}/count) — Used for the badge number display at the folder hierarchy.Get Total Media File Count (Project Full) (GET /openapi/v2.0/media/api/v1/workspaces/{workspace_id}/file-count) — Reuses the count interface with the same handler, filters by file type.| Purpose | Interface |
|---|---|
| Create folder | POST /openapi/v2.0/media/api/v1/workspaces/{workspace_id}/files |
| Modify metadata (rename / tag / show on map / restore from recycle bin) | PUT /openapi/v2.0/media/api/v1/workspaces/{workspace_id}/files/{id} |
| Batch change "show on map" | PUT /openapi/v2.0/media/api/v1/workspaces/{workspace_id}/files |
| Batch move | POST /openapi/v2.0/media/api/v1/workspaces/{workspace_id}/files/move |
| Single file crop to generate new image (AI sample) | POST /openapi/v2.0/media/api/v1/workspaces/{workspace_id}/files/crop |
| Delete single file (default soft delete) | DELETE /openapi/v2.0/media/api/v1/workspaces/{workspace_id}/files/{id} |
| Batch soft delete (into recycle bin) | DELETE /openapi/v2.0/media/api/v1/workspaces/{workspace_id}/files |
| Batch hard delete (not into recycle bin) | DELETE /openapi/v2.0/media/api/v1/workspaces/{workspace_id}/files/direct |
Update Media File Infois a differential update by field; deleting a single file can adddestroy=trueto directly permanently delete (same as hard delete). Batch soft delete / batch hard delete return 200 immediately after being received; actual deletion is executed asynchronously in the background; need to confirm results via the list interface.
Get Media File Download URL (GET /openapi/v2.0/media/api/v1/workspaces/{workspace_id}/files/{id}/url) — The server 302 redirects directly to object storage (the response does not return business JSON); images support zoom parameters w / h / q; can switch to AI video version via is_ai_video=true (spec does not declare a "version number" parameter).Package Media Files into zip (POST /openapi/v2.0/media/api/v1/workspaces/{workspace_id}/files/zip) — Asynchronous task; check progress via Check zip Packaging Task Status (GET /openapi/v2.0/media/api/v1/workspaces/{workspace_id}/files/zip-check) to decide the download method (single package vs chunks).| Purpose | Interface |
|---|---|
| Add tags to single file (multiple at once) | POST /openapi/v2.0/media/api/v1/workspaces/{workspace_id}/files/{id}/set-tag |
Delete a single tag of a single file (form tag_name) | DELETE /openapi/v2.0/media/api/v1/workspaces/{workspace_id}/files/{id}/remove-tag |
| List of used tags under the project (auto-complete) | GET /openapi/v2.0/media/api/v1/workspaces/{workspace_id}/tags |
Query Flight Task Media by flight_id (GET /openapi/v2.0/media/api/v1/workspaces/{workspace_id}/flight-medias) — After the flight ends, call out the images / videos produced by the flight. Required query: flight_id, media_type; optional: video_source.Batch Query Flight Media by flight_ids (GET /openapi/v2.0/media/api/v1/workspaces/{workspace_id}/flight-medias/batch) — Query by multiple flight_ids at once, returns a two-dimensional array (the outer layer corresponds to flight_id, the inner layer is the media entries of that flight). Required query: flight_ids, media_type; optional: video_source.