Home » Vinsight API  »  API Introduction

API Introduction

Overview

Our API gives you programmatic access to your data. Just about every item in the user interface in Vinsight that you can view, create, edit and delete, you can do through our unified RESTful API (application programming interface).

At its simplest, you could login using your web browser and go to, for example, the Vessels page (https://app.vinsight.net/Vessels) and filter and sort the data how you like.  Then simply append ".json" or ".xml" to the end of the query string in the url and you will get the vessels you are looking at in a json or xml format.

Outside of the browser, Vinsight uses API keys for Authentication, read more about that here: https://docs.vinsight.net/api/api-authentication/

We support several popular formats: html,  xml,  json,  excel and csv for most end points and some endpoints also support either custom data views for example formatted Excel worksheets or formatted data for use with graphs.

Some examples:

https://app.vinsight.net/Vessels.json

Returns the first 20 vessels in the default sort order (in this case the vessel code) in json format.

https://app.vinsight.net/Vessels.xml?$filter=Volume gt 1000

Returns the first 20 vessels with a volume greater than 1000 in xml format.

https://app.vinsight.net/Vessels.csv?$orderby=BatchCode&$filter=Volume le 1000&$top=50

Filters vessels with the Volume less than or equal to 1000 then orders them by BatchCode and returns the first 50 in a csv text format.

The endpoints support filtering, ordering, paging, grouping, shaping and mime-type selection. Most of these operations are compliant to OData uri conventions for Query Options with some notable extensions like the added ability to do grouping and many other linq style aggregations and methods.

e.g:

https://app.vinsight.net/Vessels.json?$top=1000&$groupby=Type/Code, new (Type/Code as TypeCode, Type/Capacity)&$select=Key as TypeCode,Sum(Capacity) as TotalCapacity

Returns the top 1000 vessels that are then grouped by their Type Code and the sum of the capacity of each type is returned.

While we support OData uri conventions, we use simple xml and json formats rather than the ATOM formatted feed syntax and the equivalent json format.

For more information on getting started have a look at the examples that pertain to Authentication.

 

>> API Authentication