Loading TOC...

GET /manage/v2/protected-paths/{id}/properties

Summary

This resource endpoint retrieves the properties of specific protected path. Specify the protected path id returned when creating a protecting path for {id} the request URI.

URL Parameters
format The format of the returned data. Can be html, json, or xml (default). This value overrides the Accept header if both are present.
Request Headers
Accept The expected MIME type of the request body. If the format parameter is present, it takes precedence over the Accept header.
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 the HTTP code 200 OK. The format of the data in the response body depends on the format parameter or Accept header.

Required Privileges

This operation requires the Security role, or the following privilege:

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

Usage Notes

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

path-id

Identifier for a protected-path definition

path-expression

The XPath that specifies the XML element or JSON property in a protected-path definition

path-namespaces

Namespace bindings

This is a complex structure with the following children:

path-namespace

A namespace binding specification.

This is a complex structure with the following children:

prefix

A QName prefix.

namespace-uri

A namespace URI.

permissions

The default set of permissions used in document creation.

This is a complex structure with the following children:

permission

Permission representation.

This is a complex structure with the following children:

role-id

A role identifier (unique key).

role-name

The Role name (unique)

capability

The action/task permitted by a permission

Example


curl -X GET --anyauth --user username:password -i -H "Content-type: application/xml" \
   http://localhost:8002/manage/v2/protected-paths/4818252820611606393/properties

==> MarkLogic responds with output similar to the following.

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

<protected-path-properties xmlns="http://marklogic.com/manage/protected-path/properties">
  <path-id>4818252820611606393</path-id>
  <path-expression>/root/reg[fn:matches(@expr, 'is')]</path-expression>
  <path-namespaces/>
  <permissions>
    <permission>
      <role-name>els-role-2</role-name>
      <capability>read</capability>
    </permission>
  </permissions>
</protected-path-properties>
    

Example


curl -X GET --anyauth --user username:password -i -H "Content-type: application/json" \
   http://localhost:8002/manage/v2/protected-paths/4818252820611606393/properties

==> MarkLogic responds with output similar to the following.

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

{ "path-id": "4818252820611606393", 
  "path-expression": "/root/reg[fn:matches(@expr, 'is')]", 
  "permission":[ {"role-name": "els-role-2", "capability": "read"} ]
}
    

Comments

    Powered by MarkLogic Server 7.0-4.1 and rundmc | Terms of Use | Privacy Policy