Which Boat is That?

API


Disclaimer

Iconic Sails has an experimental RESTful API. This API is little tested nor officially supported. It may go away or change at any time.
If you find an issue, please send email to iconicsails@morganconrad.com.

General

  1. The base URL is iconicsails.nwmaritime.org/v1/...
  2. All results are returned as JSON.
  3. Results start with a "date", "searchquery", and "status" field.
  4. Results then have "boats", an array (possibly empty) of boats and their data.

Locations: iconicsails.nwmaritime.org/v1/locate.php

iconicsails.nwmaritime.org/v1/locate.php returns "current" locations of all known boats.
iconicsails.nwmaritime.org/v1/locate.php?boat=XXX returns the "current" location of that one boat.
e.g.
iconicsails.nwmaritime.org/v1/locate.php?boat=Martha will return something like:
{
    "date": "Fri, 14 Jul 2017 03:43:28 +0100",
    "searchquery": "?boat=Martha",
    "status": "OK",
    "boats": [
        {
            "name": "Martha",
            "MMSI": "367375650",
            "lat": "48.1061416667",
            "lng": "-122.777866667",
            "timestamp": "1499336180"
        }
    ]
}
The "timestamp" for the location is the standard UNIX time in seconds since January 1, 1970 00:00 UTC. Not all boats have location information, so the boats array may be empty or shorter than expected.

General Search: iconicsails.nwmaritime.org/v1/search.php/optionalShipType?query

To search for one or more boats by name(s), use iconicsails.nwmaritime.org/v1/search.php?name=XXX,YYY,ZZZ
e.g.
http://iconicsails.nwmaritime.org/v1/search.php/?name=Martha,Adventuress gives:
{
    "date": "Wed, 12 Jul 2017 20:09:30 +0100",
    "searchquery": "Name= Martha,Adventuress",
    "status": "OK",
    "boats": [
        {
            "name": "Martha",
            "type": "schooner/bermuda",
            "length": "84",
            "length-on-deck": "",
            "length-waterline": "68",
            "beam": "16",
            "draft": "8",
            "displacement": "42",
            "height": "",
            "sailarea": "?",
            "ballast": "",
            "built": "1907",
            "homeport": "Port Townsend WA",
            "designer": "B. B. Crowninshield",
            "builder": "W. F. Stone (SFO)",
            "image": "/images/boats/Martha",
            "link": "http://www.schoonermartha.org/",
            "facebook": "SchoonerMarthaFoundation",
            "twitter": "",
            "instagram": "",
            "flickr": "",
            "misc": "edu",
            "USCG": "?",
            "CallSign": "WCY6838",
            "MMSI": "367375650"
        },
        {
            "name": "Adventuress",
            "type": "schooner/gaff",
            ...more details...
        }
    ]
}
You can also search by general criteria, including boat type. e.g., to search for long shallow schooners:
http://iconicsails.nwmaritime.org/v1/search.php/schooner?length=>80&draft=<11
   {
    "date": "Thu, 13 Jul 2017 00:16:17 +0100",
    "searchquery": "schooner?length=>80&draft=<11",
    "status": "OK",
    "boats": [
        {
            "name": "Alcyone",
            "type": "schooner/gaff",
            "length": "81",
            "length-on-deck": "65",
            "length-waterline": "57.1",
            "beam": "15.5",
            "draft": "10",
            "displacement": "27",
            ...more details...
        },
        {
            "name": "Martha",
            "type": "schooner/bermuda",
            "length": "84",
            "length-on-deck": "",
            "length-waterline": "68",
            "beam": "16",
            "draft": "8",
            "displacement": "42",
            ...more details...
        }
    ]
   }
Contact me for more details about this advanced general search.