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

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

package com.symphony.api.agent;

import com.symphony.api.model.Error;
import com.symphony.api.model.V1DLPViolationMessageResponse;
import com.symphony.api.model.V1DLPViolationSignalResponse;
import com.symphony.api.model.V1DLPViolationStreamResponse;
import com.symphony.api.model.V3DLPViolationMessageResponse;
import com.symphony.api.model.V3DLPViolationSignalResponse;
import com.symphony.api.model.V3DLPViolationStreamResponse;

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 ViolationsApi { /** * Get violations as a result of policy enforcement on messages. * * TBD * */ @GET @Path("/v1/dlp/violations/message") @Produces({ "application/json" }) @Operation(summary = "Get violations as a result of policy enforcement on messages.", tags={ }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = V1DLPViolationMessageResponse.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 V1DLPViolationMessageResponse v1DlpViolationsMessageGet(@QueryParam("startTime")Long startTime, @HeaderParam("sessionToken") String sessionToken, @HeaderParam("keyManagerToken") String keyManagerToken, @QueryParam("endTime")Long endTime, @QueryParam("next")String next, @QueryParam("limit")Integer limit); /** * Get violations as a result of policy enforcement on signals. * * TBD * */ @GET @Path("/v1/dlp/violations/signal") @Produces({ "application/json" }) @Operation(summary = "Get violations as a result of policy enforcement on signals.", tags={ }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = V1DLPViolationSignalResponse.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 V1DLPViolationSignalResponse v1DlpViolationsSignalGet(@QueryParam("startTime")Long startTime, @HeaderParam("sessionToken") String sessionToken, @HeaderParam("keyManagerToken") String keyManagerToken, @QueryParam("endTime")Long endTime, @QueryParam("next")String next, @QueryParam("limit")Integer limit); /** * Get violations as a result of policy enforcement on streams. * * TBD * */ @GET @Path("/v1/dlp/violations/stream") @Produces({ "application/json" }) @Operation(summary = "Get violations as a result of policy enforcement on streams.", tags={ }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = V1DLPViolationStreamResponse.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 V1DLPViolationStreamResponse v1DlpViolationsStreamGet(@QueryParam("startTime")Long startTime, @HeaderParam("sessionToken") String sessionToken, @HeaderParam("keyManagerToken") String keyManagerToken, @QueryParam("endTime")Long endTime, @QueryParam("next")String next, @QueryParam("limit")Integer limit); /** * Get attachments that were sent as part of messages that were flagged by the DLP System. * * Retrieves attachments from related message violations as a base64 encoded String. * */ @GET @Path("/v3/dlp/violation/attachment") @Produces({ "application/octet-stream" }) @Operation(summary = "Get attachments that were sent as part of messages that were flagged by the DLP System.", tags={ }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Attachment body as Base64 encoded string.", content = @Content(schema = @Schema(implementation = byte[].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 = "404", description = "Resource not found.", 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 byte[] v3DlpViolationAttachmentGet(@QueryParam("fileId")String fileId, @QueryParam("violationId")String violationId, @HeaderParam("sessionToken") String sessionToken, @HeaderParam("keyManagerToken") String keyManagerToken); /** * Get violations as a result of policy enforcement on messages. * * Retrieves DLP v3 message related violations for a given time range * */ @GET @Path("/v3/dlp/violations/message") @Produces({ "application/json" }) @Operation(summary = "Get violations as a result of policy enforcement on messages.", tags={ }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = V3DLPViolationMessageResponse.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 V3DLPViolationMessageResponse v3DlpViolationsMessageGet(@QueryParam("startTime")Long startTime, @HeaderParam("sessionToken") String sessionToken, @HeaderParam("keyManagerToken") String keyManagerToken, @QueryParam("endTime")Long endTime, @QueryParam("next")String next, @QueryParam("limit")Integer limit); /** * Get violations as a result of policy enforcement on signals. * * Retrieves DLP v3 signal related violations for a given time range * */ @GET @Path("/v3/dlp/violations/signal") @Produces({ "application/json" }) @Operation(summary = "Get violations as a result of policy enforcement on signals.", tags={ }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = V3DLPViolationSignalResponse.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 V3DLPViolationSignalResponse v3DlpViolationsSignalGet(@QueryParam("startTime")Long startTime, @HeaderParam("sessionToken") String sessionToken, @HeaderParam("keyManagerToken") String keyManagerToken, @QueryParam("endTime")Long endTime, @QueryParam("next")String next, @QueryParam("limit")Integer limit); /** * Get violations as a result of policy enforcement on streams. * * Retrieves DLP v3 signal related violations for a given time range * */ @GET @Path("/v3/dlp/violations/stream") @Produces({ "application/json" }) @Operation(summary = "Get violations as a result of policy enforcement on streams.", tags={ }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = V3DLPViolationStreamResponse.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 V3DLPViolationStreamResponse v3DlpViolationsStreamGet(@QueryParam("startTime")Long startTime, @HeaderParam("sessionToken") String sessionToken, @HeaderParam("keyManagerToken") String keyManagerToken, @QueryParam("endTime")Long endTime, @QueryParam("next")String next, @QueryParam("limit")Integer limit); }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy