VESSEL REGISTRATION QUERY SYSTEM - LARGE VESSELS API
Documentation

December 20, 2016

Table of Contents

Purpose

Description

Supported Formats

Parameters

Usage

Large Vessels Search

Multiple Search Values

Multiple Search Parameters

Large Vessels Count

Purpose

As part of the Open Data initiative, Transport Canada has created a Web API to query the Vessel Registration Query System for data relating to the Canadian Register of Large Vessels. This document details the usage of the API and its supported functions.

Description

The Canadian Register of Large Vessels API is a self-documented API that is intended for developers who would like to query it and use its information. Results are returned in either JSON or XML format depending on the format URL parameter.

Supported Formats

The Canadian Register of Large Vessels API currently supports two formats:

  • JavaScript Object Notation (JSON); and,
  • EXtensible Markup Language (XML)

In order to specify the output format, simply append the format parameter to the query string and specify either json or xml.

Examples:

The following request returns a list of large vessels in JSON format:

The following request returns a list of large vessels in XML format:

Note: JSON format is used by default when either the format parameter isn’t specified or is invalid.

Parameters

The following parameters can be used in combination to further narrow down the list of returned results by the API.

Name / Variable Name / Usage
Vessel Name / vessel-name / Search and Count
Official Number / official-number / Search
Status / status / Search
Port of Registry / port-of-registry / Search
Official ID / official-id / Count
Year Built / year-built / Count
Vessel Type / vessel-type / Count
Built Between / built-between / Count

Note: A complete list of available parameters can also be returned by querying the API without any parameters

Usage

Large Vessels Search

To perform a search on large vessels, simply add the parameter acronym (see Parameters for a list of acronyms) and search value to the URL:

Example:

To request a list of all large vessels that contain “Queen” as part of the vessel name, the URL would look as such:

Multiple Search Values

The API supports multiple values for the same parameter by combining the values using the pipe ‘|’:

Example:

To request a list of all large vessels with a port of registry for Nanaimo or Vancouver, the URL would look as such:

Multiple Search Parameters

Finally, the API supports the combination of multiple parameters by appending them to the URL using the slash ‘/’:

Example:

To request a list of all registered large vessels that contain “Sea” as part of the vessel name, the URL would look as such:

Large Vessels Count

To retrieve a count for all large vessels that match your criteria, simply append ‘/count’ to your query:

Example:

To request a countof all registered large vessels built between 1950 and 1955, the URL would look as such:

Page 1 of 5