1
0
Fork 0
arangodb/Documentation/Books/ApiImplementors/Databases/HTTP.mdpp

65 lines
1.5 KiB
Plaintext

!SECTION Managing Databases using HTTP
@RESTHEADER{GET /_api/database/current,retrieves information about the current database}
@RESTDESCRIPTION
Retrieves information about the current database
The response is a JSON object with the following attributes:
- `name`: the name of the current database
- `id`: the id of the current database
- `path`: the filesystem path of the current database
- `isSystem`: whether or not the current database is the `_system` database
@RESTRETURNCODES
@RESTRETURNCODE{200}
is returned if the information was retrieved successfully.
@RESTRETURNCODE{400}
is returned if the request is invalid.
@RESTRETURNCODE{404}
is returned if the database could not be found.
@EXAMPLES
@EXAMPLE_ARANGOSH_RUN{RestDatabaseGetInfo}
var url = "/_api/database/current";
var response = logCurlRequest('GET', url);
assert(response.code === 200);
logJsonResponse(response);
@END_EXAMPLE_ARANGOSH_RUN
@RESTHEADER{GET /_api/database/user,retrieves a list of all databases the current user can access}
@RESTDESCRIPTION
Retrieves the list of all databases the current user can access without
specifying a different username or password.
@RESTRETURNCODES
@RESTRETURNCODE{200}
is returned if the list of database was compiled successfully.
@RESTRETURNCODE{400}
is returned if the request is invalid.
@EXAMPLES
@EXAMPLE_ARANGOSH_RUN{RestDatabaseGetUser}
var url = "/_api/database/user";
var response = logCurlRequest('GET', url);
assert(response.code === 200);
logJsonResponse(response);
@END_EXAMPLE_ARANGOSH_RUN