All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.symphony.api.agent.MessagesApi Maven / Gradle / Ivy

There is a newer version: 8.0.5
Show newest version
package com.symphony.api.agent;

import com.symphony.api.model.Error;
import java.io.File;
import com.symphony.api.model.ImportResponseList;
import com.symphony.api.model.ImportedMessage;
import com.symphony.api.model.Message;
import com.symphony.api.model.MessageList;
import com.symphony.api.model.MessageSearchQuery;
import com.symphony.api.model.MessageSubmission;
import com.symphony.api.model.V2Error;
import com.symphony.api.model.V2ImportResponseList;
import com.symphony.api.model.V2ImportedMessage;
import com.symphony.api.model.V2Message;
import com.symphony.api.model.V2MessageList;
import com.symphony.api.model.V2MessageSubmission;
import com.symphony.api.model.V4ImportResponseList;
import com.symphony.api.model.V4ImportedMessage;
import com.symphony.api.model.V4Message;
import com.symphony.api.model.V4MessageBlastResponse;
import com.symphony.api.model.V4MessageList;

import java.io.InputStream;
import java.io.OutputStream;
import java.util.List;
import java.util.Map;
import javax.ws.rs.*;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.MediaType;
import org.apache.cxf.jaxrs.ext.multipart.*;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.responses.ApiResponses;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.media.ArraySchema;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;

