This API provides statistical data on vessel operations within a specified port and time period.
The statistics include metrics such as waiting time, operation time, and the number of arriving vessels.
Authentication
The Port Insight Statistics API uses Basic Authorization on Swagger UI.
Authentication Steps
1.
Click the [Authorize] button in the top right corner.
2.
Enter the provided username and password in the pop-up window.
3.
Click [Authorize] again to proceed with authentication.
4.
After successful login, click [Close] to close the window.
All API requests from Swagger UI will automatically include the authorization token.
Request Information
Request URL
Request URL : [GET] https://insight.seavantage.com/api/port-insight/statistics/ports
Execution Steps
1.
In the Swagger Documentation, select Port Insight from the Select a definition menu at the top right.
2.
Navigate to the /port-insight/statistics/ports endpoint.
3.
Click [Try it out] to activate input fields.
4.
Enter values according to the following request parameters:
•
•
from
◦
Start date and time of query (in UTC)
◦
Example: 2025-01-01T00:00:00Z
•
to
◦
End date and time of query (in UTC)
◦
Example: 2025-01-01T00:00:00Z
5.
Click [Execute].
6.
View results in the response section.
Response Information
The response is returned in the following format, regardless of whether the request is successful or failed.
Sample Response Format
{
"code": 200,
"message": "OK",
"error": false,
"timestamp": "2024-12-01T12:00:00",
"response": [
{
"localAggregatedAt": "2025-01-01T00:00:00Z",
"aggregatedAt": "2025-01-01T00:00:00Z",
"onTheWayCount": 10.0,
"waitingCount": 10.0,
"workingCount": 10.0,
"avgStopHour": 12.3456,
"avgWaitingHour": 12.3456,
"avgWorkingHour": 12.3456,
"arrivalCount": 10.0,
"berthingCount": 10.0,
"departureCount": 10.0
}
]
}
JavaScript
복사
Response Field Descriptions
Top-Level Response Fields
Field | Example Value | Description |
code | 200 | Response status code (used in the same way as standard HTTP status codes).
See the list of codes below for reference. |
message | OK | Response message (description based on status) |
error | false | Error flag
true: error occurred
false: successful processing |
timestamp | 2025-05-14T01:09:00.834665213 | Time of response creation (UTC) |
response | Array or Empty Array | Returns an array if data exists; returns an empty array if no data exists |
Response Codes
Code | Description |
200 | Success |
400 | Bad request |
401 | Unauthorized |
403 | Forbidden |
422 | Unprocessable entity |
429 | Too many requests |
Detailed Response Description
Depth 1 Field Description (response object)
Field | Example Value | Description | Data Type |
localAggregatedAt | 2025-01-01T11:30:00Z | Timestamp of statistical aggregation (based on port local time) | timestamp |
aggregatedAt | 2025-01-01T02:30:00Z | Timestamp of statistical aggregation (based on UTC) | timestamp |
onTheWayCount | 10.0 | Number of vessels en route to the port at the time of data generation | real |
waitingCount | 10.0 | Number of vessels waiting to berth at the port at the time of data generation | real |
workingCount | 10.0 | Number of vessels berthing at the port at the time of data generation | real |
avgStopHour | 12.3456 | Average waiting time outside the anchorage area | real |
avgWaitingHour | 12.3456 | Average waiting time within the anchorage area | real |
avgWorkingHour | 12.3456 | Average operation (berth) time | real |
arrivalCount | 10.0 | Number of vessels that has arrived within the last 24 hours | real |
berthingCount | 10.0 | Number of vessels that has berthed within the last 24 hours | real |
departureCount | 10.0 | Number of vessels that has departed within the last 24 hours | real |