Query#

The query is what you use to specify the parameters for a search (or multiple searches) and is in a json format.

Basic#

Here's a very simple example query:

{
  "origin_name": "Government Center Station",
  "destination_name": "Cannonball Creek Brewery",
  "origin_x": -105.200146,
  "origin_y": 39.72657,
  "destination_x": -105.234964,
  "destination_y": 39.768477
}

In this example, note that the keys origin_name and destination_name are completely optional and are only used for documentation purposes. The application does not use them but they do get passed through to the result. You can provide any arbitrary key if you want to pass information through.

The remaining keys are used to define where we should start and end our search:

  • origin_x: The longitude of the origin coordinate

  • origin_y: The latitude of the origin coordinate

  • destination_x: The longitude of the origin coordinate

  • destination_y: The latitude of the origin coordinate

Multiple Queries#

In addition to a single query, you can also pass multiple queries into the app and it will run them in parallel according to the parallelism setting in the config

Here's an example:

[
  {
    "origin_x": -105.200146,
    "origin_y": 39.72657,
    "destination_x": -105.234964,
    "destination_y": 39.768477
  },
  {
    "origin_x": -105.234964,
    "origin_y": 39.768477,
    "destination_x": -105.200146,
    "destination_y": 39.72657
  }
]