/**
 * Agent API
 *
 * 

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 aome 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. * */ @Path("/") public interface MessagesApi { /** * Get a message by ID * */ @GET @Path("/v1/message/{id}") @Produces({ "application/json" }) @Operation(summary = "Get a message by ID", tags={ }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = V4Message.class))), @ApiResponse(responseCode = "204", description = "No Messages."), @ApiResponse(responseCode = "400", description = "Client error, see response body for further details.", content = @Content(schema = @Schema(implementation = V2Error.class))), @ApiResponse(responseCode = "401", description = "Unauthorized: Session tokens invalid.", content = @Content(schema = @Schema(implementation = V2Error.class))), @ApiResponse(responseCode = "403", description = "Forbidden: Caller lacks necessary entitlement.", content = @Content(schema = @Schema(implementation = V2Error.class))), @ApiResponse(responseCode = "500", description = "Server error, see response body for further details.", content = @Content(schema = @Schema(implementation = V2Error.class))) }) public V4Message v1MessageIdGet(@HeaderParam("sessionToken") String sessionToken, @HeaderParam("keyManagerToken") String keyManagerToken, @PathParam("id") String id); /** * Import messages from other systems into Symphony. * * Sends a message to be imported into the system. Allows you to override the timestamp and author of the message with your desired values. The requesting user must have the Content Management role. The user that the message is intended to have come from must also be present in the conversation. The intended message timestamp must be a valid time from the past. It cannot be a future timestamp. * */ @POST @Path("/v1/message/import") @Consumes({ "application/json" }) @Produces({ "application/json" }) @Operation(summary = "Import messages from other systems into Symphony.", tags={ }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Message sent.", content = @Content(schema = @Schema(implementation = ImportResponseList.class))), @ApiResponse(responseCode = "400", description = "Client error, see response body for further details.", content = @Content(schema = @Schema(implementation = Error.class))), @ApiResponse(responseCode = "401", description = "Unauthorized: Session tokens invalid.", content = @Content(schema = @Schema(implementation = Error.class))), @ApiResponse(responseCode = "403", description = "Forbidden: Caller lacks necessary entitlement.", content = @Content(schema = @Schema(implementation = Error.class))), @ApiResponse(responseCode = "500", description = "Server error, see response body for further details.", content = @Content(schema = @Schema(implementation = Error.class))) }) public ImportResponseList v1MessageImportPost(List body, @HeaderParam("sessionToken") String sessionToken, @HeaderParam("keyManagerToken") String keyManagerToken); /** * Search messages * * Search messages according to the specified criteria. The \"query\" parameter takes a search query defined as \"field:value\" pairs combined by the operator \"AND\" (e.g. \"text:foo AND autor:bar\"). Supported fields are (case-insensitive): \"text\", \"author\", \"hashtag\", \"cashtag\", \"mention\", \"signal\", \"fromDate\", \"toDate\", \"streamId\", \"streamType\". \"text\" search requires a \"streamId\" to be specified. \"streamType\" accepts one of the following values: \"chat\" (IMs and MIMs), \"im\", \"mim\", \"chatroom\", \"post\". \"signal\" queries can only be combined with \"fromDate\", \"toDate\", \"skip\" and \"limit\" parameters. * */ @GET @Path("/v1/message/search") @Produces({ "application/json" }) @Operation(summary = "Search messages", tags={ }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = V4MessageList.class))), @ApiResponse(responseCode = "204", description = "No Messages."), @ApiResponse(responseCode = "400", description = "Client error, see response body for further details.", content = @Content(schema = @Schema(implementation = V2Error.class))), @ApiResponse(responseCode = "401", description = "Unauthorized: Session tokens invalid.", content = @Content(schema = @Schema(implementation = V2Error.class))), @ApiResponse(responseCode = "403", description = "Forbidden: Caller lacks necessary entitlement.", content = @Content(schema = @Schema(implementation = V2Error.class))), @ApiResponse(responseCode = "500", description = "Server error, see response body for further details.", content = @Content(schema = @Schema(implementation = V2Error.class))) }) public V4MessageList v1MessageSearchGet(@QueryParam("query")String query, @HeaderParam("sessionToken") String sessionToken, @HeaderParam("keyManagerToken") String keyManagerToken, @QueryParam("skip")Integer skip, @QueryParam("limit")Integer limit, @QueryParam("scope")String scope, @QueryParam("sortDir")String sortDir); /** * Search messages * * Search messages according to the specified criteria. * */ @POST @Path("/v1/message/search") @Consumes({ "application/json" }) @Produces({ "application/json" }) @Operation(summary = "Search messages", tags={ }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = V4MessageList.class))), @ApiResponse(responseCode = "204", description = "No Messages."), @ApiResponse(responseCode = "400", description = "Client error, see response body for further details.", content = @Content(schema = @Schema(implementation = V2Error.class))), @ApiResponse(responseCode = "401", description = "Unauthorized: Session tokens invalid.", content = @Content(schema = @Schema(implementation = V2Error.class))), @ApiResponse(responseCode = "403", description = "Forbidden: Caller lacks necessary entitlement.", content = @Content(schema = @Schema(implementation = V2Error.class))), @ApiResponse(responseCode = "500", description = "Server error, see response body for further details.", content = @Content(schema = @Schema(implementation = V2Error.class))) }) public V4MessageList v1MessageSearchPost(MessageSearchQuery body, @HeaderParam("sessionToken") String sessionToken, @HeaderParam("keyManagerToken") String keyManagerToken, @QueryParam("skip")Integer skip, @QueryParam("limit")Integer limit, @QueryParam("scope")String scope, @QueryParam("sortDir")String sortDir); /** * Post a message to one existing stream. * * Post a new message to the given stream. The stream can be a chatroom, an IM or a multiparty IM. If the message parameter type is TEXT then the message contains plain text and cannot include formating, hash tags, mentions etc. If the message parameter type is MessageML then the message contains MessageML which allows for these entities. If the message is in MessageML and fails schema validation a client error results If the message is sent then 200 is returned. * */ @POST @Path("/v1/stream/{sid}/message/create") @Consumes({ "application/json" }) @Produces({ "application/json" }) @Operation(summary = "Post a message to one existing stream.", tags={ }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Message sent.", content = @Content(schema = @Schema(implementation = Message.class))), @ApiResponse(responseCode = "400", description = "Client error, see response body for further details.", content = @Content(schema = @Schema(implementation = Error.class))), @ApiResponse(responseCode = "401", description = "Unauthorized: Session tokens invalid.", content = @Content(schema = @Schema(implementation = Error.class))), @ApiResponse(responseCode = "403", description = "Forbidden: Caller lacks necessary entitlement.", content = @Content(schema = @Schema(implementation = Error.class))), @ApiResponse(responseCode = "500", description = "Server error, see response body for further details.", content = @Content(schema = @Schema(implementation = Error.class))) }) public Message v1StreamSidMessageCreatePost(MessageSubmission body, @HeaderParam("sessionToken") String sessionToken, @HeaderParam("keyManagerToken") String keyManagerToken, @PathParam("sid") String sid); /** * Get messages from an existing stream. * * A caller can fetch all unseen messages by passing the timestamp of the last message seen as the since parameter and the number of messages with the same timestamp value already seen as the skip parameter. This means that every message will be seen exactly once even in the case that an additional message is processed with the same timestamp as the last message returned by the previous call, and the case where there are more than maxMessages with the same timestamp value. This method is intended for historic queries and is generally reliable but if guaranteed delivery of every message in real time is required then the equivilent firehose method should be called. * */ @GET @Path("/v1/stream/{sid}/message") @Produces({ "application/json" }) @Operation(summary = "Get messages from an existing stream.", tags={ }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = MessageList.class))), @ApiResponse(responseCode = "204", description = "No Messages."), @ApiResponse(responseCode = "400", description = "Client error, see response body for further details.", content = @Content(schema = @Schema(implementation = Error.class))), @ApiResponse(responseCode = "401", description = "Unauthorized: Session tokens invalid.", content = @Content(schema = @Schema(implementation = Error.class))), @ApiResponse(responseCode = "403", description = "Forbidden: Caller lacks necessary entitlement.", content = @Content(schema = @Schema(implementation = Error.class))), @ApiResponse(responseCode = "500", description = "Server error, see response body for further details.", content = @Content(schema = @Schema(implementation = Error.class))) }) public MessageList v1StreamSidMessageGet(@PathParam("sid") String sid, @QueryParam("since")Long since, @HeaderParam("sessionToken") String sessionToken, @HeaderParam("keyManagerToken") String keyManagerToken, @QueryParam("offset")Integer offset, @QueryParam("maxMessages")Integer maxMessages); /** * Import messages from other systems into Symphony. * * Sends a message to be imported into the system. Allows you to override the timestamp and author of the message with your desired values. The requesting user must have the Content Management role. The user that the message is intended to have come from must also be present in the conversation. The intended message timestamp must be a valid time from the past. It cannot be a future timestamp. Optionally the original message ID can be specified to identify the imported message for the purpose of repeat imports. * */ @POST @Path("/v2/message/import") @Consumes({ "application/json" }) @Produces({ "application/json" }) @Operation(summary = "Import messages from other systems into Symphony.", tags={ }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Message sent.", content = @Content(schema = @Schema(implementation = V2ImportResponseList.class))), @ApiResponse(responseCode = "400", description = "Client error, see response body for further details.", content = @Content(schema = @Schema(implementation = Error.class))), @ApiResponse(responseCode = "401", description = "Unauthorized: Session tokens invalid.", content = @Content(schema = @Schema(implementation = Error.class))), @ApiResponse(responseCode = "403", description = "Forbidden: Caller lacks necessary entitlement.", content = @Content(schema = @Schema(implementation = Error.class))), @ApiResponse(responseCode = "500", description = "Server error, see response body for further details.", content = @Content(schema = @Schema(implementation = Error.class))) }) public V2ImportResponseList v2MessageImportPost(List body, @HeaderParam("sessionToken") String sessionToken, @HeaderParam("keyManagerToken") String keyManagerToken); /** * Post a message to one existing stream. * * Post a new message to the given stream. The stream can be a chatroom, an IM or a multiparty IM. You may include an attachment on the message (see the V2MessageSubmission parameter). If the message parameter type is TEXT then the message contains plain text and cannot include formating, hash tags, mentions etc. If the message parameter type is MessageML then the message contains MessageML which allows for these entities. If the message is in MessageML and fails schema validation a client error results If the message is sent then 200 is returned. * */ @POST @Path("/v2/stream/{sid}/message/create") @Consumes({ "application/json" }) @Produces({ "application/json" }) @Operation(summary = "Post a message to one existing stream.", tags={ }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Message sent.", content = @Content(schema = @Schema(implementation = V2Message.class))), @ApiResponse(responseCode = "400", description = "Client error, see response body for further details.", content = @Content(schema = @Schema(implementation = Error.class))), @ApiResponse(responseCode = "401", description = "Unauthorized: Session tokens invalid.", content = @Content(schema = @Schema(implementation = Error.class))), @ApiResponse(responseCode = "403", description = "Forbidden: Caller lacks necessary entitlement.", content = @Content(schema = @Schema(implementation = Error.class))), @ApiResponse(responseCode = "500", description = "Server error, see response body for further details.", content = @Content(schema = @Schema(implementation = Error.class))) }) public V2Message v2StreamSidMessageCreatePost(V2MessageSubmission body, @HeaderParam("sessionToken") String sessionToken, @HeaderParam("keyManagerToken") String keyManagerToken, @PathParam("sid") String sid); /** * Get messages from an existing stream. * * A caller can fetch all unseen messages by passing the timestamp of the last message seen as the since parameter and the number of messages with the same timestamp value already seen as the skip parameter. This means that every message will be seen exactly once even in the case that an additional message is processed with the same timestamp as the last message returned by the previous call, and the case where there are more than maxMessages with the same timestamp value. This method is intended for historic queries and is generally reliable but if guaranteed delivery of every message in real time is required then the equivilent firehose method should be called. * */ @GET @Path("/v2/stream/{sid}/message") @Produces({ "application/json" }) @Operation(summary = "Get messages from an existing stream.", tags={ }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = V2MessageList.class))), @ApiResponse(responseCode = "204", description = "No Messages."), @ApiResponse(responseCode = "400", description = "Client error, see response body for further details.", content = @Content(schema = @Schema(implementation = Error.class))), @ApiResponse(responseCode = "401", description = "Unauthorized: Session tokens invalid.", content = @Content(schema = @Schema(implementation = Error.class))), @ApiResponse(responseCode = "403", description = "Forbidden: Caller lacks necessary entitlement.", content = @Content(schema = @Schema(implementation = Error.class))), @ApiResponse(responseCode = "500", description = "Server error, see response body for further details.", content = @Content(schema = @Schema(implementation = Error.class))) }) public V2MessageList v2StreamSidMessageGet(@PathParam("sid") String sid, @QueryParam("since")Long since, @HeaderParam("sessionToken") String sessionToken, @HeaderParam("keyManagerToken") String keyManagerToken, @QueryParam("offset")Integer offset, @QueryParam("limit")Integer limit); /** * PROVISIONAL - Post a message to one existing stream. * * Post a new message to the given stream. The stream can be a chatroom, an IM or a multiparty IM. You may include an attachment on the message (see the V2MessageSubmission parameter). If the message parameter type is TEXT then the message contains plain text and cannot include formating, hash tags, mentions etc. If the message parameter type is MessageML then the message contains MessageML which allows for these entities. If the message is in MessageML and fails schema validation a client error results If the message is sent then 200 is returned. Regarding authentication, you must either use the sessionToken which was created for delegated app access or both the sessionToken and keyManagerToken together. * */ @POST @Path("/v3/stream/{sid}/message/create") @Consumes({ "application/json" }) @Produces({ "application/json" }) @Operation(summary = "PROVISIONAL - Post a message to one existing stream.", tags={ }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Message sent.", content = @Content(schema = @Schema(implementation = V2Message.class))), @ApiResponse(responseCode = "400", description = "Client error, see response body for further details.", content = @Content(schema = @Schema(implementation = Error.class))), @ApiResponse(responseCode = "401", description = "Unauthorized: Session tokens invalid.", content = @Content(schema = @Schema(implementation = Error.class))), @ApiResponse(responseCode = "403", description = "Forbidden: Caller lacks necessary entitlement.", content = @Content(schema = @Schema(implementation = Error.class))), @ApiResponse(responseCode = "500", description = "Server error, see response body for further details.", content = @Content(schema = @Schema(implementation = Error.class))) }) public V2Message v3StreamSidMessageCreatePost(V2MessageSubmission body, @HeaderParam("sessionToken") String sessionToken, @PathParam("sid") String sid, @HeaderParam("keyManagerToken") String keyManagerToken); /** * Post a message to multiple existing streams. * * Post a new message to the given list of streams. The stream can be a chatroom, an IM or a multiparty IM. You may include an attachment on the message. The message can be provided as MessageMLV2 or PresentationML. Both formats support Freemarker templates. The optional parameter \"data\" can be used to provide a JSON payload containing entity data. If the message contains explicit references to entity data (in \"data-entity-id\" element attributes), this parameter is required. If the message is in MessageML and fails schema validation a client error results This endpoint is idempotent, it means that a 200 response will be returned even if the message has not been delivered to some streams. Check the `errors` map from the response in order to see on which stream(s) the message has not been delivered. The maximum number of streams where the message can be sent is limitted to 100. Regarding authentication, you must either use the sessionToken which was created for delegated app access or both the sessionToken and keyManagerToken together. * */ @POST @Path("/v4/message/blast") @Consumes({ "multipart/form-data" }) @Produces({ "application/json" }) @Operation(summary = "Post a message to multiple existing streams.", tags={ }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Blast message sent.", content = @Content(schema = @Schema(implementation = V4MessageBlastResponse.class))), @ApiResponse(responseCode = "400", description = "Client error, see response body for further details.", content = @Content(schema = @Schema(implementation = V2Error.class))), @ApiResponse(responseCode = "401", description = "Unauthorized: Session tokens invalid.", content = @Content(schema = @Schema(implementation = V2Error.class))), @ApiResponse(responseCode = "403", description = "Forbidden: Caller lacks necessary entitlement.", content = @Content(schema = @Schema(implementation = V2Error.class))), @ApiResponse(responseCode = "451", description = "Compliance Issues found in message or file", content = @Content(schema = @Schema(implementation = V2Error.class))), @ApiResponse(responseCode = "500", description = "Server error, see response body for further details.", content = @Content(schema = @Schema(implementation = V2Error.class))) }) public V4MessageBlastResponse v4MessageBlastPost(@Multipart(value = "sids") String sids, @Multipart(value = "message") String message, @Multipart(value = "data") String data, @Multipart(value = "version") String version, @Multipart(value = "attachment" ) Attachment attachmentDetail, @Multipart(value = "preview" ) Attachment previewDetail, @HeaderParam("sessionToken") String sessionToken, @HeaderParam("keyManagerToken") String keyManagerToken); /** * Import messages from other systems into Symphony. * * Sends a message to be imported into the system. Allows you to override the timestamp and author of the message with your desired values. The requesting user must have the Content Management role. The user that the message is intended to have come from must also be present in the conversation. The intended message timestamp must be a valid time from the past. It cannot be a future timestamp. Optionally the original message ID can be specified to identify the imported message for the purpose of repeat imports. * */ @POST @Path("/v4/message/import") @Consumes({ "application/json" }) @Produces({ "application/json" }) @Operation(summary = "Import messages from other systems into Symphony.", tags={ }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Message sent.", content = @Content(schema = @Schema(implementation = V4ImportResponseList.class))), @ApiResponse(responseCode = "400", description = "Client error, see response body for further details.", content = @Content(schema = @Schema(implementation = V2Error.class))), @ApiResponse(responseCode = "401", description = "Unauthorized: Session tokens invalid.", content = @Content(schema = @Schema(implementation = V2Error.class))), @ApiResponse(responseCode = "403", description = "Forbidden: Caller lacks necessary entitlement.", content = @Content(schema = @Schema(implementation = V2Error.class))), @ApiResponse(responseCode = "500", description = "Server error, see response body for further details.", content = @Content(schema = @Schema(implementation = V2Error.class))) }) public V4ImportResponseList v4MessageImportPost(List body, @HeaderParam("sessionToken") String sessionToken, @HeaderParam("keyManagerToken") String keyManagerToken); /** * Post a message to one existing stream. * * Post a new message to the given stream. The stream can be a chatroom, an IM or a multiparty IM. You may include an attachment on the message. The message can be provided as MessageMLV2 or PresentationML. Both formats support Freemarker templates. The optional parameter \"data\" can be used to provide a JSON payload containing entity data. If the message contains explicit references to entity data (in \"data-entity-id\" element attributes), this parameter is required. If the message is in MessageML and fails schema validation a client error results If the message is sent then 200 is returned. Regarding authentication, you must either use the sessionToken which was created for delegated app access or both the sessionToken and keyManagerToken together. * */ @POST @Path("/v4/stream/{sid}/message/create") @Consumes({ "multipart/form-data" }) @Produces({ "application/json" }) @Operation(summary = "Post a message to one existing stream.", tags={ }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Message sent.", content = @Content(schema = @Schema(implementation = V4Message.class))), @ApiResponse(responseCode = "400", description = "Client error, see response body for further details.", content = @Content(schema = @Schema(implementation = V2Error.class))), @ApiResponse(responseCode = "401", description = "Unauthorized: Session tokens invalid.", content = @Content(schema = @Schema(implementation = V2Error.class))), @ApiResponse(responseCode = "403", description = "Forbidden: Caller lacks necessary entitlement.", content = @Content(schema = @Schema(implementation = V2Error.class))), @ApiResponse(responseCode = "451", description = "Compliance Issues found in message or file", content = @Content(schema = @Schema(implementation = V2Error.class))), @ApiResponse(responseCode = "500", description = "Server error, see response body for further details.", content = @Content(schema = @Schema(implementation = V2Error.class))) }) public V4Message v4StreamSidMessageCreatePost(@HeaderParam("sessionToken") String sessionToken, @PathParam("sid") String sid, @Multipart(value = "message", required = false) String message, @Multipart(value = "data", required = false) String data, @Multipart(value = "version", required = false) String version, @Multipart(value = "attachment" , required = false) Attachment attachmentDetail, @Multipart(value = "preview" , required = false) Attachment previewDetail, @HeaderParam("keyManagerToken") String keyManagerToken); /** * Get messages from an existing stream. * * A caller can fetch all unseen messages by passing the timestamp of the last message seen as the since parameter and the number of messages with the same timestamp value already seen as the skip parameter. This means that every message will be seen exactly once even in the case that an additional message is processed with the same timestamp as the last message returned by the previous call, and the case where there are more than maxMessages with the same timestamp value. This method is intended for historic queries and is generally reliable but if guaranteed delivery of every message in real time is required then the equivilent firehose method should be called. * */ @GET @Path("/v4/stream/{sid}/message") @Produces({ "application/json" }) @Operation(summary = "Get messages from an existing stream.", tags={ }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = V4MessageList.class))), @ApiResponse(responseCode = "204", description = "No Messages."), @ApiResponse(responseCode = "400", description = "Client error, see response body for further details.", content = @Content(schema = @Schema(implementation = V2Error.class))), @ApiResponse(responseCode = "401", description = "Unauthorized: Session tokens invalid.", content = @Content(schema = @Schema(implementation = V2Error.class))), @ApiResponse(responseCode = "403", description = "Forbidden: Caller lacks necessary entitlement.", content = @Content(schema = @Schema(implementation = V2Error.class))), @ApiResponse(responseCode = "500", description = "Server error, see response body for further details.", content = @Content(schema = @Schema(implementation = V2Error.class))) }) public V4MessageList v4StreamSidMessageGet(@PathParam("sid") String sid, @QueryParam("since")Long since, @HeaderParam("sessionToken") String sessionToken, @HeaderParam("keyManagerToken") String keyManagerToken, @QueryParam("skip")Integer skip, @QueryParam("limit")Integer limit); /** * Update an existing message. * * Update an existing message. The existing message must be a valid social message, that has not been deleted. The message can be provided as MessageMLV2 or PresentationML. Both formats support Freemarker templates. The optional parameter \"data\" can be used to provide a JSON payload containing entity data. If the message contains explicit references to entity data (in \"data-entity-id\" element attributes), this parameter is required. If the message is in MessageML and fails schema validation a client error results If the message is updated then 200 is returned. Regarding authentication, you must either use the sessionToken which was created for delegated app access or both the sessionToken and keyManagerToken together. * */ @POST @Path("/v4/stream/{sid}/message/{mid}/update") @Consumes({ "multipart/form-data" }) @Produces({ "application/json" }) @Operation(summary = "Update an existing message.", tags={ }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Message sent.", content = @Content(schema = @Schema(implementation = V4Message.class))), @ApiResponse(responseCode = "400", description = "Client error, see response body for further details.", content = @Content(schema = @Schema(implementation = V2Error.class))), @ApiResponse(responseCode = "401", description = "Unauthorized: Session tokens invalid.", content = @Content(schema = @Schema(implementation = V2Error.class))), @ApiResponse(responseCode = "403", description = "Forbidden: Caller lacks necessary entitlement.", content = @Content(schema = @Schema(implementation = V2Error.class))), @ApiResponse(responseCode = "451", description = "Compliance Issues found in message or file", content = @Content(schema = @Schema(implementation = V2Error.class))), @ApiResponse(responseCode = "500", description = "Server error, see response body for further details.", content = @Content(schema = @Schema(implementation = V2Error.class))) }) public V4Message v4StreamSidMessageMidUpdatePost(@HeaderParam("sessionToken") String sessionToken, @PathParam("sid") String sid, @PathParam("mid") String mid, @Multipart(value = "message", required = false) String message, @Multipart(value = "data", required = false) String data, @Multipart(value = "version", required = false) String version, @HeaderParam("keyManagerToken") String keyManagerToken); }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy