API Documentation
Introduction
The ChattanoogaBridge.com API (herein referred to as "API" or "api") allows web developers to gain access to - and syndicate results from - our event listings database free of charge. We only ask for sufficient attribution and that ALL event listings link back to the corresponding event profile on ChattanoogaBridge.com.
Developers should note that our API returns results in JSON format. There are currently no rate limits, but please be aware that this and all other parts of this documentation are subject to change.
The Basics
The base URL for calling the API is: https://chattanoogabridge.com/api/1/services
An API key, passed as the parameter api_key
(e.g. api_key=blah) is required. To get started with our API, please contact us to receive an API key.
Currently the only response format is JSON, although that may change in the future. All requests must currently be GET requests.
Need a temporary API Key for testing?
This temporary API key expires at 11:59PM EST, at which time a new key will be generated.
Methods
cb.events.getList
(eg. https://chattanoogabridge.com/api/1/services?method=cb.events.getList)
This method returns upcoming or past events from our database. The following query parameters may also be passed...
limit
(eg. limit=20) Use this parameter to specify the number of results to be returned. Max of 20. Default is 10.when
(eg. when=today) Use this parameter to specify the proper time frame to search within. Options are:today
,tomorrow
,next7days
,next30days
,past
, andspecific_date
. If using thespecific_date
option, you must also use thedate
parameter below, else the search date will default to the current day. Leave empty to show all upcoming events.date
(eg. date=10/02/2011) Use this parameter if setting thewhen
parameter tospecific_date
. This will allow you to fetch results for... a specific date. The date format should beMM/DD/YYYY
orYYYY-MM-DD
.show_ongoing
(eg. show_ongoing=true) Use to specify whether to show events that have already begun, but have not yet ended (for example, an event that started yesterday but lasts several days). Default isfalse
.category
(eg. category=12) Pass the numeric ID of an event category to filter results. Use thecb.events.getCategories
method for a list of categories.page
(eg. page=2) Useful when "paginating" results, apply this parameter to move the offset position[offset = (page - 1) * limit]
.
cb.events.getCategories
(eg. https://chattanoogabridge.com/api/1/services?method=cb.events.getCategories)
This method returns a list of event categories, their corresponding IDs, and the "count" or number of events within that category. (Only categories with a "count" greater than 0 will be returned). The "count" will vary depending on what other parameters are passed, so depending on how you intend to use this method, it may be a good idea to pass the exact same when
and show_ongoing
parameters that were passed when retrieving events. (For example, attaching the when
parameter may alter a category's "count" because the number of events within that category and matching that time frame may reduce the number of returned results.) The following query parameters are accepted.
when
(eg. when=today) Use this parameter to specify the proper time frame to search within. Options are:today
,tomorrow
,next7days
,next30days
,past
, andspecific_date
. If using thespecific_date
option, you must also use thedate
parameter below, else the search date will default to the current day. Leave empty to show categories relevant to all upcoming events.date
(eg. date=10/02/2011) Use this parameter if setting the when parameter tospecific_date
. This will allow you to fetch results for... a specific date. The date format should beMM/DD/YYYY
orYYYY-MM-DD
.show_ongoing
(eg. show_ongoing=true) Use to specify whether to show events that have already begun, but have not yet ended (for example, an event that started yesterday but lasts several days). Default isfalse
.
cb.places.getList
(eg. https://chattanoogabridge.com/api/1/services?method=cb.places.getList)
This method returns places (venues) from our database. The following query parameters may also be passed...
limit
(eg. limit=20) Use this parameter to specify the number of results to be returned. Max of 20. Default is 10.sort
(eg. sort=name) Use this parameter to sort places by the venue name. Option:name
. If left blank, places/venues are sorted by the number of upcoming events (descending) by default.category
(eg. category=32) Pass the numeric ID of a place/venue category to filter results. Use thecb.places.getCategories
method for a list of categories.page
(eg. page=2) Useful when "paginating" results, apply this parameter to move the offset position[offset = (page - 1) * limit]
.
cb.places.getCategories
(eg. https://chattanoogabridge.com/api/1/services?method=cb.places.getCategories)
This method returns a list of place/venue categories, their corresponding IDs, and the "count" or number of places/venues within that category. (Only categories with a "count" greater than 0 will be returned). This method accepts no additional query parameters.
Error Handling
The following errors may be returned for the reasons specified:
- Code: 0, Description: API temporarily disabled (maintenance)
- Code: 1, Description: API key not found
- Code: 2, Description: API key disabled
- Code: 3, Description: API signature invalid (not currently used)
- Code: 4, Description: Invalid method: <method_name>
Please email with questions or issues concerning the API.