site/operations (GET)
Overview
Retrieve all known security operations
- REST Method: GET
- Method Access: public
Query Parameters
| Name | Type | Description | 
| authenticate | bool? | Force authentication for request (default: false) | 
Return Codes
| Name | Value | Description | 
| OK | 200 | The request completed successfully | 
Message Format
Output:
<operations href="{uri}" >{text}</operations>
 Implementation Notes
See below for a description of currently defined role operations:
System flags
| Action | Description | Numeric value | 
| LOGIN | Can log in | 1 | 
| CONTROLPANEL | Able to access the control panel | 2048 | 
| ADMIN | Able to perform all actions and maintenance operations | 9223372036854775808 | 
| SUSCRIBE | Can subscribe to RSS and see page changes | 8 | 
Page flags
| Action | Description | Numeric value | 
| BROWSE | Can see page title in navigation | 2 | 
| READ | Can see page and attachment contents | 4 | 
| UPDATE | Can edit an existing page and work with attachments | 16 | 
| CREATE | Can create a new page | 32 | 
| DELETE | Can delete a page | 256 | 
| CHANGEPERMISSIONS | Can access permissions dialog and change permissions | 1024 | 
C# Code Sample: Retrieve List of Site Operations
The following code example retrieves a list of operations currently defined on the site:
Sample Code
Plug p = Plug.New("http://deki-hayes/@api/deki");
p.At("users", "authenticate").WithCredentials("admin", "password").Get();
p.At("site", "operations").Get(); Sample Response from executing Code
<operations href="http://deki-hayes/@api/deki/site/operations">LOGIN,BROWSE,READ,SUBSCRIBE,UPDATE,CREATE,DELETE,CHANGEPERMISSIONS,CONTROLPANEL,ADMIN</operations>
Implementation notes
Add notes about requirements or config values
Curl Code Sample: Retrieve List of Site Operations
The following command retrieves a list of all available security flags:
Sample Code
curl -u username:password -i http://mindtouch.address/@api/deki/site/operations
Sample Response from executing Code
Content-Type: application/xml
<operations href="http://192.168.59.128/@api/deki/site/operations">LOGIN,BROWSE,READ,SUBSCRIBE,UPDATE,CREATE,DELETE,CHANGEPERMISSIONS,CONTROLPANEL,UNSAFECONTENT,ADMIN</operations>
Implementation notes
curl flags
- -u
- Provides external user authentication.
- -i
- Outputs the HTTP response headers. Useful for debugging.

