Circuits represent circuits within a circuit panel. They contain information about their names, breaker sizes, tags, and panel information.

Example Circuit

{
  // primary key of circuit
  "id": 1765,

  // name of circuit
  "name": "NASA Ames Building 19 Room 1001",

  // state of circuit
  "active": true,

  // tags associated to the circuit
  "tag_names": [
      "Office"
  ],

  // panel associated to the circuit
  "breaker_id": 169
}

GET /api/v1/circuits
List circuits

Returns details about all accessible circuits.

Example Request

$ curl -i https://app.verdigris.co/api/v1/circuits -H "Authorization: Token token=<access_token>"

Examples

{
  "circuits": [
    {
        "id": 1765,
        "name": "NASA Ames Building 19 Room 1001",
        "active": true,
        "tag_names": [
            "Office"
        ],
        "breaker_id": 169
    },
    {
        "id": 1766,
        "name": "NASA Ames Building 19 Room 1002",
        "active": true,
        "tag_names": [
            "Kitchen"
        ],
        "breaker_id": 169
    }
  ]
}

GET /api/v1/circuits/:id
Show a circuit

Returns details about requested circuit.

Example Request

$ curl -i https://app.verdigris.co/api/v1/circuits/1765 -H "Authorization: Token token=<access_token>"

Examples

{
  "id": 1765,
  "name": "NASA Ames Building 19 Room 1001",
  "active": true,
  "tag_names": [
      "Office"
  ],
  "breaker_id": 169
}

Params

Param name Description
id
required

circuit id


Value:

Must be String


GET /api/v1/circuits/:circuit_id/power
Power data for a circuit

Returns the power data in Watts for the requested circuit.

Example Request

$ curl -i https://app.verdigris.co/api/v1/circuits/1765/power -H "Authorization: Token token=<access_token>"

Examples

// keys are unix epoch timestamps in string format, values are Watt-hours
{
  "1411430400": 15.5,
  "1411516800": 2.8,
  "1411603200": 7.2,
}

Params

Param name Description
circuit_id
required

circuit id


Value:

Must be String

end_time
optional

End time in unix timestamp


Value:

Must be String

interval
optional

Time granularity in minutes (default: 1440)


Value:

Must be String

limit
optional

Number of results (default: 30, max: 300)


Value:

Must be String

start_time
optional

Start time in unix timestamp (default: 0)


Value:

Must be String


GET /api/v1/circuits/:circuit_id/energy
Energy data for a circuit

Returns the energy data in Watt-hours for the requested circuit.

Example Request

$ curl -i https://app.verdigris.co/api/v1/circuits/1765/energy -H "Authorization: Token token=<access_token>"

Examples

// keys are unix epoch timestamps in string format, values are Watt-hours
{
  "1411430400": 47.2,
  "1411516800": 45.3,
  "1411603200": 11.9,

}

Params

Param name Description
circuit_id
required

circuit id


Value:

Must be String

end_time
optional

End time in unix timestamp


Value:

Must be String

interval
optional

Time granularity in minutes (default: 1440)


Value:

Must be String

limit
optional

Number of results (default: 30, max: 300)


Value:

Must be String

start_time
optional

Start time in unix timestamp (default: 0)


Value:

Must be String