You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// swagger:route GET /v1/file/download/{allocation} GetDownloadFile
259
259
// Download a file.
260
260
//
261
-
// Download Handler (downloadFile).
261
+
// Download Handler (downloadFile). The response is either a byte stream or a FileDownloadResponse, which contains the file data or the thumbnail data, and the merkle proof if the download is verified.
262
+
// This depends on the "X-Verify-Download" header. If the header is set to "true", the response is a FileDownloadResponse, otherwise it is a byte stream.
Copy file name to clipboardExpand all lines: swagger.md
+69-11Lines changed: 69 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -44,10 +44,11 @@ Documentation of the blobber API.
44
44
| GET | /v1/file/list/{allocation} |[get list files](#get-list-files)| List files. |
45
45
| GET | /v1/marketplace/shareinfo/{allocation} |[get list share info](#get-list-share-info)| List shared files. |
46
46
| GET | /v1/file/objecttree/{allocation} |[get object tree](#get-object-tree)| Get path object tree. |
47
-
| GET | /v1/file/playlist/{allocation} |[get playlist](#get-playlist)| Get playlist. |
47
+
| GET | /v1/playlist/latest/{allocation} |[get playlist](#get-playlist)| Get playlist. |
48
48
| GET | /v1/playlist/file/{allocation} |[get playlist file](#get-playlist-file)| Get playlist file. |
49
-
| GET | /v1/file/refs/{allocation} |[get recent refs](#get-recent-refs)| Get recent references. |
49
+
| GET | /v1/file/refs/recent/{allocation} |[get recent refs](#get-recent-refs)| Get recent references. |
50
50
| GET | /v1/file/referencepath/{allocation} |[get reference path](#get-reference-path)| Get reference path. |
51
+
| GET | /v1/file/refs/{allocation} |[get refs](#get-refs)| Get references. |
51
52
| POST | /v1/connection/commit/{allocation} |[post commit](#post-commit)| Commit operation. |
52
53
| POST | /v1/connection/create/{allocation} |[post connection](#post-connection)| Store connection in DB. |
53
54
| POST | /v1/file/copy/{allocation} |[post copy](#post-copy)| Copy a file. |
@@ -353,7 +354,8 @@ Status: OK
353
354
GET /v1/file/download/{allocation}
354
355
```
355
356
356
-
Download Handler (downloadFile).
357
+
Download Handler (downloadFile). The response is either a byte stream or a FileDownloadResponse, which contains the file data or the thumbnail data, and the merkle proof if the download is verified.
358
+
This depends on the "X-Verify-Download" header. If the header is set to "true", the response is a FileDownloadResponse, otherwise it is a byte stream.
| allocation |`path`| string |`string`|| ✓ || allocation ID |
917
+
| ALLOCATION-ID |`header`| string |`string`|| ✓ || The ID of the allocation in question. |
918
+
| X-App-Client-ID |`header`| string |`string`|| ✓ || The ID/Wallet address of the client sending the request. |
919
+
| X-App-Client-Key |`header`| string |`string`|| ✓ || The key of the client sending the request. |
920
+
| X-App-Client-Signature |`header`| string |`string`|||| Digital signature of the client used to verify the request if the X-Version is not "v2" |
921
+
| X-App-Client-Signature-V2 |`header`| string |`string`|||| Digital signature of the client used to verify the request if the X-Version is "v2" |
922
+
| auth_token |`query`| string |`string`|||| The auth ticket for the file to show meta data of if the client does not own it. Check File Sharing docs for more info. |
923
+
| fileType |`query`| string |`string`|||| Type of the references to list. Can be "f" for file or "d" for directory. Both will be retrieved if not provided. |
924
+
| level |`query`| integer |`int64`|||| Level of the references to list (number of parents of the reference). Can be "0" for root level or "1" for first level and so on. All levels will be retrieved if not provided. |
925
+
| offsetDate |`query`| string |`string`|||| Date of the file to start the listing from. Used in case the user needs to list refs updated at some period of time. |
926
+
| offsetPath |`query`| string |`string`|||| Path of the file to start the listing from. Used for pagination. |
927
+
| pageLimit |`query`| integer |`int64`|||| Number of records to show per page. Default is 20. |
928
+
| path |`query`| string |`string`|||| Path of the file needed to get reference path of. Required only if no "paths" are provided. |
929
+
| path_hash |`query`| string |`string`|||| Hash of the path of the file to be copied. Required only if `path` is not provided. |
930
+
| refType |`query`| string |`string`|| ✓ || Can be "updated" (along with providing `updateDate` and `offsetDate`) to retrieve refs with updated_at date later than the provided date in both fields, or "regular" otherwise. |
931
+
| updateDate |`query`| string |`string`|||| Same as offsetDate but both should be provided. |
932
+
933
+
#### All responses
934
+
| Code | Status | Description | Has headers | Schema |
0 commit comments