{"openapi":"3.0.1","info":{"title":"Maps Messaging Rest Server","description":"Maps Messaging Server Rest API, provides simple Rest API to manage and interact with the server","contact":{"name":"Matthew Buckton","url":"http://mapsmessaging.io","email":"info@mapsmessaging.io"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0"},"version":"BuildVersionSetAtBuildTime"},"externalDocs":{"description":"Maps Messaging","url":"https://www.mapsmessaging.io/"},"tags":[{"name":"Authentication and Authorisation Management","description":"Managers authentication and authorisation of users on the server"},{"name":"Destination Management","description":"Used to manage the destinations (topic/queues) and the subscriptions"},{"name":"Messaging Interface","description":"Used to send and receive messages from the server"},{"name":"Server Health","description":"Simple server health endpoint"},{"name":"Server Interface Management","description":"Used to manage the servers network interfaces"},{"name":"Schema Management","description":"Used to manage the schemas configured on the server"},{"name":"Server Status","description":"Server status and simple queries"}],"paths":{"/health":{"get":{"tags":["Server Health"],"operationId":"getPing","responses":{"default":{"description":"default response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/api/v1/updates":{"get":{"tags":["Server Status"],"operationId":"checkForUpdates","responses":{"default":{"description":"default response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCheckResponse"}}}}}}},"/api/v1/name":{"get":{"tags":["Server Status"],"operationId":"getName","responses":{"default":{"description":"default response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StringResponse"}}}}}}},"/api/v1/ping":{"get":{"tags":["Server Status"],"operationId":"getPing_1","responses":{"default":{"description":"default response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StringResponse"}}}}}}},"/api/v1/stats":{"get":{"tags":["Server Status"],"operationId":"getStats","responses":{"default":{"description":"default response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerStatisticsResponse"}}}}}}},"/api/v1/auth/groups":{"get":{"tags":["Authentication and Authorisation Management"],"operationId":"getGroups","responses":{"default":{"description":"default response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupListResponse"}}}}}},"post":{"tags":["Authentication and Authorisation Management"],"operationId":"addGroup","requestBody":{"content":{"*/*":{"schema":{"type":"string"}}}},"responses":{"default":{"description":"default response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Group"}}}}}}},"/api/v1/auth/groups/{groupUuid}/{userUuid}":{"post":{"tags":["Authentication and Authorisation Management"],"operationId":"addUserToGroup","parameters":[{"name":"groupUuid","in":"path","required":true,"schema":{"type":"string"}},{"name":"userUuid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"default":{"description":"default response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseResponse"}}}}}},"delete":{"tags":["Authentication and Authorisation Management"],"operationId":"removeUserToGroup","parameters":[{"name":"groupUuid","in":"path","required":true,"schema":{"type":"string"}},{"name":"userUuid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"default":{"description":"default response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseResponse"}}}}}}},"/api/v1/auth/groups/{groupUuid}":{"get":{"tags":["Authentication and Authorisation Management"],"operationId":"getGroups_1","parameters":[{"name":"groupUuid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"default":{"description":"default response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Group"}}}}}},"delete":{"tags":["Authentication and Authorisation Management"],"operationId":"deleteUser","parameters":[{"name":"groupUuid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"default":{"description":"default response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseResponse"}}}}}}},"/api/v1/auth/users":{"get":{"tags":["Authentication and Authorisation Management"],"operationId":"getUsers","responses":{"default":{"description":"default response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserListResponse"}}}}}},"post":{"tags":["Authentication and Authorisation Management"],"operationId":"addUser","requestBody":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/NewUser"}}}},"responses":{"default":{"description":"default response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseResponse"}}}}}}},"/api/v1/auth/users/{userUuid}":{"delete":{"tags":["Authentication and Authorisation Management"],"operationId":"deleteUser_1","parameters":[{"name":"userUuid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"default":{"description":"default response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseResponse"}}}}}}},"/api/v1/server/destination":{"get":{"tags":["Destination Management"],"operationId":"getAllDestinations","responses":{"default":{"description":"default response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestinationResponse"}}}}}}},"/api/v1/server/destination/{destination}":{"get":{"tags":["Destination Management"],"operationId":"getDestination","parameters":[{"name":"destination","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"default":{"description":"default response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestinationResponse"}}}}}}},"/api/v1/server/destination/status":{"get":{"tags":["Destination Management"],"operationId":"getAllDestinations_1","responses":{"default":{"description":"default response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestinationStatusResponse"}}}}}}},"/api/v1/server/destination/status/{destination}":{"get":{"tags":["Destination Management"],"operationId":"getDestination_1","parameters":[{"name":"destination","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"default":{"description":"default response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestinationStatusResponse"}}}}}}},"/api/v1/server/interface/{endpoint}":{"get":{"tags":["Server Interface Management"],"operationId":"getInterface","parameters":[{"name":"endpoint","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"default":{"description":"default response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InterfaceInfo"}}}}}}},"/api/v1/server/interface/{endpoint}/pause":{"put":{"tags":["Server Interface Management"],"operationId":"pauseInterface","parameters":[{"name":"endpoint","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"default":{"description":"default response","content":{"*/*":{}}}}}},"/api/v1/server/interface/{endpoint}/resume":{"put":{"tags":["Server Interface Management"],"operationId":"resumeInterface","parameters":[{"name":"endpoint","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"default":{"description":"default response","content":{"*/*":{}}}}}},"/api/v1/server/interface/{endpoint}/start":{"put":{"tags":["Server Interface Management"],"operationId":"startInterface","parameters":[{"name":"endpoint","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"default":{"description":"default response","content":{"*/*":{}}}}}},"/api/v1/server/interface/{endpoint}/stop":{"put":{"tags":["Server Interface Management"],"operationId":"stopInterface","parameters":[{"name":"endpoint","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"default":{"description":"default response","content":{"*/*":{}}}}}},"/api/v1/server/interfaces":{"get":{"tags":["Server Interface Management"],"operationId":"getAllInterfaces","responses":{"default":{"description":"default response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InterfaceDetailResponse"}}}}}}},"/api/v1/server/interfaces/pauseAll":{"put":{"tags":["Server Interface Management"],"operationId":"pauseAllInterfaces","responses":{"default":{"description":"default response","content":{"*/*":{}}}}}},"/api/v1/server/interfaces/resumeAll":{"put":{"tags":["Server Interface Management"],"operationId":"resumeAllInterfaces","responses":{"default":{"description":"default response","content":{"*/*":{}}}}}},"/api/v1/server/interfaces/startAll":{"put":{"tags":["Server Interface Management"],"operationId":"startAllInterfaces","responses":{"default":{"description":"default response","content":{"*/*":{}}}}}},"/api/v1/server/interfaces/stopAll":{"put":{"tags":["Server Interface Management"],"operationId":"stopAllInterfaces","responses":{"default":{"description":"default response","content":{"*/*":{}}}}}},"/api/v1/server/interface/status":{"get":{"tags":["Server Interface Management"],"operationId":"getAllInterfaceStatus","responses":{"default":{"description":"default response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InterfaceStatus"}}}}}}}},"/api/v1/server/interface/{endpoint}/status":{"get":{"tags":["Server Interface Management"],"operationId":"getInterfaceStatus","parameters":[{"name":"endpoint","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"default":{"description":"default response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InterfaceStatus"}}}}}}},"/api/v1/messaging/consume":{"post":{"tags":["Messaging Interface"],"summary":"Get all messages","description":"Retrieves messages for a specified subscription","operationId":"consumeAllMessages","responses":{"200":{"description":"Messages retrieved successfully","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/api/v1/messaging/consume/{subscriptionName}":{"post":{"tags":["Messaging Interface"],"summary":"Get messages","description":"Retrieves messages for a specified subscription","operationId":"consumeMessages","parameters":[{"name":"subscriptionName","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Messages retrieved successfully","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/api/v1/messaging/subscriptionDepth":{"get":{"tags":["Messaging Interface"],"summary":"Get all message depth","description":"Get the depth of the queue for all subscriptions","operationId":"getAllSubscriptionDepth","responses":{"200":{"description":"Message depths retrieved successfully","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/api/v1/messaging/subscriptionDepth/{subscriptionName}":{"get":{"tags":["Messaging Interface"],"summary":"Get message depth","description":"Get the depth of the queue for a specified subscription","operationId":"getSubscriptionDepth","parameters":[{"name":"subscriptionName","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Message depth retrieved successfully","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/api/v1/messaging/publish":{"post":{"tags":["Messaging Interface"],"summary":"Publish a message","description":"Publishes a message to a specified topic","operationId":"publishMessage","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishRequest"}}}},"responses":{"200":{"description":"Message published successfully","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/api/v1/messaging/subscribe":{"post":{"tags":["Messaging Interface"],"summary":"Subscribe to a topic","description":"Subscribes to a specified topic","operationId":"subscribeToTopic","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequest"}}}},"responses":{"200":{"description":"Subscribed to topic successfully","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/api/v1/server/schema":{"get":{"tags":["Schema Management"],"summary":"Get all schemas","description":"Returns all schemas","operationId":"getAllSchemas","responses":{"default":{"description":"default response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaResponse"}}}}}},"post":{"tags":["Schema Management"],"summary":"Add new schema","description":"Adds a new schema to the registry","operationId":"addSchema","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaPostData"}}}},"responses":{"default":{"description":"default response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BaseResponse"}}}}}},"delete":{"tags":["Schema Management"],"summary":"Delete all schemas","description":"Deletes all the schema configurations","operationId":"deleteAllSchemas","responses":{"default":{"description":"default response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseResponse"}}}}}}},"/api/v1/server/schema/{schemaId}":{"get":{"tags":["Schema Management"],"summary":"Get schema","description":"Returns a specific schema","operationId":"getSchemaById","parameters":[{"name":"schemaId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"default":{"description":"default response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaResponse"}}}}}},"delete":{"tags":["Schema Management"],"summary":"Delete specific schema","description":"Delete the schema configuration by unique id","operationId":"deleteSchemaById","parameters":[{"name":"schemaId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"default":{"description":"default response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseResponse"}}}}}}},"/api/v1/server/schema/formats":{"get":{"tags":["Schema Management"],"summary":"Get all known formats supported","description":"Returns list of supported formats","operationId":"getKnownFormats","responses":{"default":{"description":"default response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StringListResponse"}}}}}}},"/api/v1/server/schema/link-format":{"get":{"tags":["Schema Management"],"summary":"Get the link-format config","description":"Returns link-format list","operationId":"getLinkFormat","responses":{"default":{"description":"default response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/api/v1/server/schema/context/{context}":{"get":{"tags":["Schema Management"],"summary":"Get schema by context","description":"Returns all schemas that match the context","operationId":"getSchemaByContext","parameters":[{"name":"context","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"default":{"description":"default response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaResponse"}}}}}}},"/api/v1/server/schema/type/{type}":{"get":{"tags":["Schema Management"],"summary":"Get schema by type","description":"Returns all schemas that match the type","operationId":"getSchemaByType","parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"default":{"description":"default response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaResponse"}}}}}}},"/api/v1/server/schema/map":{"get":{"tags":["Schema Management"],"summary":"Get schemas and the configuration","description":"Returns all schemas and mapping information","operationId":"getSchemaMapping","responses":{"default":{"description":"default response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaMapResponse"}}}}}}},"/application.wadl/{path}":{"get":{"operationId":"getExternalGrammar","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"default":{"description":"default response","content":{"application/xml":{}}}}}},"/application.wadl":{"get":{"operationId":"getWadl","responses":{"default":{"description":"default response","content":{"application/vnd.sun.wadl+xml":{},"application/xml":{}}}}}}},"components":{"schemas":{"UpdateCheckResponse":{"type":"object","properties":{"schemaUpdate":{"type":"integer","format":"int64"},"destinationUpdate":{"type":"integer","format":"int64"},"interfaceUpdate":{"type":"integer","format":"int64"}}},"StringResponse":{"type":"object","properties":{"data":{"type":"string"}}},"LinkedMovingAverageRecord":{"type":"object","properties":{"name":{"type":"string"},"unitName":{"type":"string"},"timeSpan":{"type":"integer","format":"int64"},"current":{"type":"integer","format":"int64"},"stats":{"type":"object","additionalProperties":{"type":"integer","format":"int64"}}},"description":"Map of moving averages"},"ServerStatistics":{"type":"object","properties":{"packetsSent":{"type":"integer","format":"int64"},"packetsReceived":{"type":"integer","format":"int64"},"totalReadBytes":{"type":"integer","format":"int64"},"totalWriteBytes":{"type":"integer","format":"int64"},"totalConnections":{"type":"integer","format":"int64"},"totalDisconnections":{"type":"integer","format":"int64"},"totalNoInterestMessages":{"type":"integer","format":"int64"},"totalSubscribedMessages":{"type":"integer","format":"int64"},"totalPublishedMessages":{"type":"integer","format":"int64"},"totalRetrievedMessages":{"type":"integer","format":"int64"},"totalExpiredMessages":{"type":"integer","format":"int64"},"totalDeliveredMessages":{"type":"integer","format":"int64"},"stats":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/LinkedMovingAverageRecord"}}}},"ServerStatisticsResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ServerStatistics"}}},"Group":{"type":"object","properties":{"name":{"type":"string"},"uniqueId":{"type":"string","format":"uuid"},"usersList":{"type":"array","items":{"type":"string","format":"uuid"}}}},"BaseResponse":{"type":"object"},"GroupListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Group"}}}},"NewUser":{"type":"object","properties":{"username":{"type":"string"},"password":{"type":"string"}}},"User":{"type":"object","properties":{"username":{"type":"string"},"uniqueId":{"type":"string","format":"uuid"},"groupList":{"type":"array","items":{"type":"string","format":"uuid"}}}},"UserListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/User"}}}},"Destination":{"type":"object","properties":{"name":{"type":"string","description":"The name of the destination","example":"myDestination"},"type":{"type":"string","description":"The type of the destination","example":"queue"},"storedMessages":{"type":"integer","description":"The number of messages stored in the destination","format":"int64","example":123},"delayedMessages":{"type":"integer","description":"The number of messages delayed in the destination","format":"int64","example":123},"pendingMessages":{"type":"integer","description":"The number of messages pending in the destination","format":"int64","example":123},"schemaId":{"type":"string","description":"The schema id of the destination","example":"123"}}},"DestinationResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Destination"}}}},"DestinationStatus":{"type":"object","properties":{"name":{"type":"string","description":"Name of the destination"},"statistics":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/LinkedMovingAverageRecord"},"description":"Map of moving averages"},"storeageStatistics":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/LinkedMovingAverageRecord"},"description":"Map of storage statistics"},"description":"Map of storage statistics"}}},"DestinationStatusResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DestinationStatus"}}}},"InterfaceInfo":{"type":"object","properties":{"name":{"type":"string","description":"Unique name of the interface"},"port":{"type":"integer","description":"Port that the interface is bound to","format":"int32"},"host":{"type":"string","description":"Host that the interface is bound to"},"state":{"type":"string","description":"Current state of the interface"},"config":{"type":"object","additionalProperties":{"type":"object","description":"Configuration for the interface"},"description":"Configuration for the interface"}}},"InterfaceDetailResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/InterfaceInfo"}},"globalConfig":{"type":"object","additionalProperties":{"type":"object"}}}},"InterfaceStatus":{"type":"object","properties":{"name":{"type":"string","description":"Name of the interface"},"bytesSent":{"type":"integer","description":"Number of bytes sent","format":"int64"},"bytesReceived":{"type":"integer","description":"Number of bytes received","format":"int64"},"messagesSent":{"type":"integer","description":"Number of messages sent","format":"int64"},"messagesReceived":{"type":"integer","description":"Number of messages received","format":"int64"},"statistics":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/LinkedMovingAverageRecord"},"description":"Map of moving averages"}}},"Message":{"required":["payload"],"type":"object","properties":{"payload":{"type":"array","description":"Payload of the message","items":{"type":"string","description":"Payload of the message","format":"byte"}},"contentType":{"type":"string","description":"Content type of the message"},"correlationData":{"type":"array","description":"Correlation data of the message","items":{"type":"string","description":"Correlation data of the message","format":"byte"}},"dataMap":{"type":"object","additionalProperties":{"type":"object","description":"Message parameters"},"description":"Message parameters"},"expiry":{"type":"integer","description":"Message expiry time in milliseconds","format":"int64","default":-1},"priority":{"type":"integer","description":"Message priority 4 = Normal value, Highest = 10","format":"int32","default":4},"qualityOfService":{"type":"integer","description":"Quality of Service level for the message, 0 : At most once, 1: At least once and 2: exactly once ","format":"int32","default":0}},"description":"Message object containing the data to be published"},"PublishRequest":{"required":["destinationName","message"],"type":"object","properties":{"destinationName":{"type":"string","description":"Topic to which the message will be published"},"message":{"$ref":"#/components/schemas/Message"},"retain":{"type":"boolean","description":"Should the message be retained on the destination","default":false}}},"SubscriptionRequest":{"required":["destinationName","name"],"type":"object","properties":{"name":{"type":"string","description":"Name of the subscription"},"destinationName":{"type":"string","description":"Name of the destination (topic or queue) for subscription"},"namedSubscription":{"type":"string","description":"Name of the named subscription, if any"},"filter":{"type":"string","description":"Filter expression using JMS selector syntax"},"maxDepth":{"type":"integer","description":"Maximum depth of messages queued for the subscription","format":"int32","default":1},"retainMessage":{"type":"boolean","description":"Should the message be retained on the destination","default":false}}},"SchemaPostData":{"type":"object","properties":{"schema":{"type":"string"},"context":{"type":"string"}}},"SchemaResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"string"}}}},"StringListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"string"}}}},"SchemaMapResponse":{"type":"object","properties":{"data":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}}