Loading TOC...

PUT /v1/resources/{name}


Perform the PUT operation associated with a resource service extension.

URL Parameters
database? Perform this operation on the named content database instead of the default content database associated with the REST API instance. Using an alternative database requires the "eval-in" privilege; for details, see Security Requirements in the REST Application Developer's Guide.
txid? The transaction identifier of the multi-statement transaction in which to service this request. Use the /transactions service to create and manage multi-statement transactions.
rs:{name}* A service-specific parameter. The name and expected value of the parameter is service dependent. For example, if the GET method of a service extension expects a boolean valued parameter named "reset", then include the URI parameter "rs:reset=true" to set it to true.
Request Headers
Accept* The accepted response MIME type, if any. The accepted values depends on service extension implementation.
Content-type? The type of the request body. The accepted values are service dependent.
Response Headers
Content-type? The type of the response body. If the PUT method returns multiple documents, the response is multipart/mixed.


The status and response contents are extension-specific. If the service does not exist, or if the service exists but does not support this method, MarkLogic Server returns status 400 (Bad Request).

Required Privileges

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



Usage Notes

This operation invokes the put function of a resource service extension previously installed using the PUT /v1/config/resources/{name}. You can use GET /v1/config/resources to discover the names and interfaces of installed extensions. For details, see Extending the REST API in the REST Application Developer's Guide.

All request parameters intended for the underlying XQuery extension function must be prefixed with rs: to distinguish them from implementation independent request parameters like txid. For example, to pass a resource-specific parameter named arg1, include a request parameter named rs:arg1.

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

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