1
0
Fork 0

moved /document => /_api/document

This commit is contained in:
Frank Celler 2012-05-25 12:21:02 +02:00
parent 4114e8a53b
commit a0cd51d2fc
4 changed files with 23 additions and 7 deletions

View File

@ -124,7 +124,7 @@ namespace triagens {
: ApplicationServerImpl(description, version), : ApplicationServerImpl(description, version),
_reportIntervall(60.0), _reportIntervall(60.0),
_multiSchedulerAllowed(false), _multiSchedulerAllowed(false),
_nrSchedulerThreads(1), _nrSchedulerThreads(4),
_backend(0), _backend(0),
reuseAddress(true), reuseAddress(true),
descriptorMinimum(0), descriptorMinimum(0),

View File

@ -20,7 +20,7 @@ Key features include:
For more in-depth information For more in-depth information
* read more on the [design goals of ArangoDB](http://www.arangodb.org/2012/03/07/arangodbs-design-objectives) * read more on the [design goals of ArangoDB](http://www.arangodb.org/2012/03/07/avocadodbs-design-objectives)
* [watch the video](http://vimeo.com/36411892) - Martin Schoenert, architect of ArangoDB, gives an introduction of what the ArangoDB project is about. * [watch the video](http://vimeo.com/36411892) - Martin Schoenert, architect of ArangoDB, gives an introduction of what the ArangoDB project is about.
* or give it a try. * or give it a try.

View File

@ -789,7 +789,7 @@ var logTable = $('#logTableID').dataTable({
$.ajax({ $.ajax({
type: "PUT", type: "PUT",
url: "/document/" + collectionID, url: "/_api/document/" + collectionID,
data: JSON.stringify(parsedContent), data: JSON.stringify(parsedContent),
contentType: "application/json", contentType: "application/json",
processData: false, processData: false,
@ -889,7 +889,7 @@ var logTable = $('#logTableID').dataTable({
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: "/document?collection=" + collID, url: "/_api/document?collection=" + collID,
data: JSON.stringify(jsonContent), data: JSON.stringify(jsonContent),
contentType: "application/json", contentType: "application/json",
processData: false, processData: false,

View File

@ -26,6 +26,7 @@
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
var actions = require("actions"); var actions = require("actions");
var internal = require("internal");
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// --SECTION-- administration actions // --SECTION-- administration actions
@ -36,6 +37,21 @@ var actions = require("actions");
/// @{ /// @{
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/// @brief returns system time
////////////////////////////////////////////////////////////////////////////////
function GET_time (req, res) {
actions.resultOk(req, res, actions.HTTP_OK, { time : internal.time() });
}
actions.defineHttp({
url : "_api/time",
context : "api",
prefix : false,
callback : GET_time
});
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/// @brief returns system status information for the server /// @brief returns system status information for the server
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
@ -113,7 +129,7 @@ actions.defineHttp({
result = {}; result = {};
result.system = SYS_PROCESS_STAT(); result.system = SYS_PROCESS_STAT();
actions.resultOk(req, res, 200, result); actions.resultOk(req, res, actions.HTTP_OK, result);
} }
catch (err) { catch (err) {
actions.resultError(req, res, err); actions.resultError(req, res, err);
@ -189,7 +205,7 @@ actions.defineHttp({
} }
}; };
actions.resultOk(req, res, 200, result); actions.resultOk(req, res, actions.HTTP_OK, result);
} }
catch (err) { catch (err) {
actions.resultError(req, res, err); actions.resultError(req, res, err);
@ -246,7 +262,7 @@ actions.defineHttp({
} }
}; };
actions.resultOk(req, res, 200, result); actions.resultOk(req, res, actions.HTTP_OK, result);
} }
catch (err) { catch (err) {
actions.resultError(req, res, err); actions.resultError(req, res, err);