Difference between revisions of "DataZoa API Examples"

From dataZoa Wiki
Jump to: navigation, search
 
(26 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
  
 
The dataZoa API can be very handy for simple ''ad hoc'' tasks.   
 
The dataZoa API can be very handy for simple ''ad hoc'' tasks.   
 
+
<br><br>
<div class="imgGlyph24 imgIdea"></div> You can use the API without programming, just using your everyday browser. For example, to get all of the series keys for a grouplist, enter:
+
====dataZoa API from a browser====
 
+
<div class="imgGlyph24 imgIdea" style="vertical-align: top; "></div>
 +
<div class="Gdib">You can use the API without programming, just using your everyday browser. For example, to get all of the series keys for a grouplist, enter:
 
<div>
 
<div>
https://www.datazoa.com/api/apimain.asp?func=SeriesFromGL&glname='''YourGroupName'''&apikey='''YourAPIKey'''
+
<nowiki>https://www.datazoa.com/api/apimain.asp?func=SeriesFromGL&glname=</nowiki><b>YourGroupName</b>&apikey=<b>YourAPIKey</b>
 
</div>
 
</div>
 
 
in your browser's address bar.  The results will require some reformatting, but it's fast and effective.
 
in your browser's address bar.  The results will require some reformatting, but it's fast and effective.
 +
</div>
  
 
+
====dataZoa API from a command line====
 +
<div class="imgGlyph24 imgIdea" style="vertical-align: top; "></div>
 +
<div class="Gdib">Perhaps even simpler, if you are comfortable with Windows commandline Powershell, you can you can just do this:
 +
<div>
 +
<nowiki>(curl "https://www.datazoa.com/api/apimain.asp?func=SeriesFromGL&glname=</nowiki><b>YourGroupName</b>&apikey=<b>YourAPIKey</b><nowiki> | ConvertFrom-Json).payload</nowiki>
 +
</div>
 +
</div>
  
  
Line 18: Line 24:
 
<table class="Gbb1">
 
<table class="Gbb1">
 
<tr><th>Example</th><th>Description</th></tr>
 
<tr><th>Example</th><th>Description</th></tr>
 +
<tr><td>func=RunState&apikey='''YourAPIKey'''</td><td>API Healthcheck</td></tr>
 +
<tr><td>func=SeriesGet&serieskey='''YourAccount/00004321'''&apikey='''YourAPIKey'''&payloadasjson=true</td><td>Get a Series, return result payload as JSON</td></tr>
 
<tr><td>func=SeriesFromGL&glname='''YourGroupName'''&apikey='''YourAPIKey'''</td><td>Get the series keys from a grouplist</td></tr>
 
<tr><td>func=SeriesFromGL&glname='''YourGroupName'''&apikey='''YourAPIKey'''</td><td>Get the series keys from a grouplist</td></tr>
 
</table>
 
</table>
  
 
[[Category:API]][[Category:Advanced]][[Category:Developers]][[Category:Time_Savers]]
 
[[Category:API]][[Category:Advanced]][[Category:Developers]][[Category:Time_Savers]]

Latest revision as of 11:40, 13 November 2020

The dataZoa API can be very handy for simple ad hoc tasks.

dataZoa API from a browser

You can use the API without programming, just using your everyday browser. For example, to get all of the series keys for a grouplist, enter:
https://www.datazoa.com/api/apimain.asp?func=SeriesFromGL&glname=YourGroupName&apikey=YourAPIKey

in your browser's address bar. The results will require some reformatting, but it's fast and effective.

dataZoa API from a command line

Perhaps even simpler, if you are comfortable with Windows commandline Powershell, you can you can just do this:
(curl "https://www.datazoa.com/api/apimain.asp?func=SeriesFromGL&glname=YourGroupName&apikey=YourAPIKey | ConvertFrom-Json).payload


Here are a few examples...

ExampleDescription
func=RunState&apikey=YourAPIKeyAPI Healthcheck
func=SeriesGet&serieskey=YourAccount/00004321&apikey=YourAPIKey&payloadasjson=trueGet a Series, return result payload as JSON
func=SeriesFromGL&glname=YourGroupName&apikey=YourAPIKeyGet the series keys from a grouplist