8000 Docs: Correct database and user API statements (BTS-429) by Simran-B · Pull Request #14686 · arangodb/arangodb · GitHub
[go: up one dir, main page]

Skip to content

Docs: Correct database and user API statements (BTS-429) #14686

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

Merged
merged 2 commits into from
Aug 25, 2021
Merged
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
22 changes: 12 additions & 10 deletions Documentation/DocuBlocks/Rest/Database/get_api_database_new.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,25 @@ up-to-date copies will succeed at the same time however. The value of
*writeConcern* can not be larger than *replicationFactor*. _(cluster only)_

@RESTBODYPARAM{users,array,optional,get_api_database_new_USERS}
Has to be an array of user objects to initially create for the new database.
User information will not be changed for users that already exist.
If *users* is not specified or does not contain any users, a default user
*root* will be created with an empty string password. This ensures that the
new database will be accessible after it is created.
Each user object can contain the following attributes:
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.
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
is created. The *root* user is created with an empty password should it not
exist. Each user object can contain the following attributes:

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

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

@RESTSTRUCT{active,get_api_database_new_USERS,boolean,optional,}
A flag indicating whether the user account should be activated or not.
The default value is *true*. If set to *false*, the user won't be able to
log into the database. The default is *true*.
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.

@RESTSTRUCT{extra,get_api_database_new_USERS,object,optional,}
A JSON object with extra user information. It is used by the web interface
Expand Down
57 changes: 29 additions & 28 deletions Documentation/DocuBlocks/Rest/User Management/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,17 @@
The name of the user as a string. This is mandatory.

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

@RESTBODYPARAM{active,boolean,optional,}
An optional flag that specifies whether the user is active. If not
specified, this will default to true
An optional flag that specifies whether the user is active. If not
specified, this will default to *true*.

@RESTBODYPARAM{extra,object,optional,}
An optional JS 10000 ON object with arbitrary extra data about the user.
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.

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

@RESTURLPARAM{user,string,required}
The name of the user
The name of the user.

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

@RESTBODYPARAM{active,boolean,optional,}
An optional flag that specifies whether the user is active. If not
specified, this will default to true
An optional flag that specifies whether the user is active. If not
specified, this will default to *true*.

@RESTBODYPARAM{extra,object,optional,}
An optional JSON object with arbitrary extra data about the user.
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.

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

@RESTRETURNCODES

Expand Down Expand Up @@ -546,24 +547,23 @@ The specified user does not exist
@RESTURLPARAMETERS

@RESTURLPARAM{user,string,required}
The name of the user
The name of the user.

@RESTBODYPARAM{passwd,string,required,string}
The user password as a string. Specifying a password is mandatory, but
the empty string is allowed for passwords
The user password as a string.

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

@RESTBODYPARAM{extra,object,optional,}
An optional JSON object with arbitrary extra data about the user.
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.

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

@RESTRETURNCODES

Expand Down Expand Up @@ -716,7 +716,8 @@ attributes on success:

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

@RESTRETURNCODES

Expand Down
0