From 9515633075c45d8b0e0f260e8ccbb275accae126 Mon Sep 17 00:00:00 2001 From: Simran Spiller Date: Tue, 10 Aug 2021 15:26:30 +0200 Subject: [PATCH] Correct database and user API statements --- .../Rest/Database/get_api_database_new.md | 22 +++---- .../DocuBlocks/Rest/User Management/README.md | 57 ++++++++++--------- 2 files changed, 41 insertions(+), 38 deletions(-) diff --git a/Documentation/DocuBlocks/Rest/Database/get_api_database_new.md b/Documentation/DocuBlocks/Rest/Database/get_api_database_new.md index 241c2bd0ae0f..444175e404dc 100644 --- a/Documentation/DocuBlocks/Rest/Database/get_api_database_new.md +++ b/Documentation/DocuBlocks/Rest/Database/get_api_database_new.md @@ -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 diff --git a/Documentation/DocuBlocks/Rest/User Management/README.md b/Documentation/DocuBlocks/Rest/User Management/README.md index 60af6db8cecd..ea76f51d8aaa 100644 --- a/Documentation/DocuBlocks/Rest/User Management/README.md +++ b/Documentation/DocuBlocks/Rest/User Management/README.md @@ -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 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 Create a new user. You need server access level *Administrate* in order to @@ -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 @@ -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 @@ -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