Skip to content

TransiTime InsertWebAPIData

Bodo Minea edited this page Dec 1, 2021 · 6 revisions

Inserting API keys and agency metadata in the main database for use by the API and Web WARs

Reference the AGENCY.xml of your first and main agency, the one for which you have imported the WebStructs too.

java \
  -cp transitclock/target/Core.jar org.transitclock.applications.CreateAPIKey \
  -c "/usr/local/transitclock/config/AGENCY.xml" \
  -n "Name" \
  -u "https://url" \
  -e "email@example.com" \
  -p "000000000" \
  -d "Description"

Complete the hibernate params with the access details for our first and main agency, the one for which you have imported the WebStructs. The following command line parameters should match the details for the agency you are adding to the database at the time.

java \
  -Dhibernate.connection.url=jdbc:mysql://localhost/DB_NAME \
  -Dhibernate.connection.username=DB_USER \
  -Dhibernate.connection.password=DB_PASS \
  -cp transitclock/target/Core.jar org.transitclock.db.webstructs.WebAgency \
  GTFS_AGENCY_ID \
  127.0.0.1 \
  DB_NAME \
  mysql \
  0.0.0.0 \
  DB_USER \
  DB_PASS

java \
  -Dhibernate.connection.url=jdbc:mysql://localhost/DB_NAME \
  -Dhibernate.connection.username=DB_USER \
  -Dhibernate.connection.password=DB_PASS \
  -cp transitclock/target/Core.jar org.transitclock.db.webstructs.WebAgency \
  SECONDARYAGENCY_ID \
  127.0.0.1 \
  SECONDARY_DB_NAME \
  mysql \
  0.0.0.0 \
  DB_USER \
  DB_PASS
Clone this wiki locally