/
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


  1. Access to a machine with Apache, PHP and access to a MySQL database
  2. Clone https://git.uwaterloo.ca/opendata/api
  3. Change into the 'api' directory
  4. Copy 'api/lib/config.sample.php' to 'api/lib/config.php', and update with the appropriate values
  5. Copy 'v2/.htaccess.sample' to 'v2/.htaccess' and update the 'RewriteBase as required
    1. 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'
  6. 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

Related content