Loading TOC...

GET /v1/rest-apis


Retrieve a list of REST API instances, including configuration details. This request is only available on port 8002.

URL Parameters
database? Limit the results to services connected to the named database.
format? Specifies the type of the response content, as an alternative to specifying format via the Accept header. Accepted values: json and xml. If there is no format parameter, the format must be specified in the Accept header.
group? The name of a Group in a MarkLogic Server cluster. If no group is specified, information is returned for all groups.
Request Headers
Accept Specifies the MIME type of the response content. The only supported types are application/json and application/xml (default). The type can also be specified through the format parameter.


Upon success, MarkLogic Server returns status 200 OK and configuration details on all REST API instances, in XML or JSON.

Required Privileges

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




Usage Notes

If no instances are configured, MarkLogic Server returns an empty <rest-apis> node.

The expected response type can be specified using either the format parameter or Accept header. One or the other must be supplied. If both are supplied and are different, the format parameter takes precedence.

For more details, see Retrieving Configuration Information in the REST Application Developer's Guide.


curl --anyauth --user user:password -X GET -i -H "Accept: application/xml" \

==> Information about configured REST services, in XML:

Content-type: text/html; charset=UTF-8
Server: MarkLogic
Content-Length: 1992
Connection: close

HTTP/1.1 200 OK
Server: MarkLogic
Content-Type: text/xml; charset=UTF-8
Content-Length: 108
Connection: close

<rapi:rest-apis xmlns:rapi="http://marklogic.com/rest-api">


curl --anyauth --user user:password -i -X GET -H "Accept: application/json" \

==> Information about configured REST services, in JSON:

HTTP/1.1 200 OK
vnd.marklogic.document-format: json
Content-type: application/json; charset=UTF-8
Server: MarkLogic
Connection: close

  "rest-apis": [
      "name": "my-service",
      "group": "Default",
      "database": "my-database",
      "modules": "my-service-modules",
      "port": "8003"

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