Loading TOC...

GET /v1/config/resources/{name}


Retrieve the XQuery library module or server-side JavaScript module implementing the named resource service extension.

Request Headers
Accept? The expected MIME type of the response. Only application/xquery and application/vnd.marklogic-javascript are accepted.
Response Headers
Content-type The MIME type of the content in the response. The content type is always either application/xquery, or application/vnd.marklogic-javascript.


Upon success, MarkLogic server returns status 200 (OK) and returns the XQuery library module implementing the extension in the response body.

Required Privileges

This operation requires the rest-admin role, or the following privileges:




Usage Notes

For more details, see Retrieving the Implementation of a Resource Service Extension in the REST Application Developer's Guide.


$ curl --anyauth --user user:password -H "Accept: application/xquery" -i \
    -X GET http://localhost:8004/v1/config/resources/example

==> The contents of the XQuery library module that implements the
    "example" resource services. MarkLogic Server returns:

Server: MarkLogic
Content-Type: text/xml; charset=UTF-8
Content-Length: 211
Connection: close

HTTP/1.1 200 OK
Content-type: application/xquery
Server: MarkLogic
Content-Length: 650
Connection: close

xquery version "1.0-ml";
module namespace example="http://marklogic.com/rest-api/resource/example";
declare function example:get( 

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.