site/search/properties (GET)
Overview
Retrieve all pages with a specified property
- REST Method: GET
- Method Access: public
Query Parameters
| Name | Type | Description |
| name | string | The name of the property to search for |
| authenticate | bool? | Force authentication for request (default: false) |
| verbose | bool? | Show verbose page output. default: true |
Return Codes
| Name | Value | Description |
| OK | 200 | The request completed successfully |
| Bad Request | 400 | Invalid input parameter or request body |
Implementation Notes
Feature will return a list of pages that have a property with a name that matches all or part of the search string.
Output is significantly shortened when verbose is set to false.
<pages>
<page id="{int}" href="{uri}">
<uri.ui>{uri}</uri.ui>
<title>{text}</title>
<path>{text}</path>
<namespace>{namespace}</namespace>
</page>
<page>
...
</pages>
Encoding
- All page properties created through the Expert UI are prefixed with "urn:custom.mindtouch.com#". The property search, unlike many other features in Expert, is singly encoded, hence the representation of the prefix in an address field or command line will be as follows:
urn%3acustom.mindtouch.com%23
Curl Code Sample: Search for Page Properties
The following command returns a list of page properties that exactly match the value of the "name" parameter:
Sample Code
curl -u username:password -i http://mindtouch.address/@api/deki/site/search/properties?name=foo
Sample Response from executing Code
Sample response indicating 1 page property matched the search string:
Content-Type: application/xml
<pages>
<page id="21" href="http://192.168.59.128/@api/deki/pages/21?redirects=0" revision="2">
<uri.ui>http://192.168.59.128/</uri.ui>
<title>Best Wiki Ever</title>
<path/>
<namespace>main</namespace>
<metrics>
<metric.views>413</metric.views>
<metric.charcount>72</metric.charcount>
</metrics>
<summary>
<p>This page has no content. Enrich Best Wiki Ever by contributing.</p></summary>
<security href="http://192.168.59.128/@api/deki/pages/21/security">
<permissions.effective>
<operations mask="15">LOGIN,BROWSE,READ,SUBSCRIBE</operations>
</permissions.effective>
<permissions.page>
<operations mask="0"/>
</permissions.page>
<grants/>
</security>
<date.edited>2010-01-25T21:18:10Z</date.edited>
<date.modified>2010-01-25T21:18:10Z</date.modified>
<user.author id="1" href="http://192.168.59.128/@api/deki/users/1">
<nick>Admin</nick>
<username>Admin</username>
<email hidden="true"/>
<hash.email>64e1b8d34f425d19e1ee2ea7236d3028</hash.email>
<uri.gravatar>http://www.gravatar.com/avatar/64e1b8d34f425d19e1ee2ea7236d3028</uri.gravatar>
</user.author>
<description>page content-type changed to 'application/x.deki0805+xml'</description>
<language/>
<page.redirectedfrom/>
<subpages href="http://192.168.59.128/@api/deki/pages/21/subpages"/>
<outbound count="0"/>
<inbound count="0"/>
<aliases href="http://192.168.59.128/@api/deki/pages/21/aliases"/>
<revisions count="2" href="http://192.168.59.128/@api/deki/pages/21/revisions"/>
<comments count="0" href="http://192.168.59.128/@api/deki/pages/21/comments"/>
<properties count="1" href="http://192.168.59.128/@api/deki/pages/21/properties">
<property name="urn:custom.mindtouch.com#test" href="http://192.168.59.128/@api/deki/pages/21/properties/urn%253acustom.mindtouch.com%2523test/info" etag="122.r1_ts2010-02-03T20:34:14Z">
<contents type="application/xml" size="3" href="http://192.168.59.128/@api/deki/pages/21/properties/urn%253acustom.mindtouch.com%2523test"/>
<date.modified>2010-02-03T20:34:14Z</date.modified>
<user.modified id="1" href="http://192.168.59.128/@api/deki/users/1">
<nick>Admin</nick>
<username>Admin</username>
<email hidden="true"/>
<hash.email>64e1b8d34f425d19e1ee2ea7236d3028</hash.email>
<uri.gravatar>http://www.gravatar.com/avatar/64e1b8d34f425d19e1ee2ea7236d3028</uri.gravatar>
</user.modified>
<change-description/>
</property>
<language deprecated="true"/>
</properties>
<tags count="0" href="http://192.168.59.128/@api/deki/pages/21/tags"/>
<files count="0"/>
<contents type="application/x.deki0805+xml" href="http://192.168.59.128/@api/deki/pages/21/contents"/>
<contents.alt type="application/pdf" href="http://192.168.59.128/@api/deki/pages/21/pdf"/>
</page>
</pages>
Implementation notes
curl flags
- -u
- Provides external user authentication. Note that if anonymous access is available and authentication is not forced, this flag may be omitted.
- -i
- Outputs the HTTP response headers. Useful for debugging.
Encoding
- All page properties created through the Expert UI are prefixed with "urn:custom.mindtouch.com#". The property search, unlike many other features in Expert, is singly encoded, hence the representation of the prefix in an address field or command line will be as follows:
urn%3acustom.mindtouch.com%23

