[[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''
==== Info Object Types ====
* opsconfig | configstore
* aggregate
* sliver
* node
* link
* interface
* vlan
* authority
* slice
* checkstore | externalcheckstore
* check | experiment
==== Example Request URL ====
{{{
https://genimon.uky.edu/API/data/?q={"obj":{"id":["pks2.sdn.uky.edu_node_pc1"],"type":"node"},"output":"json","ts":{"gte":1456260153962,"lt":1456263753962}}
}}}
=== Response ===
==== Response Format (XML) [Default] ====
{{{
_____ // the url from which this response was generated
...
}}}
==== 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
},
...
]
}}}
== Object Information ==
=== Request ===
==== Request Format ====
{{{
{
infoType: _____, // the type of info requested (simple or detailed)
ts: {
ts: #####, // milliseconds or microseconds, defaults to now() if omitted
},
obj: {
type*: _______, // string of object type (aggregate, node, interface, etc.)
id: [
_______, // string of either urn or id of a requested target, returns all if omitted
...
]
},
output: _______ // string of output format type. currently only json for info requests
}
}}}
''Note on infoType:
''simple - Returns a list with the object details
''detailed - Returns a list with the object details as well as any child objects associated to said object
==== Example Request URL ====
{{{
https://genimon.uky.edu/API/info/?q={"obj":{"id":["pks2.sdn.uky.edu_node_pc1"],"type":"node"},"output":"xml"}
}}}
=== Response ===
==== Response Format (XML) [Default] ====
{{{
_____
<______>
<______>______
...
...
}}}
==== Response Format (JSON) ====
{{{
[
{
_____: _____, // These will be fields specific to the type of object requested
...
},
...
]
}}}