V1 Web API

Warning

The V1 API is being deprecated during the Havana development cycle. Please use the V2 API instead.

GET /v1/resources

Return a list of all known resources.

Parameters:
  • start_timestamp (ISO date in UTC) – Limits resources by last update time >= this value. (optional)
  • end_timestamp (ISO date in UTC) – Limits resources by last update time < this value. (optional)
  • metadata.<key> – match on the metadata within the resource. (optional)
GET /v1/projects

Return a list of all known project names.

GET /v1/meters

Return a list of meters. :param metadata.<key>: match on the metadata within the resource.

(optional)
GET /v1/users

Return a list of all known user names.

GET /v1/resources/(resource)/meters/(meter)/volume/max

Return the max volume for a meter.

Parameters:
  • resource – The ID of the resource.
  • meter – The name of the meter.
  • start_timestamp – ISO-formatted string of the earliest time to include in the calculation.
  • end_timestamp – ISO-formatted string of the latest time to include in the calculation.
  • search_offset – Number of minutes before and after start and end timestamps to query.
GET /v1/resources/(resource)/meters/(meter)/volume/sum

Return the sum of samples for a meter.

Parameters:
  • resource – The ID of the resource.
  • meter – The name of the meter.
  • start_timestamp – ISO-formatted string of the earliest time to include in the calculation.
  • end_timestamp – ISO-formatted string of the latest time to include in the calculation.
  • search_offset – Number of minutes before and after start and end timestamps to query.
GET /v1/projects/(project)/meters/(meter)/volume/max

Return the max volume for a meter.

Parameters:
  • project – The ID of the project.
  • meter – The name of the meter.
  • start_timestamp – ISO-formatted string of the earliest time to include in the calculation.
  • end_timestamp – ISO-formatted string of the latest time to include in the calculation.
  • search_offset – Number of minutes before and after start and end timestamps to query.
GET /v1/projects/(project)/meters/(meter)/volume/sum

Return the total volume for a meter.

Parameters:
  • project – The ID of the project.
  • meter – The name of the meter.
  • start_timestamp – ISO-formatted string of the earliest time to include in the calculation.
  • end_timestamp – ISO-formatted string of the latest time to include in the calculation.
  • search_offset – Number of minutes before and after start and end timestamps to query.
GET /v1/resources/(resource)/meters/(meter)/duration

Return the earliest timestamp, last timestamp, and duration for the resource and meter.

Parameters:
  • resource – The ID of the resource.
  • meter – The name of the meter.
  • start_timestamp – ISO-formatted string of the earliest timestamp to return.
  • end_timestamp – ISO-formatted string of the latest timestamp to return.
  • search_offset – Number of minutes before and after start and end timestamps to query.
GET /v1/resources/(resource)/meters/(meter)

Return a list of raw samples for the resource.

Parameters:
  • resource – The ID of the resource.
  • meter – The name of the meter.
  • start_timestamp (ISO date in UTC) – Limits samples by timestamp >= this value. (optional)
  • end_timestamp (ISO date in UTC) – Limits samples by timestamp < this value. (optional)
GET /v1/projects/(project)/meters/(meter)

Return a list of raw samples for the project.

Parameters:
  • project – The ID of the project.
  • meter – The name of the meter.
  • start_timestamp (ISO date in UTC) – Limits samples by timestamp >= this value. (optional)
  • end_timestamp (ISO date in UTC) – Limits samples by timestamp < this value. (optional)
GET /v1/sources/(source)/meters/(meter)

Return a list of raw samples for the source.

Parameters:
  • source – The ID of the reporting source.
  • meter – The name of the meter.
  • start_timestamp (ISO date in UTC) – Limits samples by timestamp >= this value. (optional)
  • end_timestamp (ISO date in UTC) – Limits samples by timestamp < this value. (optional)
GET /v1/users/(user)/meters/(meter)

Return a list of raw samples for the user.

Parameters:
  • user – The ID of the user.
  • meter – The name of the meter.
  • start_timestamp (ISO date in UTC) – Limits samples by timestamp >= this value. (optional)
  • end_timestamp (ISO date in UTC) – Limits samples by timestamp < this value. (optional)
GET /v1/resources/(resource)/meters

Return a list of meters by resource.

Parameters:
  • resource – The ID of the resource.
  • metadata.<key> – match on the metadata within the resource. (optional)
GET /v1/projects/(project)/resources

Return a list of resources owned by the project.

Parameters:
  • project – The ID of the owning project.
  • start_timestamp (ISO date in UTC) – Limits resources by last update time >= this value. (optional)
  • end_timestamp (ISO date in UTC) – Limits resources by last update time < this value. (optional)
  • metadata.<key> – match on the metadata within the resource. (optional)
GET /v1/projects/(project)/meters

Return a list of meters by project.

Parameters:
  • project – The ID of the owning project.
  • metadata.<key> – match on the metadata within the resource. (optional)
GET /v1/sources/(source)/resources

Return a list of resources for which a source is reporting data.

Parameters:
  • source – The ID of the reporting source.
  • start_timestamp (ISO date in UTC) – Limits resources by last update time >= this value. (optional)
  • end_timestamp (ISO date in UTC) – Limits resources by last update time < this value. (optional)
  • metadata.<key> – match on the metadata within the resource. (optional)
GET /v1/sources/(source)/projects

Return a list project names for which the source is reporting data.

Parameters:
  • source – The ID of the source.
GET /v1/sources/(source)/meters

Return a list of meters by source.

Parameters:
  • source – The ID of the owning source.
  • metadata.<key> – match on the metadata within the resource. (optional)
GET /v1/sources/(source)/users

Return a list of the users for which the source is reporting data.

Parameters:
  • source – The ID of the source.
GET /v1/users/(user)/resources

Return a list of resources owned by the user.

Parameters:
  • user – The ID of the owning user.
  • start_timestamp (ISO date in UTC) – Limits resources by last update time >= this value. (optional)
  • end_timestamp (ISO date in UTC) – Limits resources by last update time < this value. (optional)
  • metadata.<key> – match on the metadata within the resource. (optional)
GET /v1/users/(user)/meters

Return a list of meters by user.

Parameters:
  • user – The ID of the owning user.
  • metadata.<key> – match on the metadata within the resource. (optional)
GET /v1/sources/(source)

Return a source details.

Parameters:
  • source – The ID of the reporting source.
GET /v1/static/(path: filename)

Function used internally to send static files from the static folder to the browser.

New in version 0.5.

Previous topic

Web API

Next topic

V2 Web API

This Page