{ "swagger": "2.0", "info": { "title": "Communication Management API", "description": "This is Swagger UI environment generated for the TMF Communication Management specification", "version": "4.0.0" }, "host": "serverRoot", "basePath": "/tmf-api/communicationManagement/v4/", "schemes": [ "https" ], "consumes": [ "application/json;charset=utf-8" ], "produces": [ "application/json;charset=utf-8" ], "tags": [ { "name": "communicationMessage" }, { "name": "events subscription" } ], "paths": { "/communicationMessage": { "get": { "operationId": "listCommunicationMessage", "summary": "List or find CommunicationMessage objects", "description": "This operation list or find CommunicationMessage entities", "tags": [ "communicationMessage" ], "parameters": [ { "name": "fields", "description": "Comma-separated properties to be provided in response", "required": false, "in": "query", "type": "string" }, { "name": "offset", "description": "Requested index for start of resources to be provided in response", "required": false, "in": "query", "type": "integer" }, { "name": "limit", "description": "Requested number of resources to be provided in response", "required": false, "in": "query", "type": "integer" } ], "responses": { "200": { "description": "Success", "headers": { "X-Result-Count": { "description": "Actual number of items returned in the response body", "type": "integer" }, "X-Total-Count": { "description": "Total number of items matching criteria", "type": "integer" } }, "schema": { "type": "array", "items": { "$ref": "#/definitions/CommunicationMessage" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/Error" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/Error" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/Error" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/Error" } }, "405": { "description": "Method Not allowed", "schema": { "$ref": "#/definitions/Error" } }, "409": { "description": "Conflict", "schema": { "$ref": "#/definitions/Error" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/Error" } } } }, "post": { "operationId": "createCommunicationMessage", "summary": "Creates a CommunicationMessage", "description": "This operation creates a CommunicationMessage entity.", "tags": [ "communicationMessage" ], "parameters": [ { "name": "communicationMessage", "description": "The CommunicationMessage to be created", "required": true, "schema": { "$ref": "#/definitions/CommunicationMessage_Create" }, "in": "body" } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/CommunicationMessage" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/Error" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/Error" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/Error" } }, "405": { "description": "Method Not allowed", "schema": { "$ref": "#/definitions/Error" } }, "409": { "description": "Conflict", "schema": { "$ref": "#/definitions/Error" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/Error" } } } } }, "/communicationMessage/{id}": { "get": { "operationId": "retrieveCommunicationMessage", "summary": "Retrieves a CommunicationMessage by ID", "description": "This operation retrieves a CommunicationMessage entity. Attribute selection is enabled for all first level attributes.", "tags": [ "communicationMessage" ], "parameters": [ { "name": "id", "description": "Identifier of the CommunicationMessage", "required": true, "type": "string", "in": "path" }, { "name": "fields", "description": "Comma-separated properties to provide in response", "required": false, "type": "string", "in": "query" } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/CommunicationMessage" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/Error" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/Error" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/Error" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/Error" } }, "405": { "description": "Method Not allowed", "schema": { "$ref": "#/definitions/Error" } }, "409": { "description": "Conflict", "schema": { "$ref": "#/definitions/Error" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/Error" } } } }, "patch": { "operationId": "patchCommunicationMessage", "summary": "Updates partially a CommunicationMessage", "description": "This operation updates partially a CommunicationMessage entity.", "tags": [ "communicationMessage" ], "parameters": [ { "name": "id", "description": "Identifier of the CommunicationMessage", "required": true, "type": "string", "in": "path" }, { "name": "communicationMessage", "description": "The CommunicationMessage to be updated", "required": true, "schema": { "$ref": "#/definitions/CommunicationMessage_Update" }, "in": "body" } ], "responses": { "200": { "description": "Updated", "schema": { "$ref": "#/definitions/CommunicationMessage" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/Error" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/Error" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/Error" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/Error" } }, "405": { "description": "Method Not allowed", "schema": { "$ref": "#/definitions/Error" } }, "409": { "description": "Conflict", "schema": { "$ref": "#/definitions/Error" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/Error" } } } }, "delete": { "operationId": "deleteCommunicationMessage", "summary": "Deletes a CommunicationMessage", "description": "This operation deletes a CommunicationMessage entity.", "tags": [ "communicationMessage" ], "parameters": [ { "name": "id", "description": "Identifier of the CommunicationMessage", "required": true, "type": "string", "in": "path" } ], "responses": { "204": { "description": "Deleted" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/Error" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/Error" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/Error" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/Error" } }, "405": { "description": "Method Not allowed", "schema": { "$ref": "#/definitions/Error" } }, "409": { "description": "Conflict", "schema": { "$ref": "#/definitions/Error" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/Error" } } } } }, "/hub": { "post": { "operationId": "registerListener", "summary": "Register a listener", "description": "Sets the communication endpoint address the service instance must use to deliver information about its health state, execution state, failures and metrics.", "tags": [ "events subscription" ], "parameters": [ { "name": "data", "schema": { "$ref": "#/definitions/EventSubscriptionInput" }, "required": true, "in": "body", "description": "Data containing the callback endpoint to deliver the information" } ], "responses": { "201": { "description": "Subscribed", "schema": { "$ref": "#/definitions/EventSubscription" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/Error" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/Error" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/Error" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/Error" } }, "405": { "description": "Method Not allowed", "schema": { "$ref": "#/definitions/Error" } }, "409": { "description": "Conflict", "schema": { "$ref": "#/definitions/Error" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/Error" } } } } }, "/hub/{id}": { "delete": { "operationId": "unregisterListener", "summary": "Unregister a listener", "description": "Resets the communication endpoint address the service instance must use to deliver information about its health state, execution state, failures and metrics.", "tags": [ "events subscription" ], "parameters": [ { "name": "id", "type": "string", "required": true, "in": "path", "description": "The id of the registered listener" } ], "responses": { "204": { "description": "Deleted" }, "400": { "description": "Bad request", "schema": { "$ref": "#/definitions/Error" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/Error" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/Error" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/Error" } }, "405": { "description": "Method not allowed", "schema": { "$ref": "#/definitions/Error" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/Error" } } } } } }, "definitions": { "Any": {}, "Attachment": { "type": "object", "description": "Complements the description of an element (for instance a product) through video, pictures...", "properties": { "id": { "type": "string", "description": "Unique identifier for this particular attachment" }, "href": { "type": "string", "description": "URI for this Attachment" }, "attachmentType": { "type": "string", "description": "Attachment type such as video, picture" }, "content": { "type": "string", "description": "The actual contents of the attachment object, if embedded, encoded as base64" }, "description": { "type": "string", "description": "A narrative text describing the content of the attachment" }, "mimeType": { "type": "string", "description": "Attachment mime type such as extension file for video, picture and document" }, "name": { "type": "string", "description": "The name of the attachment" }, "url": { "type": "string", "description": "Uniform Resource Locator, is a web page address (a subset of URI)" }, "size": { "$ref": "#/definitions/Quantity", "description": "The size of the attachment." }, "validFor": { "$ref": "#/definitions/TimePeriod", "description": "The period of time for which the attachment is valid" }, "@baseType": { "type": "string", "description": "When sub-classing, this defines the super-class" }, "@schemaLocation": { "type": "string", "format": "uri", "description": "A URI to a JSON-Schema file that defines additional attributes and relationships" }, "@type": { "type": "string", "description": "When sub-classing, this defines the sub-class entity name" } } }, "Characteristic": { "type": "object", "description": "Describes a given characteristic of an object or entity through a name/value pair.", "required": [ "name", "value" ], "properties": { "id": { "type": "string", "description": "Unique identifier of the characteristic" }, "name": { "type": "string", "description": "Name of the characteristic" }, "valueType": { "type": "string", "description": "Data type of the value of the characteristic" }, "characteristicRelationship": { "type": "array", "items": { "$ref": "#/definitions/CharacteristicRelationship" } }, "value": { "$ref": "#/definitions/Any", "description": "The value of the characteristic" }, "@baseType": { "type": "string", "description": "When sub-classing, this defines the super-class" }, "@schemaLocation": { "type": "string", "format": "uri", "description": "A URI to a JSON-Schema file that defines additional attributes and relationships" }, "@type": { "type": "string", "description": "When sub-classing, this defines the sub-class entity name" } } }, "CharacteristicRelationship": { "type": "object", "description": "Another Characteristic that is related to the current Characteristic;", "properties": { "id": { "type": "string", "description": "Unique identifier of the characteristic" }, "relationshipType": { "type": "string", "description": "The type of relationship" }, "@baseType": { "type": "string", "description": "When sub-classing, this defines the super-class" }, "@schemaLocation": { "type": "string", "format": "uri", "description": "A URI to a JSON-Schema file that defines additional attributes and relationships" }, "@type": { "type": "string", "description": "When sub-classing, this defines the sub-class entity name" } } }, "CommunicationMessage": { "type": "object", "description": "Communication message means a notification approach in the format of a message which can be dispatched (sent) to the certain user by the system with the content which can be felt and understood by the recipient. The user can be either a final customer or a customer service agent. The message can reach the customer in different interaction channels, including: email, short message, mobile app notification (push).", "properties": { "id": { "type": "string", "description": "Unique identifier of Communication Message" }, "href": { "type": "string", "description": "Hypertext Reference of the Communication Message" }, "content": { "type": "string", "description": "The content of the communication message" }, "description": { "type": "string", "description": "Description for the whole object" }, "logFlag": { "type": "boolean" }, "messageType": { "type": "string", "description": "The type of message, such as: SMS, Email, Mobile app push notification" }, "priority": { "type": "string", "description": "The priority of the communication message.\nSmall number means higher priority." }, "scheduledSendTime": { "type": "string", "format": "date-time", "description": "The scheduled time for sending the communication message" }, "sendTime": { "type": "string", "format": "date-time", "description": "The time of sending communication message" }, "sendTimeComplete": { "type": "string", "format": "date-time", "description": "The time of completion of sending communication message" }, "subject": { "type": "string", "description": "The title of the message, necessary for the email and mobile app push" }, "tryTimes": { "type": "integer", "description": "How many times do you want to retry the delivery of this message?" }, "attachment": { "type": "array", "items": { "$ref": "#/definitions/Attachment" }, "description": "Any attachment associated with this message" }, "characteristic": { "type": "array", "items": { "$ref": "#/definitions/Characteristic" }, "description": "Any additional characteristic(s) of this message" }, "receiver": { "type": "array", "items": { "$ref": "#/definitions/Receiver" }, "description": "The receiver(s) of this message" }, "sender": { "$ref": "#/definitions/Sender", "description": "The sender of this message" }, "state": { "$ref": "#/definitions/CommunicationMessageStateType", "description": "Status of communication message" }, "@baseType": { "type": "string", "description": "When sub-classing, this defines the super-class" }, "@schemaLocation": { "type": "string", "format": "uri", "description": "A URI to a JSON-Schema file that defines additional attributes and relationships" }, "@type": { "type": "string", "description": "When sub-classing, this defines the sub-class entity name" } } }, "CommunicationMessage_Create": { "type": "object", "description": "Communication message means a notification approach in the format of a message which can be dispatched (sent) to the certain user by the system with the content which can be felt and understood by the recipient. The user can be either a final customer or a customer service agent. The message can reach the customer in different interaction channels, including: email, short message, mobile app notification (push).\nSkipped properties: id,href", "required": [ "content", "receiver", "sender", "messageType" ], "properties": { "content": { "type": "string", "description": "The content of the communication message" }, "description": { "type": "string", "description": "Description for the whole object" }, "logFlag": { "type": "boolean" }, "messageType": { "type": "string", "description": "The type of message, such as: SMS, Email, Mobile app push notification" }, "priority": { "type": "string", "description": "The priority of the communication message.\nSmall number means higher priority." }, "scheduledSendTime": { "type": "string", "format": "date-time", "description": "The scheduled time for sending the communication message" }, "sendTime": { "type": "string", "format": "date-time", "description": "The time of sending communication message" }, "sendTimeComplete": { "type": "string", "format": "date-time", "description": "The time of completion of sending communication message" }, "subject": { "type": "string", "description": "The title of the message, necessary for the email and mobile app push" }, "tryTimes": { "type": "integer", "description": "How many times do you want to retry the delivery of this message?" }, "attachment": { "type": "array", "items": { "$ref": "#/definitions/Attachment" }, "description": "Any attachment associated with this message" }, "characteristic": { "type": "array", "items": { "$ref": "#/definitions/Characteristic" }, "description": "Any additional characteristic(s) of this message" }, "receiver": { "type": "array", "items": { "$ref": "#/definitions/Receiver" }, "minItems": 1, "description": "The receiver(s) of this message" }, "sender": { "$ref": "#/definitions/Sender", "description": "The sender of this message" }, "state": { "$ref": "#/definitions/CommunicationMessageStateType", "description": "Status of communication message" }, "@baseType": { "type": "string", "description": "When sub-classing, this defines the super-class" }, "@schemaLocation": { "type": "string", "format": "uri", "description": "A URI to a JSON-Schema file that defines additional attributes and relationships" }, "@type": { "type": "string", "description": "When sub-classing, this defines the sub-class entity name" } } }, "CommunicationMessage_Update": { "type": "object", "description": "Communication message means a notification approach in the format of a message which can be dispatched (sent) to the certain user by the system with the content which can be felt and understood by the recipient. The user can be either a final customer or a customer service agent. The message can reach the customer in different interaction channels, including: email, short message, mobile app notification (push).\nSkipped properties: id,href", "properties": { "content": { "type": "string", "description": "The content of the communication message" }, "description": { "type": "string", "description": "Description for the whole object" }, "logFlag": { "type": "boolean" }, "messageType": { "type": "string", "description": "The type of message, such as: SMS, Email, Mobile app push notification" }, "priority": { "type": "string", "description": "The priority of the communication message.\nSmall number means higher priority." }, "scheduledSendTime": { "type": "string", "format": "date-time", "description": "The scheduled time for sending the communication message" }, "sendTime": { "type": "string", "format": "date-time", "description": "The time of sending communication message" }, "sendTimeComplete": { "type": "string", "format": "date-time", "description": "The time of completion of sending communication message" }, "subject": { "type": "string", "description": "The title of the message, necessary for the email and mobile app push" }, "tryTimes": { "type": "integer", "description": "How many times do you want to retry the delivery of this message?" }, "attachment": { "type": "array", "items": { "$ref": "#/definitions/Attachment" }, "description": "Any attachment associated with this message" }, "characteristic": { "type": "array", "items": { "$ref": "#/definitions/Characteristic" }, "description": "Any additional characteristic(s) of this message" }, "receiver": { "type": "array", "items": { "$ref": "#/definitions/Receiver" }, "description": "The receiver(s) of this message" }, "sender": { "$ref": "#/definitions/Sender", "description": "The sender of this message" }, "state": { "$ref": "#/definitions/CommunicationMessageStateType", "description": "Status of communication message" }, "@baseType": { "type": "string", "description": "When sub-classing, this defines the super-class" }, "@schemaLocation": { "type": "string", "format": "uri", "description": "A URI to a JSON-Schema file that defines additional attributes and relationships" }, "@type": { "type": "string", "description": "When sub-classing, this defines the sub-class entity name" } } }, "CommunicationMessageStateType": { "type": "string", "description": "Communication message state type", "enum": [ "initial", "inProgress", "completed", "cancelled", "failed" ] }, "EntityRef": { "type": "object", "description": "Entity reference schema to be use for all entityRef class.", "properties": { "id": { "type": "string", "description": "Unique identifier of a related entity." }, "href": { "type": "string", "description": "Reference of the related entity." }, "name": { "type": "string", "description": "Name of the related entity." }, "@baseType": { "type": "string", "description": "When sub-classing, this defines the super-class" }, "@schemaLocation": { "type": "string", "format": "uri", "description": "A URI to a JSON-Schema file that defines additional attributes and relationships" }, "@type": { "type": "string", "description": "When sub-classing, this defines the sub-class entity name" }, "@referredType": { "type": "string", "description": "The actual type of the target instance when needed for disambiguation." } }, "required": [ "id" ] }, "Quantity": { "type": "object", "description": "An amount in a given unit", "properties": { "amount": { "default": 1, "type": "number", "format": "float", "description": "Numeric value in a given unit" }, "units": { "type": "string", "description": "Unit" } } }, "Receiver": { "type": "object", "description": "Receivers of the communication message.", "properties": { "id": { "type": "string", "description": "ID of the receiver" }, "appUserId": { "type": "string", "description": "ID of the mobile app user" }, "email": { "type": "string", "description": "Receiver address of email, if the communication type is email" }, "ip": { "type": "string", "description": "IP address of the receiver" }, "name": { "type": "string", "description": "Name of the receiver" }, "phoneNumber": { "type": "string", "description": "Phone number of the receiver, if the communication type is SMS." }, "party": { "$ref": "#/definitions/RelatedParty" }, "@baseType": { "type": "string", "description": "When sub-classing, this defines the super-class" }, "@schemaLocation": { "type": "string", "format": "uri", "description": "A URI to a JSON-Schema file that defines additional attributes and relationships" }, "@type": { "type": "string", "description": "When sub-classing, this defines the sub-class entity name" } } }, "RelatedParty": { "type": "object", "description": "Related Entity reference. A related party defines party or party role linked to a specific entity.", "required": [ "@referredType", "id" ], "properties": { "id": { "type": "string", "description": "Unique identifier of a related entity." }, "href": { "type": "string", "description": "Reference of the related entity." }, "name": { "type": "string", "description": "Name of the related entity." }, "role": { "type": "string", "description": "Role played by the related party" }, "@baseType": { "type": "string", "description": "When sub-classing, this defines the super-class" }, "@schemaLocation": { "type": "string", "format": "uri", "description": "A URI to a JSON-Schema file that defines additional attributes and relationships" }, "@type": { "type": "string", "description": "When sub-classing, this defines the sub-class entity name" }, "@referredType": { "type": "string", "description": "The actual type of the target instance when needed for disambiguation." } } }, "Sender": { "type": "object", "description": "Sender of the communication message.", "properties": { "id": { "type": "string", "description": "ID of the sender" }, "email": { "type": "string", "description": "Sender address of email, if the communication type is email" }, "name": { "type": "string", "description": "Name of the sender" }, "phoneNumber": { "type": "string", "description": "Phone number of the sender, if the communication type is SMS." }, "party": { "$ref": "#/definitions/RelatedParty" }, "@baseType": { "type": "string", "description": "When sub-classing, this defines the super-class" }, "@schemaLocation": { "type": "string", "format": "uri", "description": "A URI to a JSON-Schema file that defines additional attributes and relationships" }, "@type": { "type": "string", "description": "When sub-classing, this defines the sub-class entity name" } } }, "TimePeriod": { "type": "object", "description": "A period of time, either as a deadline (endDateTime only) a startDateTime only, or both", "properties": { "endDateTime": { "type": "string", "format": "date-time", "description": "End of the time period, using IETC-RFC-3339 format" }, "startDateTime": { "type": "string", "format": "date-time", "description": "Start of the time period, using IETC-RFC-3339 format. If you define a start, you must also define an end" } } }, "EventSubscription": { "type": "object", "description": "Sets the communication endpoint address the service instance must use to deliver notification information", "required": [ "id", "callback" ], "properties": { "id": { "type": "string", "description": "Id of the listener" }, "callback": { "type": "string", "description": "The callback being registered." }, "query": { "type": "string", "description": "additional data to be passed" } } }, "EventSubscriptionInput": { "type": "object", "description": "Sets the communication endpoint address the service instance must use to deliver notification information", "required": [ "callback" ], "properties": { "callback": { "type": "string", "description": "The callback being registered." }, "query": { "type": "string", "description": "additional data to be passed" } } }, "Error": { "description": "Used when an API throws an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx)", "type": "object", "required": [ "code", "reason" ], "properties": { "code": { "type": "string", "description": "Application relevant detail, defined in the API or a common list." }, "reason": { "type": "string", "description": "Explanation of the reason for the error which can be shown to a client user." }, "message": { "type": "string", "description": "More details and corrective actions related to the error which can be shown to a client user." }, "status": { "type": "string", "description": "HTTP Error code extension" }, "referenceError": { "type": "string", "format": "uri", "description": "URI of documentation describing the error." }, "@baseType": { "type": "string", "description": "When sub-classing, this defines the super-class." }, "@schemaLocation": { "type": "string", "format": "uri", "description": "A URI to a JSON-Schema file that defines additional attributes and relationships" }, "@type": { "type": "string", "description": "When sub-classing, this defines the sub-class entity name." } } } } }