The base path:
https://maritime.gatehouse.dk/api/config/
Notice this section is EXPERIMENTAL and the interface may change before release.
To create a user, use
/config/user POST
specifying all necessary parameters (do not specify a UID). The resulting UID will be returned.
Example:
/config/user POST
{
"name": "testuser",
"common_name": "Test Testersson",
"access_rights": {
"lss_access": "allow"
},
"settings": {
"lss_group": "Default LSS group"
}
}
This example shows all available settings (note that all settings shown for the transmit_filter
object are also available for the receive_filter
object, and that the password
field can only be written, not read):
{
"name": "testuser",
"common_name": "Test Testersson",
"description": "Test User",
"direct_access": {
enabled: true,
hosts: [ "10.10.10.47", "zeus.example.com" ]
},
"disabled": false,
"email": "test@testerss.on",
"expiration_time": "2017-10-20T00:00:00Z",
"password": "verySecret",
"period_before_expire": 30,
"phone": "12345678",
"access_rights": {
"access_remote_configuration": "deny",
"access_remote_user_configuration": "deny",
"ack_ata_atd": "allow",
"add_remove_access_rights_groups": "deny",
"add_remove_aton": "",
"add_remove_events": "deny",
"add_remove_filter_groups": "deny",
"add_remove_mmsi_entries": "deny",
"add_remove_region": "deny",
"add_remove_settings_groups": "deny",
"add_remove_users": "deny",
"add_remove_virtual_aton": "deny",
"admin_ata_atd": "deny",
"admin_filters": "deny",
"admin_port": "deny",
"admin_reports": "deny",
"admin_shapes": "deny",
"admin_shiplists": "deny",
"admin_watchdog_definitions": "deny",
"allow_colour_by_age": "deny",
"allow_google_maps": "deny",
"allow_mail_attachments": "deny",
"allow_mail_other_users": "deny",
"allow_mail_self": "deny",
"allow_nmea_commentblock_msgs": "deny",
"allow_nmea_pghp_msgs": "deny",
"allow_nmea_tag_msgs": "deny",
"allow_open_street_maps": "deny",
"allow_oth_gold_msgs": "deny",
"allow_remote_control": "deny",
"allow_s57_maps": "deny",
"allow_web_service": "deny",
"allow_xml_msgs": "deny",
"change_access_rights": "deny",
"change_filter_settings": "deny",
"change_mmsi_entries": "deny",
"change_proxy_filters": "deny",
"change_region": "deny",
"change_settings": "deny",
"change_user": "deny",
"configure_ship_lists": "deny",
"configure_watchdog_definitions": "deny",
"create_wms_services": "deny",
"download_historical_tracks": "deny",
"get_system_status_info": "deny",
"lock_groups": "deny",
"lss_access": "deny",
"message_redirection": "deny",
"message_service": "deny",
"pcs_access": "deny",
"replay": "deny",
"replay_from_db": "deny",
"reset_passwords": "deny",
"send_mail": "deny",
"send_messages": "deny",
"share_filters": "deny",
"share_reports": "deny",
"share_shapes": "deny",
"share_shiplists": "deny",
"share_watchdogs": "deny",
"sys_conf_access": "deny",
"user_conf_access": "deny",
"view_ata_atd": "deny",
"view_historical_tracks": "deny",
"view_history": "deny",
"view_port": "deny",
"view_predicted_position": "deny",
"view_satellites": "deny",
"view_shiplist": "deny",
"view_watchdog": "deny",
"view_wmslayers": "deny",
"web_online_access": "deny",
"web_report_access": "deny"
},
"settings": {
"allowed_pss_list": [ { name: "PSS1", uid: "E5851232-F181-44D0-8EBA-60A78E85B1E1" }, { name: "PSS2", uid: "8A8F8556-DEE4-42F5-9D32-23030185F7EE" } ],
"clock_sync_interval": 0,
"congestion_adjustment_factor": 2,
"custom_tag_info", "<o>X</o>",
"default_mmsi": 24700001,
"default_pss_list": [ { name: "PSS1", uid: "E5851232-F181-44D0-8EBA-60A78E85B1E1" }, { name: "PSS2", uid: "8A8F8556-DEE4-42F5-9D32-23030185F7EE" }, ],
"down_sample_interval": 0,
"fixed_downsampling_interval": 10,
"forward_cached_static_voyage_data": true,
"include_external_id": true,
"include_peep": false,
"is_gad_user": false,
"lss_group": { name: "Default LSS group", uid: "4F119D7E-A4E2-455D-8A01-8DCDEE1411FE" }
"max_congestion_adjustment_factor": 32,
"max_message_rate": 2000,
"mmsi_list": [ 24700001, 24700002 ],
"origin_country": 336,
"origin_region": 17,
"output_format": "nmea_tag",
"priority": "medium",
"receive_system_status": false,
"region_mask": "7",
"report_max_job_size": 250,
"report_permission_allow_all": false,
"report_permissions": { "history_track": "view", "ship_report": "all" },
"report_priority": "low",
"time_between_congestion_adjustments": 60,
"time_stamp_method": "server",
"use_timestamp": true,
"user_type": "subscriber",
"web_max_lookback_time": 48
},
"receive_filter": {
"allow_addressed_messages": false,
"areas": [ { name: "My Area", uid: "F168676C-DEF3-4E2E-94FB-A5513A5BF56E" } ],
"countries": [ 436, 275, 277 ],
"delay": 2,
"psss": [ { name: "PSS1", uid: "E5851232-F181-44D0-8EBA-60A78E85B1E1" } ],
"range_dependant_update": {
"position": [ -12.44194444444445, 56.72944444444445 ],
"ranges": [ {
"distance": 1000,
"interval": 60
}, {
"distance": 10000,
"interval": 500
} ]
},
"regions": [ { name: "Region example", uid: "10A7DCD0-BE88-4668-A1EE-362B4C646E7F" } ],
"source_mode_is_and": true,
"source_tags": [ "tag1", "tag2" ],
"update_interval": 5
},
"transmit_filter": {
"binary_message_content": [ { "dac": 1, "fi": 11, type: "both" }, { "dac": 1, "fi": 31, type: "broadcast" } ],
"expression": "SOG>5",
"include_predefined_ship_list": true,
"include_user_defined_ship_list": true,
"message_types": [ 1, 2, 3 ],
"mobile_types": [ "class_a", "aton" ],
"predefined_ship_list": [ { name: "My_shiplist", uid: "367D5F05-690A-465B-AAC2-E2037611AAE1" } ],
"types_of_ship": [ "pilot", "passenger", "cargo" ],
"unsupported_message_types": false,
"unsupported_mobile_types": false,
"unsupported_ship_types": false,
"user_defined_ship_list_callsign": [ "XC457", "ZX81" ],
"user_defined_ship_list_imo": [ 56789, 23456 ],
"user_defined_ship_list_mmsi": [ 123456789, 111111111 ]
},
"warn_on_deletion": true
}
Note: The warn_on_deletion
flag is read-only (determined by the backend based on access rights).
Note: When reading the configuration, elements such as areas, ship lists etc. are presented as an (array of) object(s) with properties name
and uid
. When writing the configuration, simply provide the name.
To update a user, specify the relevant parameters and use
/config/user/〈name〉 PUT
Example: To reset the password of a user, use
{ password: "new password" } PUT
To retrieve the configuration of a user, use
/config/user/〈name〉 GET
or
/config/user/〈uuid〉 GET
To retrieve configuration of all users, use
/config/user GET
To delete the configuration for a user, use
/config/user/〈name〉 DELETE
or
/config/user/〈uuid〉 DELETE
To copy a user, use { "name": 〈newname〉 }
/config/user/〈name〉/clone POST
This will copy all settings etc. of the user 〈name〉 to a new user named 〈newname〉, including the password.
Note that direct access IPs and MMSI numbers will not be copied.
To reassign a user's resources to another user, use
/config/user/〈name〉/reassign POST
{ "name": 〈otheruser〉 }
Notice this section is EXPERIMENTAL and the interface may change before release.
Groups are managed in the same manner as for users, but using
/config/group
Example:
/config/group PUT
{
"name": "Test Group",
"settings": {
"output_format": "nmea_tag",
"report_priority": "low"
},
"access_rights": {
"admin_shapes": "deny",
"configure_ship_lists": "allow"
}
}
Notice this section is EXPERIMENTAL and the interface may change before release.
Shiplists are lists of ships that can be used for filters.
To create a shiplist call
POST /config/shiplist
{"name" : "my_shiplist", "max" : 20, "ships" : [{"imo":9501590, "name" : "KATEXPRESS 1"}, {"mmsi":219003825}, {"name" : "KATEXPRESS 2", "callsign" : "OUYM"}], "acl": ["group name"] }
Notice name, imo, mmsi and callsign are supported. It is not required that all fields are set. The more the better.
The acl parameter is optional. If not specified, the list will only be accessible to the creator.
To update call with a complete new replacement list, e.g to remove "KATEXPRESS 2" call with the remainder of the list.
PUT /config/shiplist/my_shiplist
{"name" : "my_shiplist", "max" : 20, "ships" : [{"imo":9501590, "name" : "KATEXPRESS 1"}, {"mmsi":219003825}], "acl": ["group name"]}
PUT /config/shiplist/my_shiplist
{"name" : "my_shiplist", "max" : 20, "ships" : [{"imo":9501590, "name" : "KATEXPRESS 1"}, {"mmsi":219003825}], "acl": [ { "uid": "B73FD47D-4E9C-4BF0-812F-CAC015CFD643" } ]}
Note that "name" and "max" are optional.
The acl parameter is optional. If not specified, the list will only be accessible to the creator.
To reset a shiplist to an empty list, call
PUT /config/shiplist/my_shiplist
{"ships" : []}
To get a list of all the shiplists available to a given user, call
GET /config/shiplist
To get a list of only the names of the shiplists available to a given user, call
GET /config/shiplist?full=false
To get a single shiplist, call
GET /config/shiplist/〈name〉
Notice this section is EXPERIMENTAL and the interface may change before release.
To retrieve a shape, use
/config/shape/〈id〉 GET
where id
can be either a numeric ID, e.g. 906622052417545
, or an alphanumeric UUID, e.g. 753ac5ad-1b43-415f-b586-4eb256fe0a10
.
The return value will be on the form
{ "id" : 906622052417545, "name" : "London", "type" : "polygon", "uid" : 〈uuid〉, "polygon" : 〈geojson〉 }
{ "id" : 906361415024649, "name" : "Hawaii", "type" : "circle", "uid" : 〈uuid〉, "circle" : { "center" :〈geojson〉, "radius" : 1200 } }
{ "id" : 905638038044681, "name" : "London", "type" : "line", "uid" : 〈uuid〉, "line" : 〈geojson〉 }
To retrieve shapes associated with a known port, use
/config/shape/port/〈id〉 GET
where id
can be either a numeric ID (e.g. 31560
), a LOCODE (e.g. GBFXT
), or a name (e.g. Felixstowe
).
The return value will be on the form
{ "id" : 31560, "locode" : "GBFXT", "name" : "FELIXSTOWE", "outer" : 〈geojson〉, "inner" : [ 〈geojson〉 ] }
The inner
field can contain an arbitrary number of polygons, including zero.