public. Retrieve service.
| Name | Type | Description |
| id | int | identifies a service by ID |
| Name | Type | Description |
| authenticate | bool? | Force authentication for request (default: false) |
| Name | Value | Description |
| BadRequest | 400 | Invalid input parameter or request body |
| Forbidden | 403 | MindTouch Deki API key or Administrator access is required. |
| NotFound | 404 | Requested service could not be found |
| Ok | 200 | The request completed successfully |
Output:
<service id="{int}" href="{uri}">
<sid>{sid}</sid>
<uri>{uri}</uri>
<type>{auth|ext}</type>
<description>{text}</description>
<date.modified>{date}</date.modified>
<status>{enabled|disabled}</status>
<local>{bool}</local>
<lasterror>{text}</lasterror>
<config>
<value key="{text}">{text}</value>
...
</config>
<preferences>
<value key="{text}">{text}</value>
...
</preferences>
</service>
Refer here for more information about Dream services.
The following code example retrieves the service with ID 1:
Plug p = Plug.New("http://deki-hayes/@api/deki");
p.At("users", "authenticate").WithCredentials("admin", "password").Get();
p.At("site", "services", "1").Get();
Sample response:
<service id="1" href="http://deki-hayes/@api/deki/site/services/1">
<sid>http://services.mindtouch.com/deki/draft/2006/11/dekiwiki</sid>
<uri>http://deki-hayes/@api/deki</uri>
<type>auth</type>
<description>Local</description>
<date.modified>2007-08-31T01:17:12Z</date.modified>
<status>enabled</status>
<local>true</local>
<lasterror />
<config />
<preferences />
</service>