[[PageOutline]] ''Note: this is a draft page documenting the development of the GENI Collector API access.'' = GENI Collector API = This page details the developmental progress and description of the GENI Collector API access system. The API is accessed in similar fashion to accessing metric data from a GENI Monitoring DataStore. (ie: /API/data/?q={json}) == Metric Data == === Request === ==== Request Format ==== {{{ { eventType: [ "opsmonitoring:_____", ... ], ts: { gte*: #####, // milliseconds or microseconds lt*: ##### // milliseconds or microseconds }, obj: { type*: _______, // string of pollable object time (aggregate, node, interface, etc.) id: [ _______, // string of either urn or id of a requested target ... ] }, output: _______ // string of output format type (xml or json). if not supplied, defaults to xml } }}} ''Note: items denoted with a (*) are required'' ==== Example Request URL ==== {{{ http://genimondev.uky.edu/API/data/?q={%22ts%22:{%22lt%22:1456162423790000,%22gte%22:1456158823790000},%22obj%22:{%22type%22:%22aggregate%22,%22id%22:[%22ukypks2-ig%22]},%22output%22:%22json%22} }}} === Response === ==== Response Format (XML) [Default] ==== {{{ _____ // the url from which this response was generated // descriptors of this object // descriptors of this eventType list ##### // timestamp of this event (in milliseconds) _____ // value for this eventType at this timestamp ... ... }}} ==== Response Format (JSON) ==== {{{ [ { "$schema": "http://www.gpolab.bbn.com/monitoring/schema/20151105/data#", "description": "ops_monitoring:_____ for _____ of type _____", // eventType, id, objectType "eventType": "ops_monitoring:_____", // eventType "id": "_____:_____", // eventType, id "subject": { "href": "_____#" // schema of objectType }, "tsdata": [ "ts": #####, // (in milliseconds) "v": _____ // depends on the eventType ], "units": _____ // describes the units fo the eventType } ] }}}