8000 Docs: Correct database and user API statements (BTS-429) (#14617) · arangodb/arangodb@59274d2 · GitHub
[go: up one dir, main page]

Skip to content

Commit 59274d2

8000 Browse files
Simran-BKVS85
andauthored
Docs: Correct database and user API statements (BTS-429) (#14617)
* Correct database and user API statements * Update Documentation/DocuBlocks/Rest/Database/get_api_database_new.md Co-authored-by: Vadim Kondratyev <vadim@arangodb.com>
1 parent 62872f2 commit 59274d2

File tree

2 files changed

+41
-38
lines changed

2 files changed

+41
-38
lines changed

Documentation/DocuBlocks/Rest/Database/get_api_database_new.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,23 +29,25 @@ up-to-date copies will succeed at the same time however. The value of
2929
*writeConcern* can not be larger than *replicationFactor*. _(cluster only)_
3030

3131
@RESTBODYPARAM{users,array,optional,get_api_database_new_USERS}
32-
Has to be an array of user objects to initially create for the new database.
33-
User information will not be changed for users that already exist.
34-
If *users* is not specified or does not contain any users, a default user
35-
*root* will be created with an empty string password. This ensures that the
36-
new database will be accessible after it is created.
37-
Each user object can contain the following attributes:
32+
An array of user objects. The users will be granted *Administrate* permissions
33+
for the new database. Users that do not exist yet will be created.
34+
If *users* is not specified or does not contain any users, the default user
35+
*root* will be used to ensure that the new database will be accessible after it
36+
is created. The *root* user is created with an empty password should it not
37+
exist. Each user object can contain the following attributes:
3838

3939
@RESTSTRUCT{username,get_api_database_new_USERS,string,required,}
40-
Login name of the user to be created.
40+
Login name of an existing user or one to be created.
4141

4242
@RESTSTRUCT{passwd,get_api_database_new_USERS,string,optional,password}
43-
The user password as a string. If not specified, it will default to an empty string.
43+
The user password as a string. If not specified, it will default to an empty
44+
string. The attribute is ignored for users that already exist.
4445

4546
@RESTSTRUCT{active,get_api_database_new_USERS,boolean,optional,}
4647
A flag indicating whether the user account should be activated or not.
47-
The default value is *true*. If set to *false*, the user won't be able to
48-
log into the database. The default is *true*.
48+
The default value is *true*. If set to *false*, then the user won't be able to
49+
log into the database. The default is *true*. The attribute is ignored for users
50+
that already exist.
4951

5052
@RESTSTRUCT{extra,get_api_database_new_USERS,object,optional,}
5153
A JSON object with extra user information. It is used by the web interface

Documentation/DocuBlocks/Rest/User Management/README.md

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,17 @@
77
The name of the user as a string. This is mandatory.
88

99
@RESTBODYPARAM{passwd,string,required,string}
10-
The user password as a string. If no password is specified, the empty string
11-
will be used. If you pass the special value *ARANGODB_DEFAULT_ROOT_PASSWORD*,
12-
then the password will be set the value stored in the environment variable
13-
`ARANGODB_DEFAULT_ROOT_PASSWORD`. This can be used to pass an instance
14-
variable into ArangoDB. For example, the instance identifier from Amazon.
10+
The user password as a string. If not specified, it will default to an empty
11+
string.
1512

1613
@RESTBODYPARAM{active,boolean,optional,}
17-
An optional flag that specifies whether the user is active. If not
18-
specified, this will default to true
14+
An optional flag that specifies whether the user is active. If not
15+
specified, this will default to *true*.
1916

2017
@RESTBODYPARAM{extra,object,optional,}
21-
An optional JSON object with arbitrary extra data about the user.
18+
A JSON object with extra user information. It is used by the web interface
19+
to store graph viewer settings and saved queries. Should not be set or
20+
modified by end users, as custom attributes will not be preserved.
2221

2322
@RESTDESCRIPTION
2423
Create a new user. You need server access level *Administrate* in order to
@@ -482,23 +481,25 @@ users.remove(theUser);
482481
@RESTURLPARAMETERS
483482

484483
@RESTURLPARAM{user,string,required}
485-
The name of the user
484+
The name of the user.
486485

487486
@RESTBODYPARAM{passwd,string,required,string}
488-
The user password as a string. Specifying a password is mandatory, but
489-
the empty string is allowed for passwords
487+
The user password as a string. If not specified, it will default to an empty
488+
string.
490489

491490
@RESTBODYPARAM{active,boolean,optional,}
492-
An optional flag that specifies whether the user is active. If not
493-
specified, this will default to true
491+
An optional flag that specifies whether the user is active. If not
492+
specified, this will default to *true*.
494493

495494
@RESTBODYPARAM{extra,object,optional,}
496-
An optional JSON object with arbitrary extra data about the user.
495+
A JSON object with extra user information. It is used by the web interface
496+
to store graph viewer settings and saved queries. Should not be set or
497+
modified by end users, as custom attributes will not be preserved.
497498

498499
@RESTDESCRIPTION
499-
Replaces the data of an existing user. The name of an existing user must be
500-
specified in *user*. You need server access level *Administrate* in order to
501-
execute this REST call. Additionally, a user can change his/her own data.
500+
Replaces the data of an existing user. You need server access level
501+
*Administrate* in order to execute this REST call. Additionally, a user can
502+
change his/her own data.
502503

503504
@RESTRETURNCODES
504505

@@ -546,24 +547,23 @@ The specified user does not exist
546547
@RESTURLPARAMETERS
547548

548549
@REST 10000 URLPARAM{user,string,required}
549-
The name of the user
550+
The name of the user.
550551

551552
@RESTBODYPARAM{passwd,string,required,string}
552-
The user password as a string. Specifying a password is mandatory, but
553-
the empty string is allowed for passwords
553+
The user password as a string.
554554

555555
@RESTBODYPARAM{active,boolean,optional,}
556-
An optional flag that specifies whether the user is active. If not
557-
specified, this will default to true
556+
An optional flag that specifies whether the user is active.
558557

559558
@RESTBODYPARAM{extra,object,optional,}
560-
An optional JSON object with arbitrary extra data about the user.
559+
A JSON object with extra user information. It is used by the web interface
560+
to store graph viewer settings and saved queries. Should not be set or
561+
modified by end users, as custom attributes will not be preserved.
561562

562563
@RESTDESCRIPTION
563-
Partially updates the data of an existing user. The name of an existing user
564-
must be specified in *user*. You need server access level *Administrate* in
565-
order to execute this REST call. Additionally, a user can change his/her own
566-
data.
564+
Partially updates the data of an existing user. You need server access level
565+
*Administrate* in order to execute this REST call. Additionally, a user can
566+
change his/her own data.
567567

568568
@RESTRETURNCODES
569569

@@ -716,7 +716,8 @@ attributes on success:
716716

717717
- *user*: The name of the user as a string.
718718
- *active*: An optional flag that specifies whether the user is active.
719-
- *extra*: An optional JSON object with arbitrary extra data about the user.
719+
- *extra*: A JSON object with extra user information. It is used by the web
720+
interface to store graph viewer settings and saved queries.
720721

721722
@RESTRETURNCODES
722723

0 commit comments

Comments
 (0)
0