MarkLogic Server 11.0 Product Documentation
Client API (Service Extension)

The interfaces in this section enable you to extend the capabilities of the REST Client API in a variety of ways, include resource service extensions, ad-hoc queries, and invocation of JavaScript and XQuery modules stored in MarkLogic Server.

Resource service extensions enable you to install custom XQuery and JavaScript modules on MarkLogic Server and then expose them through a RESTful interface. Use the /config/resources service to manage the module that implements your extension. Use the /resources service to make requests against resource service extensions.

Use the /ext service to manage assets in the modules database associated with a REST API instance, including dependent libraries of resource service extensions, content transformations, and XQuery and JavaScript modules usable with the /invoke service.

Use the /eval service to evaluate ad-hoc XQuery and JavaScript code on MarkLogic Server. Use the /invoke service to evaluate XQuery and JavaScript modules stored on MarkLogic Server.

For details, see Extending the REST API in the REST Application Developer's Guide.

15 resources
Resource URI Description
/v1/config/resources (GET) Retrieve a list of installed resource service extensions, including their metadata.
/v1/config/resources/{name} (DELETE) Uninstall the named resource service extension.
/v1/config/resources/{name} (GET) Retrieve the XQuery library module or server-side JavaScript module implementing the named resource service extension.
/v1/config/resources/{name} (PUT) Create or update a resource service extension.
/v1/eval (POST) Evaluate an ad-hoc query expressed using XQuery or server-side JavaScript.
/v1/ext/{directories} (DELETE) Delete the assets in /ext/{directories} in the modules database associated with the REST API instance.
/v1/ext/{directories} (GET) Retrieve a list of assets installed in the modules database associated with a REST API instance, such as a dependent library of an extension or transformation.
/v1/ext/{directories}/{asset} (DELETE) Remove the asset with document URI /ext/{directories}/{asset} from the modules database associated with this REST API instance.
/v1/ext/{directories}/{asset} (GET) Retrieve an asset installed in the modules database associated with a REST API instance, such as a dependent library of a module implementing an extension or a transformation.
/v1/ext/{directories}/{asset} (PUT) Install an asset such as a dependent library of an extension module in the modules database associated with this REST API instance.
/v1/invoke (POST) Evaluate an XQuery or server-side JavaScript module installed in MarkLogic Server.
/v1/resources/{name} (DELETE) Send a DELETE request to the named resource service extension.
/v1/resources/{name} (GET) Make a GET request to the named resource service extension.
/v1/resources/{name} (POST) Applies an extension-specific operation to a resource implemented by a resource service extension.
/v1/resources/{name} (PUT) Perform the PUT operation associated with a resource service extension.
Powered by MarkLogic Server | Terms of Use | Privacy Policy