The port clusters is a way of grouping ports in a given area to make it easier to handle port call predictions. Thus, a cluster of ports can be made from any criteria where geographical location is one such option. The system provides a set of predefined port clusters based on geography (country and distance between ports).
To create a cluster, use the following web service call:
POST /nextport/cluster {"name":"my cluster", "locodes":[LOCODE1, LOCODE2,...], "color":"ff0000", "threshold":0.80,"filter":"my_filter"}
Notice color, threshold and filter are optional and used mainly for NextPort.
To update and overwrite an existing cluster, use the following web service call:
PUT /nextport/cluster/my_cluster {"locodes":[LOCODE1, LOCODE2,...], "color":"ff0000", "threshold":0.80,"filter":"my_filter"}
Notice color, threshold and filter are optional.
To get a list of clusters available for a given user, use the following webservice call
GET /nextport/cluster/
which returns
{"clusters":[CLUSTER1,CLUSTER2,....]}
To get the information about locodes in a given cluster, use the following webservice call:
GET /nextport/cluster/my_cluster
which returns
{"locodes":[LOCODE1, LOCODE2,...]}
To delete a cluster, use the following webservice call:
DELETE /nextport/cluster/my_cluster