/
Getting Started
These pages are WIP as we transition, update, and publish more documentation.
Getting Started
This guide describes how to setup the API.
Step-by-step guide
- Access to a machine with Apache, PHP and access to a MySQL database
- Clone https://git.uwaterloo.ca/opendata/api
- Change into the 'api' directory
- Copy 'api/lib/config.sample.php' to 'api/lib/config.php', and update with the appropriate values
- Copy 'v2/.htaccess.sample' to 'v2/.htaccess' and update the 'RewriteBase as required
- Note: The default RewriteBase assumes that you are running at the root of a domain. To operate at a different subfolder, adjust the path as necessary.
It should always end in 'v2'
- Note: The default RewriteBase assumes that you are running at the root of a domain. To operate at a different subfolder, adjust the path as necessary.
- Run `git submodule update --init` to initialize any submodules.
The database schema will need to be created. The SQL schema necessary for V2 is available at 'public/v2/services/schema.sql'.
It will be necessary to create an api_key manually in the database. This will "bootstrap" your ability to create users later. The manually created key should match the key present in config.php