{ "swagger": "2.0", "info": { "version": "2.2.0", "title": "STM Voyage Information Service SeaSWIM API", "description": "2.2.0" }, "host": "localhost", "schemes": ["http", "https"], "paths": { "/acknowledgement": { "post": { "tags": ["Acknowledgement"], "summary": "", "description": "Endpoint for receipt of acknowledgement of uploaded message", "operationId": "Acknowledgement", "consumes": ["application/json"], "produces": ["application/json"], "parameters": [{ "name": "deliveryAck", "in": "body", "description": "Acknowledgement", "required": true, "schema": { "$ref": "#/definitions/DeliveryAck" } }], "responses": { "200": { "description": "OK" }, "400": { "description": "Bad Request" }, "401": { "description": "Unauthorized (the user cannot be authenticated in the Identity Registry)" }, "403": { "description": "Forbidden" }, "500": { "description": "Internal Server Error" }, "default": { "description": "unexpected error" } } } }, "/area": { "post": { "tags": ["Area"], "summary": "", "description": "Upload area message to VIS from other services i.e. Route Check service as an informational message", "operationId": "UploadArea", "consumes": ["text/xml"], "produces": ["application/json"], "parameters": [{ "name": "area", "in": "body", "description": "Uploaded area message in S124 format to consumer", "required": true, "schema": { "type": "string" } }, { "name": "deliveryAckEndPoint", "in": "query", "description": "Acknowledgement expected. Base URL for VIS as in Service Registry. An ack is send back to this url when the private application retrieve the message from the VIS ", "required": false, "type": "string" }], "responses": { "200": { "description": "OK" }, "400": { "description": "Bad Request" }, "401": { "description": "Unauthorized (the user cannot be auhtenticated in the Identity Registry)" }, "403": { "description": "Forbidden" }, "500": { "description": "Internal Server Error" }, "default": { "description": "unexpected error" } } } }, "/textMessage": { "post": { "tags": ["TextMessage"], "summary": "", "description": "Upload text message to VIS from other services i.e. Route Optimization service.", "operationId": "UploadTextMessage", "consumes": ["text/xml"], "produces": ["application/json"], "parameters": [{ "name": "textMessageObject", "in": "body", "description": "Uploaded Text message to consumer", "required": true, "schema": { "type": "string" } }, { "name": "deliveryAckEndPoint", "in": "query", "description": "Acknowledgement expected. Base URL for VIS as in Service Registry. An ack is send back to this url when the private application retrieve the message from the VIS ", "required": false, "type": "string" }], "responses": { "200": { "description": "OK" }, "400": { "description": "Bad Request" }, "401": { "description": "Unauthorized (the user cannot be auhtenticated in the Identity Registry)" }, "403": { "description": "Forbidden" }, "500": { "description": "Internal Server Error" }, "default": { "description": "unexpected error" } } } }, "/voyagePlans": { "get": { "tags": ["VoyagePlan"], "summary": "", "description": "Returns active VoyagePlans", "operationId": "GetVoyagePlans", "consumes": [], "produces": ["application/json"], "parameters": [{ "name": "uvid", "in": "query", "description": "Unique identity (URN) of a voyageplan", "required": false, "type": "string" }, { "name": "routeStatus", "in": "query", "description": "Status of a route for a voyageplan: 1-Original 2-Planned_for_voyage 3-Optimized 4-Cross_Checked 5-Safety_Checked 6-Approved 7-Used_for_monitoring 8-Inactive", "required": false, "type": "string" }], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/GetVoyagePlanResponse" } }, "400": { "description": "Bad Request" }, "401": { "description": "Unauthorized (the user cannot be authenticated in the Identity Registry)" }, "403": { "description": "Forbidden (Not authorized request forwarded to operator)" }, "404": { "description": "Not Found (the requested voyagePlan is not found)" }, "500": { "description": "Internal Server Error" }, "default": { "description": "unexpected error" } } }, "post": { "tags": ["VoyagePlan"], "summary": "", "description": "Upload VoyagePlan to VIS from other services i.e. Route Optimization service.", "operationId": "UploadVoyagePlan", "consumes": ["text/xml"], "produces": ["application/json"], "parameters": [{ "name": "voyagePlan", "in": "body", "description": "Voyage Plan in RTZ format", "required": true, "schema": { "type": "string" } }, { "name": "deliveryAckEndPoint", "in": "query", "description": "Acknowledgement expected. Base URL for VIS as in Service Registry. An ack is send back to this URL when the private application retrieve the message from the VIS ", "required": false, "type": "string" }, { "name": "callbackEndpoint", "in": "query", "description": "Callback expected. Base url of the VIS instance as in the Service Registry. The callback response will be sent to the voyagePlans endPoint of the instance", "required": false, "type": "string" }], "responses": { "200": { "description": "OK" }, "400": { "description": "Bad Request" }, "401": { "description": "Unauthorized (the user cannot be auhtenticated in the Identity Registry)" }, "403": { "description": "Forbidden" }, "500": { "description": "Internal Server Error" }, "default": { "description": "unexpected error" } } } }, "/voyagePlans/subscription": { "post": { "tags": ["VoyagePlan"], "summary": "", "description": "Request subscription for active Voyage Plan from other services i.e. Enhanced Monitoring", "operationId": "SubscribeToVoyagePlan", "consumes": ["application/json"], "produces": ["application/json"], "parameters": [{ "name": "callbackEndpoint", "in": "query", "description": "Callback expected. Base URL of the vis instance as in the Service Registry. The callback response will be sended to the voyagePlans endPoint of the instance", "required": true, "type": "string" }, { "name": "uvid", "in": "query", "description": "Unique identity (URN) of a voyageplan. If no uvid is provided, the subcription is to all the active uvid that your organization has access to", "required": false, "type": "string" }], "responses": { "200": { "description": "OK" }, "400": { "description": "Bad Request" }, "401": { "description": "Unauthorized (the user cannot be auhtenticated in the Identity Registry)" }, "403": { "description": "Forbidden (Not authorized request forwarded to operator)" }, "404": { "description": "Not Found (the requested Voyage Plan is not found)" }, "500": { "description": "Internal Server Error" }, "default": { "description": "unexpected error" } } }, "get": { "tags": ["VoyagePlan"], "summary": "", "description": "Retrieve a list of subcribed UVID for the callBackEndPoint and Organization", "operationId": "GetSubscriptionToVoyagePlans", "consumes": [], "produces": ["application/json"], "parameters": [{ "name": "callbackEndpoint", "in": "query", "description": "Callback expected. Base URL of the vis instance as in the Service Registry. The callback response will be sended to the voyagePlans endPoint of the instance", "required": true, "type": "string" }], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/GetSubscriptionResponse" } } }, "400": { "description": "Bad Request" }, "401": { "description": "Unauthorized (the user cannot be authenticated in the Identity Registry)" }, "403": { "description": "Forbidden (Not authorized request forwarded to operator)" }, "404": { "description": "Not Found (the requested Voyage Plan is not found)" }, "500": { "description": "Internal Server Error" }, "default": { "description": "unexpected error" } } }, "delete": { "tags": ["VoyagePlan"], "summary": "", "description": "Remove subscription for active Voyage Plan from other services i.e. Enhanced Monitoring", "operationId": "RemoveVoyagePlanSubscription", "consumes": [], "produces": ["application/json"], "parameters": [{ "name": "callbackEndpoint", "in": "query", "description": "Callback expected. Base url of the vis instance as in the Service Registry. The callback response will be sended to the voyagePlans endPoint of the instance", "required": true, "type": "string" }, { "name": "uvid", "in": "query", "description": "Unique identity (URN) of a voyageplan", "required": false, "type": "string" }], "responses": { "200": { "description": "OK" }, "400": { "description": "Bad Request" }, "401": { "description": "Unauthorized (the user cannot be authenticated in the Identity Registry)" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found (the requested Voyage Plan is not found)" }, "500": { "description": "Internal Server Error" }, "default": { "description": "unexpected error" } } } } }, "definitions": { "DeliveryAck": { "description": "Acknowledgement message that incoming (uploaded) message has been delivered to consumer", "type": "object", "properties": { "id": { "description": "Acknowledgement ID", "type": "string" }, "referenceId": { "description": "Reference ID such as a UVID, TXT id or area message id", "type": "string" }, "timeOfDelivery": { "format": "date-time", "description": "Time of Delivery of message to consumer", "type": "string" }, "fromId": { "description": "Identity O (organisation) of the message sender in MRN format", "type": "string" }, "fromName": { "description": "\"Identity O (organisation) of the message sender in full name", "type": "string" }, "toId": { "description": "Identity O (organisation) of the message receiver in MRN format", "type": "string" }, "toName": { "description": "IIdentity O (organisation) of the message receiver in full name", "type": "string" }, "ackResult": { "description": "Descriptive acknowledgement message", "type": "string" } } }, "GetVoyagePlanResponse": { "description": "Response object from GET voyagePlans. Can contain 0 or several (0..*) voyage plans", "type": "object", "properties": { "lastInteractionTime": { "format": "date-time", "description": "Last interaction time with private application. Can indicate the current connectivity on private side of VIS", "type": "string" }, "voyagePlans": { "description": "Array of voyage plans in RTZ XML format", "type": "array", "items": { "$ref": "#/definitions/VoyagePlan" } } } }, "VoyagePlan": { "description": "A voyage plan in RTZ XML format", "type": "object", "properties": { "route": { "description": "A voyage plan in RTZ XML format", "type": "string" } } }, "GetSubscriptionResponse": { "description": "DataId object containing the UVID in URN format", "type": "object", "properties": { "DataId": { "description": "Unique identity (URN) of a voyageplan", "type": "string" } } } } }