Skip to content
Vellum

Track a ship

Follows a ship into the harbor, one position at a time, until it docks. Press Try it and watch them arrive.

GET /ships/{shipId}/track

Authorization

harborAuth Authorization: Bearer <token>

Get a token the way a real API hands one out. The client ID is harbor-docs, and for client credentials the secret is harbor-docs-secret.

bearerAuth Authorization: Bearer <token>

Or skip signing in. Any token will do here. Without one the answer is a 401.

Path parameters

shipId* integer

The ship's id. Ships 1, 2 and 3 exist.

Format int64 Example 1

Responses

200 A position event every half a second, then one docked. text/event-stream

Sent as a stream, one event at a time. Each event:

Position
event* string

Always position

id* string

Counts up from 1.

data* string

Holds application/json

Properties
ship* string
latitude* number
longitude* number
knots* integer

Speed over ground.

Docked
event* string

Always docked

id* string

Counts up from 1.

data* string

Holds application/json

Properties
ship* string
berth* string

Where it tied up.

404 No such ship. application/json
message* string
errors? object