From Bytesized Wiki

Revision as of 18:58, 28 May 2013 by Jeffeh (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search


ByteSized API


The ByteSized API enables you as member to get all kinds of information from your account in an a neatly presented XML document. This makes it easy to build third party applications to display this data. We built it for our Google Chrome extension but you can use it for any other app you would like.

Connecting should be used as the URL to connect to our API. It requires one parameter - (one of) your API-Key(s).

In example:


This is an example of what could be returned by our API.

<?xml version="1.0" encoding="UTF-8"?> 
  <balance type="float">10</balance>
  <news_items type="array">
    <!-- Additional news items removed from this wiki page for sake of simplicity //-->
      <title>Hekatonheires and Zephyrus are currently down</title>
Heka was never offline, just Zeph. Everything back to normal
Hekatonheires and Zephyrus are both currently down at the moment. No idea as to why. Stay tuned for updates.]]>
  <shared_accounts type="array"> 
      <live_quota>90GB / 110GB</live_quota> 
      <paid_till type="datetime">2011-04-11</paid_till> 
      <live_quota>177.31GB / 220GB</live_quota> 
      <paid_till type="datetime">2011-06-24</paid_till> 

Let's go over the different tags.
Attribute Description Type Example
login The username matching the given API-key string Animazing
balance Current account balance float 13.50
news_items root element for each news_item array array
shared_accounts root element for each shared_account array array
For each news item, there is a news_item element in the news_items array. In each, there are the following tags:
Attribute Description Type Example
title The title of this news item string Hekatonheires and Zephyrus are currently down
body The contents of the news item. This is wrapped in CDATA tags. string Heka was never offline.........
author The admin who posted the news item string Animazing
For each account, there is an account element in the accounts array. In each, there are the following tags:
Attribute Description Type Example
server_name name of the server for this account string alsonotexistios
cached_quota Amount of diskspace used when last checked on server float 177.3143
percentage_quota Percentage of disk-space used float 80.5954545454545
Please note that if the diskspace is cached, (see below), the percentage_quota field will instead be a duplicate of the live_quota field, and therefore a string.
live_quota Diskspace used at this moment returns cached if the server could not be reached. If it does return cached, it will be suffixed by " (cached)" string 177.31GB / 220GB
soft_quota Soft diskspace limit for this account integer 220
hard_quota Hard diskspace limit for this account double 242.0
days_till_deletion Days until this account will be disabled. If there is no deletion date associated with the account, this will be -65535 integer 5
paid_till Date until this account will be disabled. If there is no deletion date associated with the account, there will be no value for this tag (E.G: <paid_till type="datetime" />) date(time) 2011-04-11
web_vnc_link Link to this users web-based VNC server string
web_ui_link Link to this users web UI string
upgrade_available Is it possible to upgrade this account to the next plan boolean true
server_ip IP Belonging to this shared account string
daemon_port Daemon port integer 20834
webui_port Webui port integer 34160
vcn_display VNC Display integer 8
vnc_port VNC Port integer 5908
client_id Torrent client id integer deluge: 0, utorrent: 1, rtorrent: 2, transmission: 3
used_bandwidth User bandwidth string 10.0TB / 10.0 TB

The API is bound to be changed but existing data should always be presented as is now, major versions will have a new URL to accompany them.

Personal tools