Loading TOC...

MarkLogic 9 Product Documentation
GET /manage/v2/protected-paths

Summary

This resource endpoint retrieves a list of protected paths.

URL Parameters
fullrefs If set to true, full detail is returned for all relationship references. A value of false (the default), returns detail only for first few 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 describe or 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 status code 200 (OK), and the response body will contain the requested information. A status code of 401 (Unauthorized) is returned if the user does not have the necessary privileges for this action. A response code of 404 (Not Found) indicates that no such protected path exists.

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

Required Privileges

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

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

Usage Notes

This resource endpoint retrieves a list of protected paths.

This endpoint fits into the general pattern of read-only config.

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

meta

Properties of the view rather than the resource.

This is a complex structure with the following children:

uri

The path to the view.

current-time

The timestamp for when the view was generated.

elapsed-time

The time required to construct the view. The elapsed time indicates the relative cost of generating the view. Consider the cost when determining how frequently to request a view.

start-min

The timestamp for filtering out more recent requests or transactions.

view-error

An error limiting the data in the view.

This is a complex structure with the following children:

error-type

The kind of error.

error-name

The name of the error.

error-code

The error identifier.

error-message

The error text.

list-items

The list of certificates.

This is a complex structure with the following children:

list-count

The number of users.

list-item

A certificate.

This is a complex structure with the following children:

uriref

The path for a resource or list of resources.

idref

The numeric identifier for the resource.

nameref

The name of the resource.

related-views

A list of broader or narrower views on the resource or resource type.

This is a complex structure with the following children:

related-view

A broader or narrower view on the resource or resource type.

This is a complex structure with the following children:

view-type

The kind of view.

view-name

The name of the view.

view-uri

The path for the view.

Example

> curl -X GET --anyauth -u admin:admin 
            -H "Content-Type:application/xml"  http://localhost:8002/manage/v2/protected-paths
            

Output:

<?xml version="1.0" encoding="UTF-8"?>
<protected-path-default-list xsi:schemaLocation="http://marklogic.com/manage/security manage-security.xsd" xmlns="http://marklogic.com/manage/security" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <meta>
    <uri>/manage/v2/protected-paths</uri>
    <current-time>2017-05-02T02:05:22.0143857-07:00</current-time>
    <elapsed-time units="sec">0.0100635</elapsed-time>
  </meta>
  <list-items>
    <list-count units="quantity">0</list-count>
  </list-items>
  <relations>
    <relation-group array="true">
      <typeref>security-database</typeref>
      <relation-count units="quantity">1</relation-count>
      <relation array="true">
	<uriref>/manage/v2/databases/Security</uriref>
	<roleref>database</roleref>
	<idref>7161534863501463199</idref>
      </relation>
    </relation-group>
  </relations>
</protected-path-default-list>

This is the XML output for GET.

Example

> 
             curl -X GET --anyauth -u admin:admin \
            -H "Content-Type:application/json"  \
             http://localhost:8002/manage/v2/protected-paths
            

Output:

	{
		"protected-path-default-list":{
			"meta":{
				"uri":"/manage/v2/protected-paths",
				"current-time":"2017-05-02T02:05:22.0171705-07:00",
				"elapsed-time":{
					"units":"sec",
					"value":0.0094396}
				}
			,
			"list-items":{
				"list-count":{
					"units":"quantity",
					"value":0}
				}
			,
			"relations":{
				"relation-group":{
					"typeref":"security-database",
					"relation-count":{
						"units":"quantity",
						"value":1}
					,
					"relation":{
						"uriref":"/manage/v2/databases/Security",
						"roleref":"database",
						"idref":"7161534863501463199",
						"nameref":"Security"}
					}
				}
			,
			"related-views":{
				"related-view":[
					{
						"view-type":"root",
						"view-name":"default",
						"view-uri":"/manage/v2"}
					]
				}
			}
		}
   

This is the JSON output for GET.

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