User.quota

From Safe Creative API
Revision as of 13:15, 3 March 2011 by w>Mpolo (Little fix)
Jump to navigation Jump to search

Returns the user quota info such as disk usage and registration limits.

Info

  • Component name: user.quota
  • Signature: Requires signature using the sharedkey's private key
  • Timestamp: Requires ztime parameter

Parameters

  • authkey: The authkey to query about its authorizing user or use the sharedkey's user
  • sharedkey*: Your application shared key
  • ztime*: Z-Timestamp

* Required parameter

Returns

  • userquota
    • usercode: Safe Creative code of the authorizing/sharedkey's user
    • diskUsage: Disk usage in bytes
    • diskQuota: Disk quota in bytes
    • monthlyRegistrations: Number of registrations in current month
    • monthlyRegistrationsQuota: Maximum number of registrations per month

Example

REQUEST:

https://api.safecreative.org/v2/
?authkey=23j22wtpoguzgzk0fag39sey6
&component=user.quota
&sharedkey=zy9x4ol0ctg3btyswq7b5wi9
&ztime=1271749822816
&signature=7d6ec7ad668da907286ee2901448af8e3581e37e


RESPONSE (not authorized):

<?xml version="1.0" encoding="UTF-8"?>
<error>
  <errorId>NotAuthorized</errorId>
</error>

RESPONSE (authorized):

<?xml version="1.0" encoding="UTF-8"?>
<userquota>
  <usercode>0907240000121</usercode>
  <diskUsage>263427458</diskUsage>
  <diskQuota>20000000000</diskQuota>
  <monthlyRegistrations>49</monthlyRegistrations>
  <monthlyRegistrationsQuota>50</monthlyRegistrationsQuota>
</userquota>