
[DEPRECATED: Use GET /manage/v2/servers/{id|name}/properties instead.]
List all namespace bindings configured for use in queries, ordered alphabetically by prefix.
| URL Parameters | |
|---|---|
| format? |
The format of the content returned by by the request, either
xml or json. The format parameter overrides
any format specified in the Accept header.
|
Upon success, MarkLogic Server returns status 200 (OK) and the response body contains the requested information.
When requesting XML results, the response body contains data of the following form:
<namespace-bindings xmlns="http://marklogic.com/rest-api">
<namespace xmlns="http://marklogic.com/sdmp/group">
<prefix>the-prefix</prefix>
<uri>the-uri</uri>
</namespace>
</namespace-bindings>
When requesting JSON results, the response body contains data of the following form:
{"namespace-bindings": [
{"prefix" : "the-prefix", "uri" : "the-uri" },
...
]}
rest-reader role, or the
following privilege:
http://marklogic.com/xdmp/privileges/rest-reader
For details, see Using Namespace Bindings in the REST Application Developer's Guide.
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.
$ curl --anyauth --user user:password -X GET -i -H "Accept: application/xml" \
'http://localhost:8004/v1/config/namespaces'
==> MarkLogic server responds with a 200 status and the requested
namespace binding information as XML. For example, the following
data is returned for a single binding of the prefix "bill" to
http://makrlogic.com/examples/shakespeare:
Server: MarkLogic
Content-Type: text/xml; charset=UTF-8
Content-Length: 211
Connection: close
HTTP/1.1 200 OK
Server: MarkLogic
Content-Type: text/xml; charset=UTF-8
Content-Length: 225
Connection: close
<rapi:namespace-bindings xmlns:rapi="http://marklogic.com/rest-api">
<rapi:namespace>
<rapi:prefix>bill</rapi:prefix>
<rapi:uri>http://marklogic.com/examples/shakespeare</rapi:uri>
</rapi:namespace>
</rapi:namespace-bindings>
$ curl --anyauth --user user:password -X GET -i -H "Accept: application/json" \
http://localhost:8004/v1/config/namespaces
==> MarkLogic server responds with a 200 status and the requested
namespace binding information as JSON. For example, the following
data is returned for a single binding of the prefix "bill" to
http://makrlogic.com/examples/shakespeare:
Server: MarkLogic
Content-Type: text/xml; charset=UTF-8
Content-Length: 211
Connection: close
HTTP/1.1 200 OK
Server: MarkLogic
Content-Type: text/xml; charset=UTF-8
Content-Length: 92
Connection: close
{"namespace-bindings":[
{
"prefix":"bill",
"uri":"http://marklogic.com/examples/shakespeare"
}
]}
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.