Checking Server Status
You can connect directly with the rest system to check it's status here: http://torontobudget.uprootinc.com/rest/status/
Data Formats
All data can be provided in both XML and JSON formats. XML is returned by default unless otherwise specified. In order to change formats, modify the 'rest' aspect of the link to specify a format http://torontobudget.uprootinc.com/rest/status/ returns an XML response http://torontobudget.uprootinc.com/json/status/ returns a JSON response http://torontobudget.uprootinc.com/xml/status/ returns an XML response
Operational Budget
In order to query the operational data, the first portion of the url always starts as follows: http://torontobudget.uprootinc.com/xml/operational/
Department Slugs
In order to query a department, you will first need to know the 'slug'(unique id) of the department. You can get a list of all available departments here: http://torontobudget.uprootinc.com/xml/operational/departments/
Category Slugs
In order to query a category, you will first need to know the 'slug'(unique id) of the category. You can get a list of all available categories here: http://torontobudget.uprootinc.com/xml/operational/categories/ Each category has a indicator whether it is an Expenditure or a Revenue.
Expenditure/Revenue Types
There are three types of expenditures/revenues
- Budget
- Actual
- Outlook
The default selection will be "Actual" for any year queried unless otherwise specified.
NOTE: Not every year has every type of expenditure. You can retrieve all valid time periods here:
http://torontobudget.uprootinc.com/xml/operational/periods/
Querying
Querying the operational budget data is structured as follows: http://torontobudget.uprootinc.com/format/operational/dept-cat-slug-OR-totals/year/expenditure-type/
For example: http://torontobudget.uprootinc.com/xml/operational/311-toronto/2010/actual/
Or: http://torontobudget.uprootinc.com/xml/operational/salaries-and-benefits/2010/actual/
Or: http://torontobudget.uprootinc.com/xml/operational/totals/2010/actual/ In order to get the total revenues and expenditures for that year
Capital Budget
In order to query the capital data, the first portion of the url always starts as follows: http://torontobudget.uprootinc.com/xml/capital/
Ward #s
This REST system uses Toronto's 44 Wards as their respective ID#s in the database. City Wide data is considered Ward #999. If you need a list of all wards, you can find them here: http://torontobudget.uprootinc.com/xml/capital/wards/
Querying
Querying the capital budget data is structured as follows: http://torontobudget.uprootinc.com/format/capital/ward#/
For example: http://torontobudget.uprootinc.com/xml/capital/23/
Google Maps Toronto Wards KML
If you want to use the Toronto Wards KML Overlay for Google Maps you can find it here: http://torontobudget.uprootinc.com/torontowardsdata.kml See the Google Maps API for more information on incorporating KML overlays.
Feedback & Requests
We encourage you to be creative with this data! If you have any feedback or requests for the API, please contact us and let us know.
Email us at torontobudget@uprootinc.com
Disclaimer
The Toronto Budget Data API is available freely to use for any means. We only ask you provide attribution to Uproot (in the form of a link to either uprootinc.com or twitter.com/uproot) if you use this data.
The data has been sourced from the latest available Capital Budget
and Operating Budget data via toronto.ca/open (currently March 11, 2011).
While efforts have been made to ensure the validity of this data, mistakes can happen so we make no warranty that this data is a verbatim copy... but it likely is.