site/properties/{key} (GET)
Overview
Retrieve the content of a site property
- REST Method: GET
- Method Access: public
Uri Parameters
| Name | Type | Description |
| key | string | A unique identifier for a property that is obtained through GET:site/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 | ADMIN access is required |
| Not Found | 404 | Requested property could not be found |
Message Format
Response is the etag, content-length, content-type, and body of the property.
Implementation Notes
- ADMIN access is required to get the contents of a site property.
C# Code Sample: Retrieve a Site Property
The following code authenticates and retrieves the value of a text based site 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("site", "properties", "foo")
.Get().AsText( Implementation notes
Add notes about requirements or config values
Curl Code Sample: Retrieve a Site Property
The following command retrieves a site property "foo":
Sample Code
curl -u admin:password -i http://mindtouch.address/@api/deki/site/properties/foo
Sample Response from executing Code
Example output of retrieving the site property value listed here.
Content-Type: text/plain
bar
Implementation notes
curl flags
- -u
- Provides external user authentication.
- -i
- Outputs the HTTP response headers. Useful for debugging.
Permissions
- ADMIN permission is required to execute above command.
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.
Site properties
- To view a list of all site properties, follow the instructions here.

