1
0
Fork 0

added path under /_api

This commit is contained in:
Frank Celler 2012-05-08 17:16:14 +02:00
parent facc0c499b
commit 3c7a4a627c
3 changed files with 32 additions and 3 deletions

View File

@ -184,8 +184,11 @@ HttpHandler::status_e RestDocumentHandler::execute () {
/// @REST{POST /document?collection=@FA{collection-name}&createCollection=@FA{create}}
///
/// Instead of a @FA{collection-identifier}, a @FA{collection-name} can be
/// used. If @FA{createCollection} is true, then the collection is created if it does not
/// exists.
/// used. If @FA{createCollection} is true, then the collection is created if it
/// does not exists.
///
/// @note If you are implementing a client api then you should use the path
/// @LIT{/_api/document}.
///
/// @EXAMPLES
///
@ -367,6 +370,9 @@ bool RestDocumentHandler::readDocument () {
/// given etag. Otherwise a @LIT{HTTP 412} is returned. As an alternative
/// you can supply the etag in an attribute @LIT{rev} in the URL.
///
/// @note If you are implementing a client api then you should use the path
/// @LIT{/_api/document}.
///
/// @EXAMPLES
///
/// Use a document handle:
@ -474,6 +480,9 @@ bool RestDocumentHandler::readSingleDocument (bool generateBody) {
///
/// Instead of a @FA{collection-identifier}, a collection name can be given.
///
/// @note If you are implementing a client api then you should use the path
/// @LIT{/_api/document}.
///
/// @EXAMPLES
///
/// @verbinclude rest_read-document-all
@ -577,6 +586,9 @@ bool RestDocumentHandler::readAllDocuments () {
/// can use this call to get the current revision of a document or check if
/// the document was deleted.
///
/// @note If you are implementing a client api then you should use the path
/// @LIT{/_api/document}.
///
/// @EXAMPLES
///
/// @verbinclude rest_read-document-head
@ -634,6 +646,9 @@ bool RestDocumentHandler::checkDocument () {
/// header. You must never supply both the "ETag" header and the @LIT{rev}
/// parameter.
///
/// @note If you are implementing a client api then you should use the path
/// @LIT{/_api/document}.
///
/// @EXAMPLES
///
/// Using document handle:
@ -785,6 +800,9 @@ bool RestDocumentHandler::updateDocument () {
/// "If-Match" header. You must never supply both the "If-Match" header and the
/// @LIT{rev} parameter.
///
/// @note If you are implementing a client api then you should use the path
/// @LIT{/_api/document}.
///
/// @EXAMPLES
///
/// Using document handle:

View File

@ -84,6 +84,9 @@ RestEdgeHandler::RestEdgeHandler (HttpRequest* request, TRI_vocbase_t* vocbase)
/// If you request such an edge, the returned document will also contain the
/// attributes @LIT{_from} and @LIT{_to}.
///
/// @note If you are implementing a client api then you should use the path
/// @LIT{/_api/document}.
///
/// @EXAMPLES
///
/// Create an edge:

View File

@ -642,9 +642,13 @@ int AvocadoServer::startupServer () {
_applicationAdminServer->addBasicHandlers(factory);
factory->addPrefixHandler(RestVocbaseBaseHandler::DOCUMENT_PATH, RestHandlerCreator<RestDocumentHandler>::createData<TRI_vocbase_t*>, _vocbase);
factory->addPrefixHandler(RestVocbaseBaseHandler::DOCUMENT_IMPORT_PATH, RestHandlerCreator<RestImportHandler>::createData<TRI_vocbase_t*>, _vocbase);
factory->addPrefixHandler(RestVocbaseBaseHandler::EDGE_PATH, RestHandlerCreator<RestEdgeHandler>::createData<TRI_vocbase_t*>, _vocbase);
factory->addPrefixHandler("/_api" + RestVocbaseBaseHandler::DOCUMENT_PATH, RestHandlerCreator<RestDocumentHandler>::createData<TRI_vocbase_t*>, _vocbase);
factory->addPrefixHandler("/_api" + RestVocbaseBaseHandler::EDGE_PATH, RestHandlerCreator<RestEdgeHandler>::createData<TRI_vocbase_t*>, _vocbase);
factory->addPrefixHandler(RestVocbaseBaseHandler::DOCUMENT_IMPORT_PATH, RestHandlerCreator<RestImportHandler>::createData<TRI_vocbase_t*>, _vocbase);
if (shareAdminPort) {
_applicationAdminServer->addHandlers(factory, "/_admin");
_applicationUserManager->addHandlers(factory, "/_admin");
@ -681,6 +685,10 @@ int AvocadoServer::startupServer () {
adminFactory->addPrefixHandler(RestVocbaseBaseHandler::DOCUMENT_PATH, RestHandlerCreator<RestDocumentHandler>::createData<TRI_vocbase_t*>, _vocbase);
adminFactory->addPrefixHandler(RestVocbaseBaseHandler::EDGE_PATH, RestHandlerCreator<RestEdgeHandler>::createData<TRI_vocbase_t*>, _vocbase);
adminFactory->addPrefixHandler("/_api" + RestVocbaseBaseHandler::DOCUMENT_PATH, RestHandlerCreator<RestDocumentHandler>::createData<TRI_vocbase_t*>, _vocbase);
adminFactory->addPrefixHandler("/_api" + RestVocbaseBaseHandler::EDGE_PATH, RestHandlerCreator<RestEdgeHandler>::createData<TRI_vocbase_t*>, _vocbase);
adminFactory->addPrefixHandler("/",
RestHandlerCreator<RestActionHandler>::createData< pair< TRI_vocbase_t*, set<string>* >* >,
(void*) &handlerDataAdmin);