API Documentation
Response in JSON or XML depending on the http request Content-Type
Content-Type: application/xml;
Content-Type: application/json;
Services
Routes
Format: http://imar.ca/Services/api/Route/<Origin>/<Destination>
| Parameter | Type | Description/Values |
|---|---|---|
| <Origin> | string | [quebec | escoumins | trois-rivieres | montreal | sorel | cap_brule | portneuf | batiscan] |
| <Destination> | string | [quebec | escoumins | trois-rivieres | montreal | sorel | cap_brule | portneuf | batiscan] |
You can also retrieve the available origins or destinations via the API with this url: http://imar.ca/Services/api/Locations
Example: http://imar.ca/Services/api/Route/quebec/cap_brule
Estimated Time of Arrival (ETA)
Format: http://imar.ca/Services/api/Eta/<Origin> /<Destination> /<Speed> /<Year> /<Month> /<Day> /<Hour> /<Minute>/<ApplySpeedConstraints>
| Parameter | Type | Description/Values |
|---|---|---|
| <Origin> | string | [quebec | escoumins | trois-rivieres | montreal | sorel | cap_brule | portneuf | batiscan] |
| <Destination> | string | [quebec | escoumins | trois-rivieres | montreal | sorel | cap_brule | portneuf | batiscan] |
| <Speed> | float | Range from 6 to 30 knots |
| <Year> | int | Year |
| <Month> | int | Month |
| <Day> | int | Day |
| <Hour> | int | Hour |
| <Minute> | int | Minute |
| <ApplySpeedConstraints> | bool | [true | false] (default value is false) |
Example: http://localhost:56403/api/Eta/quebec/escoumins/14/2013/6/27/14/47/false
Currents
Format: http://imar.ca/Services/api/Current/<Latitude>/<Longitude> /<Year>/<Month>/<Day>/<Hour>/<Minute>
| Parameter | Type | Description/Values |
|---|---|---|
| <Latitude> | float | Latitude |
| <Longitude> | float | Longitude |
| <Year> | int | Year |
| <Month> | int | Month |
| <Day> | int | Day |
| <Hour> | int | Hour |
| <Minute> | int | Minute |
Example: http://localhost:56403/api/Current/48.52/-68.83/2013/6/27/14/48
Speed Through Water (STW)
Format: http://imar.ca/Services/api/Stw/<Latitude>/<Longitude>/<Speed Over Ground>/<Course Over Ground>/<Year>/<Month>/<Day>/<Hour>/<Minute>
| Parameter | Type | Description/Values |
|---|---|---|
| <Latitude> | float | Latitude |
| <Longitude> | float | Longitude |
| <Speed Over Ground> | float | Range from 6 to 30 knots |
| <Course Over Ground> | float | Range from 0 to 360 degrees from true north |
| <Year> | int | Year |
| <Month> | int | Month |
| <Day> | int | Day |
| <Hour> | int | Hour |
| <Minute> | int | Minute |
Example: http://localhost:56403/api/Stw/48.52/-68.83/10/220/2013/6/27/14/48
