openapi: 3.0.1 info: title: Agent Admin Datahose API description: 'This document refers to Symphony API calls to send and receive messages and content. They need the on-premise Agent installed to perform decryption/encryption of content. - sessionToken and keyManagerToken can be obtained by calling the authenticationAPI on the symphony back end and the key manager respectively. Refer to the methods described in authenticatorAPI.yaml. - Actions are defined to be atomic, ie will succeed in their entirety or fail and have changed nothing. - If it returns a 40X status then it will have sent no message to any stream even if a request to some subset of the requested streams would have succeeded. - If this contract cannot be met for any reason then this is an error and the response code will be 50X. - MessageML is a markup language for messages. See reference here: https://rest-api.symphony.com/docs/messagemlv2 - **Real Time Events**: The following events are returned when reading from a real time messages and events stream ("datafeed"). These events will be returned for datafeeds created with the v5 endpoints. To know more about the endpoints, refer to Create Messages/Events Stream and Read Messages/Events Stream. Unless otherwise specified, all events were added in 1.46. ' version: 25.8.1 servers: - url: youragentURL.symphony.com/agent tags: - name: Datahose paths: /v5/events/read: post: tags: - Datahose summary: Creates and Reads a real time feed of messages and events of your pod (Datahose) description: "_Available on Agent 22.5.1 and above._\n\nThis API provides a real time feed of all the messages and events in the pod, \neven from conversations where the calling service account is not a member. The types of events surfaced \ncan be found in the Real Time Events list.\nIn case you retrieving SOCIALMESSAGE events, the credentials of the ceservice \naccount must be properly configured in the Agent.\n\nThe types of events returned can be found in the Real Time\nEvents list (see definition on top of the file). \n\nThe ackId sent as parameter must be empty for the first call. In the response an ackId will be sent back\nand it can be used for the next call: in this way you acknowledge that\nyou have received the events that came with that ackId.\n\nIf you have several instances of the same bot, they must share the same feed so \nthat events are spread across all bot instances. To do so, you must: share the same \nservice account provide the same \"tag\" and same \"filters\" values.\n\nThe Datahose API is an add-on to the Symphony Services, and is subject to additional charges. \nPrior to using Datahose in your Symphony environment(s), you will need to enter into a specific contract.\n" operationId: readEvents parameters: - name: sessionToken in: header description: Session authentication token. required: true schema: type: string - name: keyManagerToken in: header description: Key Manager authentication token. schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/V5EventsReadBody' example: type: datahose tag: mybotusername eventTypes: - MESSAGE_SENT updatePresence: false required: true responses: 200: description: Datafeed successfully read. content: application/json: schema: $ref: '#/components/schemas/V5EventList' 400: description: Bad request. content: application/json: schema: $ref: '#/components/schemas/V2Error' 401: description: Unauthorized. content: application/json: schema: $ref: '#/components/schemas/V2Error' 403: description: Forbidden. content: application/json: schema: $ref: '#/components/schemas/V2Error' 500: description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/V2Error' x-codegen-request-body-name: body components: schemas: V4Initiator: type: object properties: user: $ref: '#/components/schemas/V4User' V4MessageSuppressed: type: object properties: messageId: type: string stream: $ref: '#/components/schemas/V4Stream' V4User: type: object properties: userId: type: integer description: Id of user format: int64 firstName: type: string description: First name of user lastName: type: string description: Last name of user displayName: type: string description: User display name email: type: string description: Email of user username: type: string description: Applicable only to internal users V4UserRequestedToJoinRoom: type: object properties: stream: $ref: '#/components/schemas/V4Stream' affectedUsers: type: array description: List of affected users by the action (i.e. owners of the room) items: $ref: '#/components/schemas/V4User' V4RoomUpdated: type: object properties: stream: $ref: '#/components/schemas/V4Stream' newRoomProperties: $ref: '#/components/schemas/V4RoomProperties' V4InstantMessageCreated: type: object properties: stream: $ref: '#/components/schemas/V4Stream' V4SharedPost: type: object properties: message: $ref: '#/components/schemas/V4Message' sharedMessage: $ref: '#/components/schemas/V4Message' V2Error: required: - code - message type: object properties: code: type: integer format: int32 message: type: string details: type: object V4Stream: type: object properties: streamId: type: string description: Id of stream streamType: type: string description: "Stream type, possible values are:\n - IM\n - MIM\n - ROOM\n - POST\n" roomName: type: string description: Applicable only to rooms members: type: array description: Applicable only to IM Created items: $ref: '#/components/schemas/V4User' external: type: boolean crossPod: type: boolean recipientTenantIds: type: array description: 'List of tenant identifiers (aka pod identifiers) involved in the conversation. It contains more than one item if the conversation is external. Field is only present for real time messaging. ' items: type: integer format: int32 x-since: 24.2 V5EventsReadBody: required: - tag - type type: object properties: type: type: string description: The type of feed. Only allowed value is "datahose". tag: maxLength: 80 minLength: 1 type: string description: A unique identifier to ensure uniqueness of the datafeed. eventTypes: type: array description: 'At least one value is required. Values must be valid Real-Time Events, i.e. one of: * MESSAGESENT * MESSAGESUPPRESSED * SYMPHONYELEMENTSACTION * SHAREDPOST * INSTANTMESSAGECREATED * ROOMCREATED * ROOMUPDATED * ROOMDEACTIVATED * ROOMREACTIVATED * USERREQUESTEDTOJOINROOM * USERJOINEDROOM * USERLEFTROOM * ROOMMEMBERPROMOTEDTOOWNER * ROOMMEMBERDEMOTEDFROMOWNER * CONNECTIONREQUESTED * CONNECTIONACCEPTED ' items: type: string x-since: 22.7 scopes: type: array description: 'Allows to filter events by scope Scopes supported: * INTERNAL: Only events related to chats that are Internal are received. Shared Wall posts are included * EXTERNAL: Only events related to chats that are External are received. Connection Requested/Accepted events are included * FEDERATED: Only events related to chats that are Federated are received. Events that are not related to streams (Shared Wall Post, Connection Requested/Accepted) are not included. If more than one scope is set, then events included in the union of scopes will be received. If not set, then all events will be received. ' items: type: string x-since: 25.8 ackId: type: string description: "Must be omitted or set as an empty string for the first call. \nIn successive calls, it must be set to the last read ackId. \nIt acknowledges that the current batch of messages have been successfully received by the client.\n" updatePresence: type: boolean description: "Whether to update the presence status of the account to AVAILABLE \nwhen calling the endpoint. Default value is true.\n" default: true V4Event: type: object properties: id: type: string description: Event ID messageId: type: string description: Message ID timestamp: type: integer description: Timestamp of event format: int64 type: type: string description: "Event type, possible events are:\n - MESSAGESENT\n - SHAREDPOST\n - INSTANTMESSAGECREATED\n - ROOMCREATED\n - ROOMUPDATED\n - ROOMDEACTIVATED\n - ROOMREACTIVATED\n - USERJOINEDROOM\n - USERLEFTROOM\n - ROOMMEMBERPROMOTEDTOOWNER\n - ROOMMEMBERDEMOTEDFROMOWNER\n - CONNECTIONREQUESTED\n - CONNECTIONACCEPTED\n - MESSAGESUPPRESSED\n - SYMPHONYELEMENTSACTION\n - USERREQUESTEDTOJOINROOM\n - GENERICSYSTEMEVENT\n" diagnostic: type: string description: 'Details if event failed to parse for any reason. The contents of this field may not be useful, depending on the nature of the error. Only present when error occurs. ' initiator: $ref: '#/components/schemas/V4Initiator' payload: $ref: '#/components/schemas/V4Payload' V4RoomDeactivated: type: object properties: stream: $ref: '#/components/schemas/V4Stream' V4ThumbnailInfo: type: object properties: id: type: string description: The thumbnail ID. dimension: type: string description: The thumbnail pixel size. V4SymphonyElementsAction: type: object properties: stream: $ref: '#/components/schemas/V4Stream' formMessageId: type: string description: The id of the message that contains the Form formId: type: string description: The id of the Form element formValues: type: object description: The values (in JSON format) answered on the Form V4RoomMemberDemotedFromOwner: type: object properties: stream: $ref: '#/components/schemas/V4Stream' affectedUser: $ref: '#/components/schemas/V4User' V4UserLeftRoom: type: object properties: stream: $ref: '#/components/schemas/V4Stream' affectedUser: $ref: '#/components/schemas/V4User' V5EventList: type: object properties: events: type: array default: [] items: $ref: '#/components/schemas/V4Event' ackId: type: string description: "The ackId which acknowledges that the current batch of messages \nhave been successfully received by the client\n" V4MessageSent: type: object properties: message: $ref: '#/components/schemas/V4Message' V4RoomProperties: type: object properties: name: type: string description: type: string creatorUser: $ref: '#/components/schemas/V4User' createdDate: type: integer description: Timestamp format: int64 external: type: boolean crossPod: type: boolean public: type: boolean copyProtected: type: boolean readOnly: type: boolean discoverable: type: boolean membersCanInvite: type: boolean keywords: type: array default: [] items: $ref: '#/components/schemas/V4KeyValuePair' canViewHistory: type: boolean V4UserJoinedRoom: type: object properties: stream: $ref: '#/components/schemas/V4Stream' affectedUser: $ref: '#/components/schemas/V4User' V4KeyValuePair: type: object properties: key: type: string value: type: string V4GenericSystemEvent: type: object properties: stream: $ref: '#/components/schemas/V4Stream' eventTimestamp: type: integer description: The timestamp when the event was emitted format: int64 sourceSystem: type: string description: The name of the system that emitted the event eventSubtype: type: string description: The identifier of the type of generic event parameters: type: object description: Free-form properties that provide context about the event additionalProperties: true V4ConnectionAccepted: type: object properties: fromUser: $ref: '#/components/schemas/V4User' V4RoomMemberPromotedToOwner: type: object properties: stream: $ref: '#/components/schemas/V4Stream' affectedUser: $ref: '#/components/schemas/V4User' V4Payload: type: object properties: messageSent: $ref: '#/components/schemas/V4MessageSent' sharedPost: $ref: '#/components/schemas/V4SharedPost' instantMessageCreated: $ref: '#/components/schemas/V4InstantMessageCreated' roomCreated: $ref: '#/components/schemas/V4RoomCreated' roomUpdated: $ref: '#/components/schemas/V4RoomUpdated' roomDeactivated: $ref: '#/components/schemas/V4RoomDeactivated' roomReactivated: $ref: '#/components/schemas/V4RoomReactivated' userJoinedRoom: $ref: '#/components/schemas/V4UserJoinedRoom' userLeftRoom: $ref: '#/components/schemas/V4UserLeftRoom' roomMemberPromotedToOwner: $ref: '#/components/schemas/V4RoomMemberPromotedToOwner' roomMemberDemotedFromOwner: $ref: '#/components/schemas/V4RoomMemberDemotedFromOwner' connectionRequested: $ref: '#/components/schemas/V4ConnectionRequested' connectionAccepted: $ref: '#/components/schemas/V4ConnectionAccepted' messageSuppressed: $ref: '#/components/schemas/V4MessageSuppressed' symphonyElementsAction: $ref: '#/components/schemas/V4SymphonyElementsAction' userRequestedToJoinRoom: $ref: '#/components/schemas/V4UserRequestedToJoinRoom' genericSystemEvent: $ref: '#/components/schemas/V4GenericSystemEvent' V4RoomReactivated: type: object properties: stream: $ref: '#/components/schemas/V4Stream' V4ConnectionRequested: type: object properties: toUser: $ref: '#/components/schemas/V4User' V4Message: type: object properties: messageId: type: string description: Id of the message parentMessageId: type: string description: Id of the parent message, set when the message is a reply to another message or a forwarded message. Since Agent 20.14. x-since: 20.14 timestamp: type: integer description: Timestamp of the message in milliseconds since Jan 1 1970 format: int64 message: type: string description: Message content in MessageMLV2 format: MessageMLV2 sharedMessage: $ref: '#/components/schemas/V4Message' data: type: string description: Message data in EntityJSON format: JSON attachments: type: array default: [] description: Message attachments items: $ref: '#/components/schemas/V4AttachmentInfo' user: $ref: '#/components/schemas/V4User' stream: $ref: '#/components/schemas/V4Stream' externalRecipients: type: boolean description: Indicates if the message have external recipients. Only present on real time messaging. diagnostic: type: string description: 'Details if event failed to parse for any reason. The contents of this field may not be useful, depending on the nature of the error. Only present when error occurs. ' userAgent: type: string description: 'User agent string for client that sent the message. Allows callers to identify which client sent the origin message (e.g. API Agent, SFE Client, mobile, etc) ' originalFormat: type: string description: 'Indicates the format in which the message was originally sent. This could have been either: - com.symphony.markdown - Markdown OR Message ML V1 - com.symphony.messageml.v2 - Message ML V2 ' disclaimer: type: string description: 'Message that may be sent along with a regular message if configured for the POD, usually the first message sent in a room that day. ' sid: type: string description: 'Unique session identifier from where the message was created. ' example: fa691cd3-484a-4109-aeb2-57c05b78c95b replacing: type: string description: Id of the message that the current message is replacing (present only if set) replacedBy: type: string description: Id of the message that the current message is being replaced with (present only if set) initialTimestamp: type: integer description: "Timestamp of when the initial message has been created in milliseconds since \nJan 1 1970 (present only if set)\n" format: int64 initialMessageId: type: string description: Id the the initial message that has been updated (present only if set) silent: type: boolean description: When false the user/s will receive the message update as unread (true by default) x-since: 20.14 description: A representation of a message sent by a user of Symphony V4AttachmentInfo: required: - id - name - size - images type: object properties: id: type: string description: The attachment ID. name: type: string description: The file name. size: type: integer description: Size in bytes. format: int64 images: type: array items: $ref: '#/components/schemas/V4ThumbnailInfo' V4RoomCreated: type: object properties: stream: $ref: '#/components/schemas/V4Stream' roomProperties: $ref: '#/components/schemas/V4RoomProperties'