Amazon API Gateway

How to create dashboards with data from Amazon API Gateway

Users hosting their business software on Amazon AWS can use the Amazon API Gateway to create an API for their custom software and connect it with Numerics to track their metrics. Numerics can connect to any compatible custom JSON via the Amazon API gateway protected with API Key based authentication. Similar to the Custom JSON integration in Numerics, the Amazon API gateway widgets require you to enter a JSON URL accessible by Numerics. The JSON data must be formatted as per the Numerics Widget Data Specification.

Examples for each widget type are shared below. Your JSON output should be precisely formatted as in the examples. The values are settable by your system but the keys must be named as in the examples. Once the JSON data is available, simply enter the entire URL to the JSON data into the path field. e.g. http://yourcompany.com/path/to/data.json.

Please Note: You must specify the full URL to your JSON data, including the ‘http://’ or ‘https://’ parts of the URL for the source.

Label from JSON data

Following is the Widget Data Spec for a label widget:

{
”postfix”: ”Build Status”,
”data”: {
”value”: ”Passed”
}
}

If the JSON is formatted correctly, the widget should show a text label from the JSON data.

Number from JSON data

Following is the Widget Data Spec for a number widget:

{
”postfix”: ”MyUnits”,
”data”: {
”value”: 1234
}
}

If the JSON is formatted correctly, the widget should show a number from the JSON data.

Number and difference from JSON data

Following is the Widget Data Spec for a number with change indicator widget:

{
”postfix”: ”Units”,
”data”: [
{
”value”: 1450
}
,
”value”: 1250
}
]
}

The first value is the actual number to be displayed while the second value is the number from the previous period that is used to calculate the change or difference percentage. If the JSON is formatted correctly, the widget should show a number with a percentage change indicator from the JSON data.

Line graph from JSON data

Following is the Widget Data Spec for a line graph widget:

{
”postfix”: ”Units”,
”data”: [
{
”value”: 1450
}
,
{
”value”: 350
}
,
…
,
{
”value”: 1850
}
,
{
”value”: 1250
}
]
}

The data array can contain a maximum of 31 items. If the JSON is formatted correctly, the widget should show a line graph from the JSON data.

Named line graph from custom JSON data

Following is the Widget Data Spec for a named line graph widget:

{
”postfix”: ”Units”,
”data”: [
{
”name”:”Sunday”
,”value”: 1450
}
,
{
”name”:”Monday”
,”value”: 350
}
,
…
,
{
”name”:”Friday”
,”value”: 1850
}
,
{
”name”:”Saturday”
,”value”: 1250
}
]
}

The data array can contain a maximum of 31 items. If the JSON is formatted correctly, the widget should show a named line graph from the JSON data.

Top list from JSON data

Following is the Widget Data Spec for a top list funnel widget:

{
”valueNameHeader”: ”Captains”,
”valueHeader”: ”Kills”,
”data”: [
{
”name”:”Jean-Luc Picard”
,”value”: 1450
}
,
{
”name”:”James Kirk”
,”value”: 350
}
,
…
,
{
”name”:”Kathryn Janeway”
,”value”: 1850
}
,
{
”name”:”Jonathan Archer”
,”value”: 1250
}
]
}

The top 5 items will be chosen to draw the top list. If the JSON is formatted correctly, the widget should show a top list funnel chart from the JSON data.

Pie chart from JSON data

Following is the Widget Data Spec for a pie chart widget:

{
”data”: [
{
”name”:”Jean-Luc Picard”
,”value”: 1450
}
,
{
”name”:”James Kirk”
,”value”: 350
}
,
…
,
{
”name”:”Kathryn Janeway”
,”value”: 1850
}
,
{
”name”:”Jonathan Archer”
,”value”: 1250
}
]
}

The top 5 items will be chosen to draw the pie slices and the rest will be added to one slice called other. If the JSON is formatted correctly, the widget should show a pie chart from the JSON data.

Day Density chart from JSON data

Following is the Widget Data Spec for a day density calendar widget:

{
”postfix”: ”Units”,
”data”: [
{
”date”:”2014-07-01”
,”value”: 100
}
,
{
”date”:”2014-07-02”
,”value”: 200
}
,
…
,
{
”date”:”2014-07-30”
,”value”: 1100
}
,
{
”date”:”2014-07-31”
,”value”: 1250
}
]
}

The data array must contain dates for a month. If the JSON is formatted correctly, the widget should show a day density calendar from the JSON data, with each block representing a day. Days with the highest values are the brightest, while days with lower values are incrementally more transparent and closer to the background color of the widget.

Hour Density chart from JSON data

Following is the Widget Data Spec for an hour density clock widget:

{
”postfix”: ”Units”,
”data”: [
{
”hour”:0
,”value”: 1250
}
,
{
”hour”:1
,”value”: 100
}
,
…
,
{
”hour”:22
,”value”: 1250
}
,
{
”hour”:23
,”value”: 1100
}
]
}

The data array must contain items for 24 hours for a single day. If the JSON is formatted correctly, the widget should show an hour density clock from the JSON data, starting at 00 and broken into 24 equal slices, with each slice of the pie representing an hour. Hours with the highest values are the brightest, while hours with lower values are incrementally more transparent and closer to the background color of the widget.