Difference between revisions of "API Metric Data List"
Stephenchiu (Talk | contribs) (Created page with "Json Structure: Sample Json: [ { "name": "Line 1", "data": [ [ "1970/9/9", 0 ], [ "1970/9/13", 0.15 ], [ "1970/9/14", 0.35 ],...") |
Ilia.golod (Talk | contribs) |
||
(9 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | + | ==URI== | |
+ | {| class="wikitable" | ||
+ | |- | ||
+ | !URL | ||
+ | !Level | ||
+ | |- | ||
+ | |https://api.unroole.com/metered_data | ||
+ | |profile | ||
+ | |- | ||
+ | |https://api.unroole.com/accounts/:account_id/metered_data | ||
+ | |account | ||
+ | |- | ||
+ | |https://api.unroole.com/channels/:channel_id/metered_data | ||
+ | |channel | ||
+ | |} | ||
+ | ==HTTP Method== | ||
+ | GET | ||
+ | ==Paramaters== | ||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Paramater | ||
+ | ! Default | ||
+ | ! Maximum Length | ||
+ | ! Accepted Values | ||
+ | ! Description | ||
+ | {{:API Required Parameter Common}} | ||
+ | |- | ||
+ | |type | ||
+ | | | ||
+ | | | ||
+ | | storage, bandwidth | ||
+ | | | ||
+ | |- | ||
+ | | zoom | ||
+ | | daily | ||
+ | | | ||
+ | |hourly, daily, weekly, monthly | ||
+ | | | ||
+ | |- | ||
+ | |start_date | ||
+ | |2 month ago | ||
+ | | | ||
+ | |dateformat yyyy-mm-dd | ||
+ | | | ||
+ | |- | ||
+ | |end_date | ||
+ | |current date | ||
+ | | | ||
+ | |dateformat yyyy-mm-dd | ||
+ | | | ||
+ | |} | ||
− | + | Paramaters accepted by the controller: | |
+ | Json Structure: | ||
+ | <blockquote> | ||
+ | <nowiki> | ||
+ | [ | ||
+ | { | ||
+ | "name": "Line Name", | ||
+ | "data": [ | ||
+ | [ 'Year/Month/Day', "Value" ],... | ||
+ | ] | ||
+ | },... | ||
+ | ] | ||
+ | </nowiki> | ||
+ | </blockquote> | ||
+ | |||
+ | Sample Json: | ||
+ | {| class="wikitable collapsible collapsed" | ||
+ | |- | ||
+ | ! Sample upload web page | ||
+ | |- | ||
+ | | <blockquote> | ||
+ | <nowiki> | ||
[ | [ | ||
{ | { | ||
"name": "Line 1", | "name": "Line 1", | ||
"data": [ | "data": [ | ||
− | [ | + | [ "1970/9/9", 0 ], |
− | + | [ "1970/9/13", 0.15 ], | |
− | + | [ "1970/9/14", 0.35 ], | |
− | + | [ "1970/9/20", 0.46 ], | |
− | [ | + | [ "1970/9/24", 0.58 ], |
− | + | [ "1970/9/30", 0.62 ], | |
− | + | [ "1970/10/1", 1 ], | |
− | + | [ "1970/10/3", 0.5 ], | |
− | [ | + | [ "1970/10/8", 0.3 ], |
− | + | [ "1970/10/19", 0.8 ] | |
− | + | ||
− | + | ||
− | [ | + | |
− | + | ||
− | + | ||
− | + | ||
− | [ | + | |
− | + | ||
− | + | ||
− | + | ||
− | [ | + | |
− | + | ||
− | + | ||
− | + | ||
− | [ | + | |
− | + | ||
− | + | ||
− | + | ||
− | [ | + | |
− | + | ||
− | + | ||
− | + | ||
− | [ | + | |
− | + | ||
− | + | ||
− | + | ||
− | [ | + | |
− | + | ||
− | + | ||
− | + | ||
] | ] | ||
}, | }, | ||
Line 53: | Line 94: | ||
"name": "Line 2", | "name": "Line 2", | ||
"data": [ | "data": [ | ||
− | [ | + | [ "1970/9/8", 0 ], |
− | + | [ "1970/9/15", 0.15 ], | |
− | + | [ "1970/9/16", 0.35 ], | |
− | + | [ "1970/9/20", 0.46 ], | |
− | [ | + | [ "1970/9/23", 0.58 ], |
− | + | [ "1970/9/29", 0.62 ], | |
− | + | [ "1970/10/4", 1 ], | |
− | + | [ "1970/10/6", 0.5 ], | |
− | [ | + | [ "1970/10/8", 0.3 ], |
− | + | [ "1970/10/31", 0.8 ] | |
− | + | ||
− | + | ||
− | [ | + | |
− | + | ||
− | + | ||
− | + | ||
− | [ | + | |
− | + | ||
− | + | ||
− | + | ||
− | [ | + | |
− | + | ||
− | + | ||
− | + | ||
− | [ | + | |
− | + | ||
− | + | ||
− | + | ||
− | [ | + | |
− | + | ||
− | + | ||
− | + | ||
− | [ | + | |
− | + | ||
− | + | ||
− | + | ||
− | [ | + | |
− | + | ||
− | + | ||
− | + | ||
] | ] | ||
} | } | ||
] | ] | ||
+ | </nowiki> | ||
+ | </blockquote> | ||
+ | |- | ||
+ | |} |
Latest revision as of 16:11, 20 August 2012
URI
URL | Level |
---|---|
https://api.unroole.com/metered_data | profile |
https://api.unroole.com/accounts/:account_id/metered_data | account |
https://api.unroole.com/channels/:channel_id/metered_data | channel |
HTTP Method
GET
Paramaters
Paramater | Default | Maximum Length | Accepted Values | Description |
---|---|---|---|---|
token | API Persistence Token that identifies this user and its permissions. | |||
type | storage, bandwidth | |||
zoom | daily | hourly, daily, weekly, monthly | ||
start_date | 2 month ago | dateformat yyyy-mm-dd | ||
end_date | current date | dateformat yyyy-mm-dd |
Paramaters accepted by the controller:
Json Structure:
[ { "name": "Line Name", "data": [ [ 'Year/Month/Day', "Value" ],... ] },... ]
Sample Json:
Sample upload web page |
---|
|