GET:site/settings

Overview

internal. Retrieve all configuration settings

Uri Parameters

None

Query Parameters

None

Return Codes
NameValueDescription
Forbidden403Deki Wiki API key or Administrator access is required.
Ok200The request completed successfully

Message Format

Output: 

<config>
    ...
</config>

Implementation Notes

The output schema varies depending on the current settings. 

Use PUT:site/settings to modify the site configuration settings.

Code Samples

The following code example retrieves the current site configuration settings:

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

Sample response containing the default settings.  The storage section indicates that files uploaded to the wiki are stored at /var/www/deki-hayes/attachments.  The file section disallows files larger than 256 MB or having an extension of "exe", "vbs", etc.  Also, image manipulation will only be attempted on files smaller than 1.9 MB and of type "bmp", "jpg", etc.  The ui section specifies the sitename "DekiWiki (Hayes)" and language "en-us", the admin section controls the smtp mail server used by the wiki, and the security section grants the default role of "Contributer" to new users:

<config>
    <storage>
        <type>fs</type> 
        <fs>
            <path>/var/www/deki-hayes/attachments</path> 
        </fs>
    </storage>
    <files>
        <max-file-size>268435456</max-file-size> 
        <blocked-extensions>exe, vbs, scr, reg, bat, com</blocked-extensions> 
        <imagemagick-extensions>bmp, jpg, jpeg, png, gif, tiff</imagemagick-extensions> 
        <imagemagick-max-size>2000000</imagemagick-max-size> 
    </files>
    <ui>
        <sitename>DekiWiki (Hayes)</sitename> 
        <language>en-us</language> 
        <analytics-key>UA-68075-16</analytics-key> 
    </ui>
    <admin>
        <smtp-server>localhost</smtp-server> 
    </admin>
    <security>
        <new-account-role>Contributor</new-account-role> 
        <api-key>b5aAsAFhNBMQAjPxbI5STHyoGeBjbIjE</api-key> 
    </security>
</config>
Tag page
You must login to post a comment.