Skip to content

HTTP API: Add some missing defaults/enums #718

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions site/content/3.11/develop/http-api/collections.md
Original file line number Diff line number Diff line change
Expand Up @@ -2830,6 +2830,7 @@ paths:
keys are generated on the leader DB-Server, which has full control over the key
sequence.
type: string
default: traditional
allowUserKeys:
description: |
If set to `true`, then you are allowed to supply own key values in the
Expand All @@ -2845,6 +2846,7 @@ paths:
auto-generate keys in this case are not aware of all keys which are already used.
{{</* /warning */>}}
type: boolean
default: true
increment:
description: |
The increment value for the `autoincrement` key generator.
Expand Down
41 changes: 26 additions & 15 deletions site/content/3.11/develop/http-api/databases.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ paths:
Has to contain a valid database name. The name must conform to the selected
naming convention for databases. If the name contains Unicode characters, the
name must be [NFC-normalized](https://en.wikipedia.org/wiki/Unicode_equivalence#Normal_forms).
Non-normalized names will be rejected by arangod.
Non-normalized names are rejected.
type: string
options:
description: |
Expand All @@ -241,15 +241,26 @@ paths:
properties:
sharding:
description: |
The sharding method to use for new collections in this database. Valid values
are: "", "flexible", or "single". The first two are equivalent. _(cluster only)_
The sharding method to use for new collections in this database. _(cluster only)_
Valid values are:
- `""` or `"flexible"`: Create a database where collections can
be sharded independently.
- `"single"`: Create a OneShard database where all collections have a
single shard and all leader shards are co-located on the same DB-Server.
type: string
enum: ["", flexible, single]
default: ""
replicationFactor:
description: |
Default replication factor for new collections created in this database.
Special values include "satellite", which will replicate the collection to
every DB-Server (Enterprise Edition only), and 1, which disables replication.
_(cluster only)_

Special values:
- `"satellite"`: Replicate the collection to every DB-Server (Enterprise Edition only)
- `1`: Disable replication

You can configure the global default with the
`--cluster.default-replication-factor` startup option.
type: integer
writeConcern:
description: |
Expand All @@ -260,7 +271,7 @@ paths:
up-to-date copies succeed at the same time, however. The value of
`writeConcern` cannot be greater than `replicationFactor`.

If `distributeShardsLike` is set, the `writeConcern`
If `distributeShardsLike` is set, the default `writeConcern`
is that of the prototype collection.
For SatelliteCollections, the `writeConcern` is automatically controlled to
equal the number of DB-Servers and has a value of `0`.
Expand All @@ -269,10 +280,10 @@ paths:
type: number
users:
description: |
An array of user objects. The users will be granted *Administrate* permissions
for the new database. Users that do not exist yet will be created.
An array of user objects. The users is granted *Administrate* permissions
for the new database. Users that do not exist yet are created.
If `users` is not specified or does not contain any users, the default user
`root` will be used to ensure that the new database will be accessible after it
`root` is used to ensure that the new database is accessible after it
is created. The `root` user is created with an empty password should it not
exist. Each user object can contain the following attributes:
type: array
Expand All @@ -287,21 +298,21 @@ paths:
type: string
passwd:
description: |
The user password as a string. If not specified, it will default to an empty
The user password as a string. If not specified, it defaults to an empty
string. The attribute is ignored for users that already exist.
type: string
active:
description: |
A flag indicating whether the user account should be activated or not.
The default value is `true`. If set to `false`, then the user won't be able to
log into the database. The default is `true`. The attribute is ignored for users
that already exist.
Whether the user account should be able to log in to the database system.

The attribute is ignored for users that already exist.
type: boolean
default: true
extra:
description: |
A JSON object with extra user information. It is used by the web interface
to store graph viewer settings and saved queries. Should not be set or
modified by end users, as custom attributes will not be preserved.
modified by end users, as custom attributes are not preserved.
type: object
responses:
'201':
Expand Down
Loading