Skip to content

Commit 30e0a64

Browse files
authored
HTTP API: Add missing defaults/enums, fix mistakes (#718)
* HTTP API: Add some missing defaults/enums * More defaults, formatting, rev parameter in Gharial vertex/edge ops, mention startup options, add missing slowStreamingQueryThreshold option * Named graphs: Remove docs for superfluous rev query param, some rewording * Rewording, missing defaults * Index API: Backport changes to 3.11 * Apply rewording to JS API docs * Rework concept page about key generators, add padded and uuid * Users: passwd is not mandatory, PUT resets access levels * Fix shard IDs example and missing response description details parameter would require polymorphic response description (array or object) but we cannot render this at the moment * maxTransactionSize not available in 3.11 * CSS: Make the version selector gray instead of green * Unify release notes * Finish up improvements to OpenAPI descriptions Missing defaults, add uniqueItems property for indexes, fix type/structure mistakes, reword some descriptions Certain endpoints like for transactions would require multiple types (string or array of strings), but we cannot render that yet * Review feedback * Apply to 3.11 * [skip ci] Automatic commit of generated files from CircleCI
1 parent 88abd93 commit 30e0a64

File tree

110 files changed

+4258
-2712
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+4258
-2712
lines changed

site/content/3.11/concepts/data-structure/collections.md

Lines changed: 36 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -120,29 +120,42 @@ ArangoDB as opaque strings when they store or use them locally.
120120

121121
## Key generators
122122

123-
ArangoDB allows using key generators for each collection. Key generators
124-
have the purpose of auto-generating values for the `_key` attribute of a document
125-
if none was specified by the user. By default, ArangoDB uses the traditional
126-
key generator. The traditional key generator auto-generates key values that
127-
are strings with ever-increasing numbers. The increment values it uses are
128-
non-deterministic.
129-
130-
Contrary, the auto-increment key generator auto-generates deterministic key
131-
values. Both the start value and the increment value can be defined when the
132-
collection is created. The default start value is `0` and the default increment
133-
is `1`, meaning the key values it creates by default are:
134-
135-
1, 2, 3, 4, 5, ...
136-
137-
When creating a collection with the auto-increment key generator and an
138-
increment of `5`, the generated keys would be:
139-
140-
1, 6, 11, 16, 21, ...
141-
142-
The auto-increment values are increased and handed out on each document insert
143-
attempt. Even if an insert fails, the auto-increment value is never rolled back.
144-
That means there may exist gaps in the sequence of assigned auto-increment values
145-
if inserts fails.
123+
ArangoDB allows you to use different key generators for each collection.
124+
Key generators have the purpose of auto-generating a value for the `_key`
125+
attribute of a document if none was specified by the user.
126+
127+
- **traditional** (default): The `traditional` key generator auto-generates
128+
key values that are strings with ever-increasing numbers. The increment values
129+
it uses are non-deterministic (e.g. `"137"`, `"140"`, `"141"`, `"145"`, ...).
130+
131+
- **autoincrement**: The `autoincrement` key generator auto-generates
132+
deterministic key values. You can define both the start value (`offset`) and
133+
the `increment` value when creating the collection. The default start value is
134+
`0` and the default increment is `1` (`"1"`, `"2"`, `"3"`, `"4"`, `"5"`, ...).
135+
With an `increment` of `5` and `offset` of `2`: `"2"`, `"7"`, `"12"`, `"17"`, `"22"`, ...
136+
137+
The auto-increment values are increased and handed out on each document insert
138+
attempt. Even if an insert fails, the auto-increment value is never rolled back.
139+
That means there may exist gaps in the sequence of assigned auto-increment values
140+
if inserts fail.
141+
142+
The `autoincrement` key generator is only supported for collections with a
143+
single shard.
144+
145+
- **padded**: The `padded` key generator generates keys of a fixed length
146+
(16 bytes) in ascending lexicographical sort order. This is ideal for the
147+
RocksDB storage engine, which slightly benefits keys that are inserted in
148+
lexicographically ascending order. The sequence of generated keys is not
149+
guaranteed to be gap-free (e.g. `"00000000005bb4d9"`, `"00000000005bb4e6"`, ...).
150+
151+
- **uuid**: The `uuid` key generator generates universally unique 128 bit keys,
152+
which are stored in hexadecimal human-readable format. The keys produced by
153+
this key generator are not lexicographically sorted (e.g.
154+
`"04648089-bdeb-4852-b570-f5280f68cf19"`, `"d0f1069c-e38b-4327-8e1e-6bdf7fd33865"`, ...).
155+
156+
If you specify keys for some documents but rely on key generation for other
157+
documents targeting the same collection, conflicts may occur. You can set
158+
`allowUserKeys` to `false` to only permit auto-generated keys for a collection.
146159

147160
## Synchronous replication of collections
148161

site/content/3.11/develop/http-api/administration.md

Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ paths:
4646
the `details` object may vary depending on platform and ArangoDB version.
4747
schema:
4848
type: boolean
49+
default: false
4950
responses:
5051
'200':
5152
description: |
@@ -601,6 +602,11 @@ paths:
601602
description: |
602603
Return availability information about a server.
603604
605+
The response is a JSON object with an attribute "mode". The "mode" can either
606+
be "readonly", if the server is in read-only mode, or "default", if it is not.
607+
Please note that the JSON object with "mode" is only returned in case the server
608+
does not respond with HTTP response code 503.
609+
604610
This is a public API so it does *not* require authentication. It is meant to be
605611
used only in the context of server monitoring.
606612
responses:
@@ -1146,6 +1152,7 @@ paths:
11461152
- Ongoing low priority requests
11471153
schema:
11481154
type: boolean
1155+
default: false
11491156
responses:
11501157
'200':
11511158
description: |
@@ -1280,13 +1287,13 @@ paths:
12801287
changeLevel:
12811288
description: |
12821289
whether or not compacted data should be moved to the minimum possible level.
1283-
The default value is `false`.
12841290
type: boolean
1291+
default: false
12851292
compactBottomMostLevel:
12861293
description: |
12871294
Whether or not to compact the bottommost level of data.
1288-
The default value is `false`.
12891295
type: boolean
1296+
default: false
12901297
responses:
12911298
'200':
12921299
description: |
@@ -1353,16 +1360,10 @@ paths:
13531360
The call returns an object with the servers request information
13541361
requestBody:
13551362
content:
1356-
application/json:
1363+
application/octet-stream:
13571364
schema:
1358-
type: object
1359-
required:
1360-
- body
1361-
properties:
1362-
body:
1363-
description: |
1364-
The request body can be of any type and is simply forwarded.
1365-
type: string
1365+
description: |
1366+
The request body can be of any type and is simply forwarded.
13661367
parameters:
13671368
- name: database-name
13681369
in: path
@@ -1545,8 +1546,9 @@ paths:
15451546
directly, otherwise a string produced by JSON.stringify will be
15461547
returned.
15471548
1548-
Note that this API endpoint will only be present if the server was
1549-
started with the option `--javascript.allow-admin-execute true`.
1549+
Note that this API endpoint is available if the server has been
1550+
started with the `--javascript.allow-admin-execute` startup options
1551+
enabled.
15501552
15511553
The default value of this option is `false`, which disables the execution of
15521554
user-defined code and disables this API endpoint entirely.
@@ -1562,16 +1564,10 @@ paths:
15621564
type: string
15631565
requestBody:
15641566
content:
1565-
application/json:
1567+
text/javascript:
15661568
schema:
1567-
type: object
1568-
required:
1569-
- body
1570-
properties:
1571-
body:
1572-
description: |
1573-
The request body is the JavaScript code to be executed.
1574-
type: string
1569+
description: |
1570+
The request body is the JavaScript code to be executed.
15751571
responses:
15761572
'200':
15771573
description: |

site/content/3.11/develop/http-api/analyzers.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ paths:
5454
features:
5555
description: |
5656
The set of features to set on the Analyzer generated fields.
57-
The default value is an empty array.
5857
type: array
58+
default: []
5959
uniqueItems: true
6060
items:
6161
type: string
@@ -249,9 +249,9 @@ paths:
249249
required: false
250250
description: |
251251
The Analyzer configuration should be removed even if it is in-use.
252-
The default value is `false`.
253252
schema:
254253
type: boolean
254+
default: false
255255
responses:
256256
'200':
257257
description: |

site/content/3.11/develop/http-api/batch-requests.md

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -278,17 +278,11 @@ paths:
278278
type: string
279279
requestBody:
280280
content:
281-
application/json:
281+
'text/plain; charset=utf-8':
282282
schema:
283-
type: object
284-
required:
285-
- body
286-
properties:
287-
body:
288-
description: |
289-
The multipart batch request, consisting of the envelope and the individual
290-
batch parts.
291-
type: string
283+
description: |
284+
The multipart batch request, consisting of the envelope and the individual
285+
batch parts.
292286
responses:
293287
'200':
294288
description: |

site/content/3.11/develop/http-api/cluster.md

Lines changed: 33 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,7 @@ paths:
380380
You can send another request when the DB-Server is already in maintenance mode
381381
to extend the timeout.
382382
type: integer
383+
default: 3600
383384
responses:
384385
'200':
385386
description: |
@@ -808,37 +809,44 @@ paths:
808809
type: number
809810
maximumNumberOfMoves:
810811
description: |
811-
Maximum number of moves to be computed. (Default: `1000`)
812-
type: number
812+
Maximum number of moves to be computed.
813+
type: integer
814+
default: 1000
813815
leaderChanges:
814816
description: |
815-
Allow leader changes without moving data. (Default: `true`)
817+
Allow leader changes without moving data.
816818
type: boolean
819+
default: true
817820
moveLeaders:
818821
description: |
819-
Allow moving leaders. (Default: `false`)
822+
Allow moving leaders.
820823
type: boolean
824+
default: false
821825
moveFollowers:
822826
description: |
823-
Allow moving followers. (Default: `false`)
827+
Allow moving followers.
824828
type: boolean
829+
default: false
825830
excludeSystemCollections:
826831
description: |
827-
Ignore system collections in the rebalance plan. (Default: `false`)
832+
Ignore system collections in the rebalance plan.
828833
type: boolean
834+
default: false
829835
piFactor:
830836
description: |
831-
A weighting factor that should remain untouched. (Default: `256e6`)
837+
A weighting factor that should remain untouched.
832838
833839
If a collection has more shards than there are DB-Servers, there can be a subtle
834840
form of leader imbalance. Some DB-Servers may be responsible for more shards as
835841
leader than others. The `piFactor` adjusts how much weight such imbalances get
836842
in the overall imbalance score.
837-
type: number
843+
type: integer
844+
default: 256e6
838845
databasesExcluded:
839846
description: |
840-
A list of database names to exclude from the analysis. (Default: `[]`)
847+
A list of database names to exclude from the analysis.
841848
type: array
849+
default: []
842850
items:
843851
type: string
844852
responses:
@@ -1218,37 +1226,44 @@ paths:
12181226
type: number
12191227
maximumNumberOfMoves:
12201228
description: |
1221-
Maximum number of moves to be computed. (Default: `1000`)
1222-
type: number
1229+
Maximum number of moves to be computed.
1230+
type: integer
1231+
default: 1000
12231232
leaderChanges:
12241233
description: |
1225-
Allow leader changes without moving data. (Default: `true`)
1234+
Allow leader changes without moving data.
12261235
type: boolean
1236+
default: true
12271237
moveLeaders:
12281238
description: |
1229-
Allow moving leaders. (Default: `false`)
1239+
Allow moving leaders.
12301240
type: boolean
1241+
default: false
12311242
moveFollowers:
12321243
description: |
1233-
Allow moving followers. (Default: `false`)
1244+
Allow moving followers.
12341245
type: boolean
1246+
default: false
12351247
excludeSystemCollections:
12361248
description: |
1237-
Ignore system collections in the rebalance plan. (Default: `false`)
1249+
Ignore system collections in the rebalance plan.
12381250
type: boolean
1251+
default: false
12391252
piFactor:
12401253
description: |
1241-
A weighting factor that should remain untouched. (Default: `256e6`)
1254+
A weighting factor that should remain untouched.
12421255
12431256
If a collection has more shards than there are DB-Servers, there can be a subtle
12441257
form of leader imbalance. Some DB-Servers may be responsible for more shards as
12451258
leader than others. The `piFactor` adjusts how much weight such imbalances get
12461259
in the overall imbalance score.
1247-
type: number
1260+
type: integer
1261+
default: 256e6
12481262
databasesExcluded:
12491263
description: |
1250-
A list of database names to exclude from the analysis. (Default: `[]`)
1264+
A list of database names to exclude from the analysis.
12511265
type: array
1266+
default: []
12521267
items:
12531268
type: string
12541269
responses:

0 commit comments

Comments
 (0)