GENIMonitoring/API: sample-queries.md

File sample-queries.md, 2.0 KB (added by tmitchel@bbn.com, 5 years ago)
Line 
1# Example Queries
2
31. Get a list of aggregates in JSON format
4
5    http://genimondev.uky.edu/API/info/?q={"obj":{"type":"aggregate"},"output":"json","infoType":"simple"}
6
72. Get a list of aggregates in XML format -- this produces an error
8
9    http://genimondev.uky.edu/API/info/?q={"obj":{"type":"aggregate"},"output":"xml","infoType":"simple"}
10
113. Get information about a single aggregate by short name in JSON format
12
13    http://genimondev.uky.edu/API/info/?q={"obj":{"id":["max-ig"],"type":"aggregate"},"output":"json","infoType":"simple"}
14
154. Get information about a single aggregate by short name in XML format
16
17    http://genimondev.uky.edu/API/info/?q={"obj":{"id":["max-ig"],"type":"aggregate"},"output":"xml","infoType":"simple"}
18
195. Get information about a single aggregate by URN in JSON format -- this produces an empty list
20
21    http://genimondev.uky.edu/API/info/?q={"obj":{"id":["urn:publicid:IDN+instageni.maxgigapop.net+authority+cm"],"type":"aggregate"},"output":"json","infoType":"simple"}
22
236. Get information about a single aggregate by URN in XML format
24
25    http://genimondev.uky.edu/API/info/?q={"obj":{"id":["urn:publicid:IDN+instageni.maxgigapop.net+authority+cm"],"type":"aggregate"},"output":"xml","infoType":"simple"}
26
277. Get event information about an aggregate
28
29    http://genimondev.uky.edu/API/data/?q={"obj":{"id":["max-ig"],"type":"aggregate"},"output":"xml","ts":{"gte":1456260153962,"lt":1456263753962}}
30
318. Just is_available for an aggregate
32
33    http://genimondev.uky.edu/API/data/?q={"eventType":["is_available"],"obj":{"id":["max-ig"],"type":"aggregate"},"output":"xml","ts":{"gte":1456345005000,"lt":1456348605000}}
34
35 * I couldn't get "output":"json" to work with this query, the document was empty
36
37# Slivers
38
391. List all slivers in XML
40
41    http://genimondev.uky.edu/API/info/?q={"obj":{"type":"sliver"},"output":"xml","infoType":"simple"}
42
432. Info about a single sliver in json
44
45    http://genimondev.uky.edu/API/info/?q={"obj":{"id":["lan.sdn.uky.edu_sliver_38337"],"type":"sliver"},"output":"json","infoType":"detailed"}