wiki:GENIMonitoring/API

Version 2 (modified by Caylin Hickey, 7 years ago) (diff)

Schema may just confuse users, so I removed it. Also reworked the ordering.

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]

<?xml version="1.0" encoding="UTF-8"?>
<response>
  <request>
    <url>_____</url>                                                    // the url from which this response was generated
  </request>
  <objects>
    <object urn="_____" id="_____" schema="_____" objectType="_____">   // descriptors of this object   
      <events eventType="_____" units="_____">                          // descriptors of this eventType list
        <event>
          <ts>#####</ts>                                                // timestamp of this event (in milliseconds)
          <v>_____</v>                                                  // value for this eventType at this timestamp
        </event>
        ...
      </events>
    </object>
    ...
  </objects>
</response>

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
    }
  ]

Attachments (1)

Download all attachments as: .zip