From addaf49cbac96cb8a4a1e63704a7baf7d5f5aef7 Mon Sep 17 00:00:00 2001
From: Alexander Schlemmer <alexander.schlemmer@ds.mpg.de>
Date: Tue, 11 Dec 2018 11:51:37 +0100
Subject: [PATCH] documentation of the paging

---
 doc/Paging.md | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100644 doc/Paging.md

diff --git a/doc/Paging.md b/doc/Paging.md
new file mode 100644
index 00000000..608ebc04
--- /dev/null
+++ b/doc/Paging.md
@@ -0,0 +1,24 @@
+The Paging flag splits the retrieval of a (possibly huge) number entities into pages.
+
+# Syntax
+
+
+          flag   = name, [":", value];
+          name   = "P";
+          value  = [ index ], ["L", length]];
+          index  =  ? any positive integer ?;
+          length =  ? any positive integer ?;
+
+# Semantics
+
+The `index` (starting with zero) denotes the index of the first entity to be retrieved. The `length` is the number of entities on that page. If `length` is omitted, the default number of entities is returned (as configured by a server constant called ...). If only the `name` is given the paging behaves as if the `index` has been zero.
+
+# Examples
+
+`https://caosdb/Entities/all?flags=P:24L50` returns 50 entities starting with the 25th entity which would be retrieved without paging.
+
+`https://caosdb/Entities/all?flags=P:24` returns the default number of entities starting with the 25th entity which would be retrieved without paging.
+
+`https://caosdb/Entities/all?flags=P:L50` returns 50 entities starting with the first entity which would be retrieved without paging.
+
+`https://caosdb/Entities/all?flags=P` returns the default number of entities starting with the first entity which would be retrieved without paging.
\ No newline at end of file
-- 
GitLab