mcorest_svc_db_init

Initialize the database web service library.

For an overview see page Web Services

Prototype

 
  MCO_RET mcorest_svc_db_init(mcorest_h rest);
 

Arguments

rest Pointer to receive the server instance handle

Description

This function Initializes the database web service library.

The database web service provides access to the database content, metadata, and statistics. The service must be explicitly initialized by the application using this function.

This function may only be called once, and only when the RESTful Web Services runtime is initialized and configured. It installs the handler for the "/api/db" endpoint in the eXtremeDB embedded web server and initializes the internal state of the service.

If the application fails to call this function, the "/api/db" endpoint and all its child resources will not be available. All client requests will return HTTP error 404 ("not found").

Return Codes

MCO_S_OK = 0 Success
MCO_E_REST_* Any of the Web Services Error Codes

Files

Header file:
mcorest.h
Source file:
restdb.c
Library:
libmcorestdb.a