pages/{pageid}/properties/{key} (GET)
Overview
Retrieve the content of a page property
- REST Method: GET
- Method Access: public
NOTE: Expert sets a limit of 1,000 properties per page.
Uri Parameters
Name | Type | Description |
pageid | string | either an integer page ID, "home", or "=" followed by a double uri-encoded page path |
key | string | A unique identifier for a property that is obtained through GET:pages/{pageid}/properties |
Query Parameters
Name | Type | Description |
authenticate | bool? | Force authentication for request (default: false) |
redirects | int? | If zero, do not follow page redirects. |
Return Codes
Name | Value | Description |
OK | 200 | The request completed successfully |
Bad Request | 400 | Invalid input parameter or request body |
Forbidden | 403 | READ access is required |
Not Found | 404 | Requested page and/or property could not be found |
Message Format
Response is the etag, content-length, content-type, and body of the property.
Implementation Notes
- READ access to the page is required to get the contents of a page property
C# Code Sample: Retrieve Value of a Page Property
The following code authenticates and retrieves the value of a text based page property named 'foo' .
Sample Code
Plug p = Plug.New("http://devwiki/@api/deki"); p.At("users", "authenticate") .WithCredentials("sysop", "password").Get(); string val = p.At("pages", "=My%252fTest%252fPage", "properties", "foo") .Get().AsText()
Implementation notes
Add notes about requirements or config values
Curl Code Sample: Retrieve Value of a Page Property
The following command retrieves a value for page property "foo" associated with page "bar":
Sample Code
curl -u username:password -i http://mindtouch.address/@api/deki/pages/=bar/properties/foo
Sample Response from executing Code
Example response from retrieving the page property listed here.
Content-Type: text/plain
test
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.
Response
- Note that a property value can contain non-text data types. So if an image file for example is assigned as the property's value, a bunch of junk will very possibly be outputted to console unless redirected.
Page properties
- To view a list of all properties for a given page, follow the instructions here.