Was this page helpful?

Retrieve Single Ban

    Description of the code sample

    The following command retrieves the ban data (ban ID = 1):

    Sample Code

    curl -u admin:password -i http://mindtouch.address/@api/deki/site/bans/1

    Sample Response from executing Code

    Here is metadata of one of the bans described here (ban ID = 44).

    Content-Type: application/xml

    <ban id="44" href="http://192.168.59.128/@api/deki/site/bans/44">
      <user.createdby id="1" href="http://192.168.59.128/@api/deki/users/1">
        <nick>Admin</nick>
        <username>Admin</username>
        <email>admin@admin.com</email>
        <hash.email>64e1b8d34f425d19e1ee2ea7236d3028</hash.email>
        <uri.gravatar>http://www.gravatar.com/avatar/64e1b8d34f425d19e1ee2ea7236d3028</uri.gravatar>
      </user.createdby>
      <date.modified>2010-01-30T08:32:53Z</date.modified>
      <description/>
      <date.expires>9999-12-31T23:59:59Z</date.expires>
      <permissions.revoked>
        <operations mask="9223372036854779198">BROWSE,READ,SUBSCRIBE,UPDATE,CREATE,DELETE,CHANGEPERMISSIONS,CONTROLPANEL,ADMIN</operations>
      </permissions.revoked>
      <ban.addresses>
        <address>256.256.256.256</address>
      </ban.addresses>
      <ban.users/>
    </ban>

    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.
    Was this page helpful?
    Tag page
    You must login to post a comment.

    Copyright © 2011 MindTouch, Inc. Powered by