User.quota

From SafeCreativeWiki

Jump to: navigation, search

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

Contents

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 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>
Personal tools
Safe Stamper API