summaryrefslogtreecommitdiffstats
path: root/src/fuse/cowDoc/readme.md
diff options
context:
space:
mode:
authorSimon Rettberg2024-04-08 16:07:28 +0200
committerSimon Rettberg2024-05-13 18:26:42 +0200
commitc4a26bb3930dfee339461322719f7f9a94c8de52 (patch)
treed5077dd53bb04dd7f070d22f58f7fc13852c108c /src/fuse/cowDoc/readme.md
parentgithub: Update cow test (diff)
downloaddnbd3-c4a26bb3930dfee339461322719f7f9a94c8de52.tar.gz
dnbd3-c4a26bb3930dfee339461322719f7f9a94c8de52.tar.xz
dnbd3-c4a26bb3930dfee339461322719f7f9a94c8de52.zip
[FUSE] Rename COW API endpoints again
Add a version to the URL, rest can be configured dynamically by -C as it's a simple prefix.
Diffstat (limited to 'src/fuse/cowDoc/readme.md')
-rw-r--r--src/fuse/cowDoc/readme.md25
1 files changed, 15 insertions, 10 deletions
diff --git a/src/fuse/cowDoc/readme.md b/src/fuse/cowDoc/readme.md
index acb62c1..fd3557c 100644
--- a/src/fuse/cowDoc/readme.md
+++ b/src/fuse/cowDoc/readme.md
@@ -220,9 +220,10 @@ The following configuration variables have been added to `config/cow.h`.
#define COW_SHOW_UL_SPEED 1 // enable display of ul speed in cow status file
#define COW_MAX_IMAGE_SIZE 1000LL * 1000LL * 1000LL * 1000LL; // Maximum size an image can have(tb*gb*mb*kb)
// +++++ COW API Endpoints +++++
-#define COW_API_CREATE "%s/api/file/create"
-#define COW_API_UPDATE "%s/api/file/update?guid=%s&clusterindex=%lu"
-#define COW_API_START_MERGE "%s/api/file/merge"
+#define COW_API_PREFIX "%s/v1/"
+#define COW_API_CREATE COW_API_PREFIX "file/create"
+#define COW_API_UPDATE COW_API_PREFIX "file/update?guid=%s&clusterindex=%lu"
+#define COW_API_START_MERGE COW_API_PREFIX "file/merge"
```
- `COW_MIN_UPLOAD_DELAY` sets the minimum time in seconds that must have elapsed since the last change to a cow cluster before it is uploaded.
@@ -236,10 +237,12 @@ This can help in fine-tuning `COW_MIN_UPLOAD_DELAY`.
-# REST Api
+# REST API
The following Rest API is used to transmit the data and commands to the cow server:
-### /api/File/Create
+## Required methods
+
+### v1/file/create
#### POST
##### Responses
@@ -251,7 +254,7 @@ The following Rest API is used to transmit the data and commands to the cow serv
This request is used as soon as a new cow session is created. The returned guid is used in all subsequent requests to identify the session.
-### /api/File/Update
+### v1/file/update
#### POST
##### Parameters
@@ -270,7 +273,7 @@ This request is used as soon as a new cow session is created. The returned guid
Used to upload a cluster. The cluster number is the absolute cluster number. The body contains an "application/octet-stream", where the first bytes are the bit field, directly followed by the actual cluster data.
-### /api/File/StartMerge
+### v1/file/merge
#### POST
##### Parameters
@@ -287,7 +290,9 @@ Used to upload a cluster. The cluster number is the absolute cluster number. The
| 200 | Success |
Used to start the merge on the server.
-### /api/File/GetTopModifiedBlocks
+## Optional methods, not used by dnbd3-fuse
+
+### v1/File/GetTopModifiedBlocks
#### GET
##### Parameters
@@ -305,7 +310,7 @@ Used to start the merge on the server.
This request returns a list containing the cluster IDs and the number of uploads, sorted by the number of uploads. This is useful if you want to fine-tune `COW_MIN_UPLOAD_DELAY`.
-### /api/File/Status
+### v1/File/Status
#### GET
##### Parameters
@@ -322,7 +327,7 @@ This request returns a list containing the cluster IDs and the number of uploads
Returns the SessionStatus model that provides information about the session.
-### Models
+## Models
#### BlockStatistics