MarkLogic Server 11.0 Product Documentation
GET /manage/v2/query-rolesets/{id}/properties

Summary

This resource endpoint retrieves a given query roleset.

URL Parameters
fullrefs If set to true, full detail is returned for all relationship references. A value of false (the default) indicates to return detail only for first references. This is only applicable for view=status.
view A specific view of the returned data. Can be either schema, status, metrics, query, or default. Value can be default.
format The format of the returned data. Can be either html, json, or xml (default). This value overrides the Accept header if both are present. Value can be xml, json or html.
Request Headers
Accept The expected MIME type of the request body. If the format parameter is present, it takes precedence over the Accept header.
Content-type The MIME type of the data in the request body. Depending upon the value of the format parameter or Accept header, one of application/xml, application/json, or text/html.
Response Headers
Content-type The MIME type of the data in the response body. Depending upon the value of the format parameter or Accept header, one of application/xml, application/json, or text/html.

Response

A successful call to the endpoint will return 200 (OK). This is the standard response for successful HTTP requests. A response code of 400 (Bad Request) indicates that the query roleset does not exist or the payload is malformed. A status code of 401 (Unauthorized) is returned if the user does not have the necessary privileges for this action.

Produces
application/xml XML Content
application/json JSON Content
text/html HTML Web Content

Required Privileges

This operation requires the manage-user role, or the following privilege:

http://marklogic.com/xdmp/privileges/manage

Usage Notes

The structure of the output returned from this REST API is as follows:

query-roleset

A query roleset definition

This is a complex structure with the following children:

role-id

A role identifier (unique key).

role-name

The role-name.

Example


curl --anyauth --user username:password -i -X GET -H "Accept: application/xml" \
  http://localhost:8002/manage/v2/query-rolesets/15465490467826729837/properties

==> MarkLogic returns a response similar to the following:

HTTP/1.1 200 OK
ETag: 26c9d29700d65c02560b38a57935cc00
Content-type: application/xml; charset=UTF-8
Cache-Control: no-cache
Expires: -1
Server: MarkLogic
Content-Length: 267
Connection: Keep-Alive
Keep-Alive: timeout=5

<query-roleset-properties xmlns="http://marklogic.com/manage/query-roleset/properties">
  <query-roleset>
    <role-name>els-role-1</role-name>
    <role-name>els-role-2</role-name>
    <role-name>els-role-3</role-name>
  </query-roleset>
</query-roleset-properties>
    

Example


curl --anyauth --user username:password -i -X GET -H "Accept: application/json" \
  http://localhost:8002/manage/v2/query-rolesets/15465490467826729837/properties

==> MarkLogic returns a response similar to the following:

HTTP/1.1 200 OK
ETag: 26c9d29700d65c02560b38a57935cc00
Content-type: application/json; charset=UTF-8
Cache-Control: no-cache
Expires: -1
Server: MarkLogic
Content-Length: 56
Connection: Keep-Alive
Keep-Alive: timeout=5

{ "role-name": ["els-role-1", "els-role-2", "els-role-3" ] }
    
Powered by MarkLogic Server | Terms of Use | Privacy Policy