Grid Status Now »

API Documentation

Overview

For now, this API only exposes the current load status. But we plan on adding other functionalities soon.


REST API

GET /status

Description

Get the current load status in JSON format.
Unfortunately, the EGYPTERA load meter only depicts three values for the power grid load status, so the value of the JSON object will be either Danger, Warning or Safe. If the API fails to open and/or parse the source it will return the response Unknown.

Example Request

http://www.gridstatusnow.com/status

Example Response

{"status":"Danger"}


Examples

Python Example

#!/usr/bin/python
# -*- coding: utf-8 -*-
#@author Mosab Ibrahim

import requests
import json

status = json.loads(requests.get('http://www.gridstatusnow.com/status').text)

print 'Power grid is now in the {} Zone!'.format(status['status'])
                 
Output :
Power grid is now in the Danger Zone!


List Of Applications Using This API

  • "Yalahweey", a desktop notification tool in Go programming language using the API written by Ahmad Saif. He published it on Github. I personally use this tool and I am happy with it :)
  • Amir Aly from Delta Code created a bot that checks the API for load status and then it tweets (on @Egylectricity) and updates Egylectricity facebook page accordingly.