GET:site/services

Overview

internal. Retrieve list of services.

Uri Parameters

None

Query Parameters
NameTypeDescription
limitint?Number of entries to retrieve. Default: 100
offsetint?Number of entries to skip. Default: 0
sortby{description, type, local, sid, uri}?Sort field. Prefix value with '-' to sort descending. default: No sorting
type{auth, ext}?Return only these types of services. Default: Return all
Return Codes
NameValueDescription
BadRequest400Invalid input parameter or request body
Forbidden403Deki Wiki API key or Administrator access is required.
Ok200The request completed successfully

Message Format

Output:

<services count="{int}" href="{uri}">
    <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>
</services>

Implementation Notes

Refer here for more information about Dream services. 

Code Samples

The following code example retrieves a list of authentication services on the site:

Plug p = Plug.New("http://deki-hayes/@api/deki");
p.At("users", "authenticate").WithCredentials("admin", "password").Get();
p.At("site", "services").With("type", "auth").Get();

Sample response indicating that one service was found:

<services count="1" href="http://deki-hayes/@api/deki/site/services">
    <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>
</services>
Tag page
You must login to post a comment.