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

com.symphony.api.agent.DlpPoliciesAndDictionaryManagementApi 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.V1DLPDictionaryMetadataCollectionResponse;
import com.symphony.api.model.V1DLPDictionaryMetadataCreateRequest;
import com.symphony.api.model.V1DLPDictionaryMetadataResponse;
import com.symphony.api.model.V1DLPDictionaryMetadataUpdateRequest;
import com.symphony.api.model.V1DLPPoliciesCollectionResponse;
import com.symphony.api.model.V1DLPPolicyRequest;
import com.symphony.api.model.V1DLPPolicyResponse;
import com.symphony.api.model.V3DLPPoliciesCollectionResponse;
import com.symphony.api.model.V3DLPPolicyRequest;
import com.symphony.api.model.V3DLPPolicyResponse;

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 DlpPoliciesAndDictionaryManagementApi { /** * Downloads Base 64 encoded dictionary content. * * Downloads Base 64 encoded dictionary content. * */ @GET @Path("/v1/dlp/dictionaries/{dictId}/data/download") @Produces({ "application/octet-stream" }) @Operation(summary = "Downloads Base 64 encoded dictionary content.", 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 = "500", description = "Server error, see response body for further details.", content = @Content(schema = @Schema(implementation = Error.class))) }) public byte[] v1DlpDictionariesDictIdDataDownloadGet(@HeaderParam("sessionToken") String sessionToken, @HeaderParam("keyManagerToken") String keyManagerToken, @PathParam("dictId") String dictId, @QueryParam("dictVersion")String dictVersion); /** * Override dictionary content with provided content. * * Override dictionary content with provided content. * */ @POST @Path("/v1/dlp/dictionaries/{dictId}/data/upload") @Consumes({ "multipart/form-data" }) @Produces({ "*/*" }) @Operation(summary = "Override dictionary content with provided content.", tags={ }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Success", content = @Content(schema = @Schema(implementation = V1DLPDictionaryMetadataResponse.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 V1DLPDictionaryMetadataResponse v1DlpDictionariesDictIdDataUploadPost( @Multipart(value = "data" ) Attachment dataDetail, @HeaderParam("sessionToken") String sessionToken, @HeaderParam("keyManagerToken") String keyManagerToken, @PathParam("dictId") String dictId); /** * Delete a dictionary * * Deletes a dictionary. Note: All related policies will be affected. * */ @DELETE @Path("/v1/dlp/dictionaries/{dictId}") @Produces({ "*/*" }) @Operation(summary = "Delete a dictionary", tags={ }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Success", content = @Content(schema = @Schema(implementation = V1DLPDictionaryMetadataResponse.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 V1DLPDictionaryMetadataResponse v1DlpDictionariesDictIdDelete(@HeaderParam("sessionToken") String sessionToken, @HeaderParam("keyManagerToken") String keyManagerToken, @PathParam("dictId") String dictId); /** * Get dictionary metadata * * Get basic information for a dictionary. * */ @GET @Path("/v1/dlp/dictionaries/{dictId}") @Produces({ "*/*" }) @Operation(summary = "Get dictionary metadata", tags={ }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Success", content = @Content(schema = @Schema(implementation = V1DLPDictionaryMetadataResponse.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 V1DLPDictionaryMetadataResponse v1DlpDictionariesDictIdGet(@HeaderParam("sessionToken") String sessionToken, @HeaderParam("keyManagerToken") String keyManagerToken, @PathParam("dictId") String dictId, @QueryParam("dictVersion")String dictVersion); /** * Updates a dictionary * * Updates the dictionary's basic metadata without content. This API cannot be used for creating a new dictionary. In case of update only \"name\" can be changed. Note: All related policies will also have versions updated. * */ @PUT @Path("/v1/dlp/dictionaries/{dictId}") @Consumes({ "application/json" }) @Produces({ "*/*" }) @Operation(summary = "Updates a dictionary", tags={ }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Success", content = @Content(schema = @Schema(implementation = V1DLPDictionaryMetadataResponse.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 V1DLPDictionaryMetadataResponse v1DlpDictionariesDictIdPut(V1DLPDictionaryMetadataUpdateRequest body, @HeaderParam("sessionToken") String sessionToken, @HeaderParam("keyManagerToken") String keyManagerToken, @PathParam("dictId") String dictId); /** * Get all dictionary metadatas * * Get all dictionary metadatas with the latest version. Each dictionary object will only contain meta data of the content. * */ @GET @Path("/v1/dlp/dictionaries") @Produces({ "*/*" }) @Operation(summary = "Get all dictionary metadatas", tags={ }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Success", content = @Content(schema = @Schema(implementation = V1DLPDictionaryMetadataCollectionResponse.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 V1DLPDictionaryMetadataCollectionResponse v1DlpDictionariesGet(@HeaderParam("sessionToken") String sessionToken, @HeaderParam("keyManagerToken") String keyManagerToken, @QueryParam("page")Integer page, @QueryParam("limit")Integer limit); /** * Create a dictionary * * Creates a dictionary with basic metadata and no content. Only \"name\" and \"type\" field is used to create a new dictionary entry. * */ @POST @Path("/v1/dlp/dictionaries") @Consumes({ "application/json" }) @Produces({ "*/*" }) @Operation(summary = "Create a dictionary", tags={ }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Success", content = @Content(schema = @Schema(implementation = V1DLPDictionaryMetadataResponse.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 V1DLPDictionaryMetadataResponse v1DlpDictionariesPost(V1DLPDictionaryMetadataCreateRequest body, @HeaderParam("sessionToken") String sessionToken, @HeaderParam("keyManagerToken") String keyManagerToken); /** * Get all policies * * Get all policies * */ @GET @Path("/v1/dlp/policies") @Produces({ "*/*" }) @Operation(summary = "Get all policies", tags={ }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Success", content = @Content(schema = @Schema(implementation = V1DLPPoliciesCollectionResponse.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 V1DLPPoliciesCollectionResponse v1DlpPoliciesGet(@HeaderParam("sessionToken") String sessionToken, @HeaderParam("keyManagerToken") String keyManagerToken, @QueryParam("page")Integer page, @QueryParam("limit")Integer limit); /** * Delete a policy * * Delete a policy. Note: Only disabled policy can be deleted * */ @DELETE @Path("/v1/dlp/policies/{policyId}") @Produces({ "*/*" }) @Operation(summary = "Delete a policy", tags={ }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Success", content = @Content(schema = @Schema(implementation = V1DLPPolicyResponse.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 V1DLPPolicyResponse v1DlpPoliciesPolicyIdDelete(@HeaderParam("sessionToken") String sessionToken, @HeaderParam("keyManagerToken") String keyManagerToken, @PathParam("policyId") String policyId); /** * Disables a policy. * * Disables a policy. * */ @POST @Path("/v1/dlp/policies/{policyId}/disable") @Produces({ "*/*" }) @Operation(summary = "Disables a policy.", tags={ }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Success", content = @Content(schema = @Schema(implementation = V1DLPPolicyResponse.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 V1DLPPolicyResponse v1DlpPoliciesPolicyIdDisablePost(@HeaderParam("sessionToken") String sessionToken, @HeaderParam("keyManagerToken") String keyManagerToken, @PathParam("policyId") String policyId); /** * Enables a policy. * * Enables a policy. * */ @POST @Path("/v1/dlp/policies/{policyId}/enable") @Produces({ "*/*" }) @Operation(summary = "Enables a policy.", tags={ }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Success", content = @Content(schema = @Schema(implementation = V1DLPPolicyResponse.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 V1DLPPolicyResponse v1DlpPoliciesPolicyIdEnablePost(@HeaderParam("sessionToken") String sessionToken, @HeaderParam("keyManagerToken") String keyManagerToken, @PathParam("policyId") String policyId); /** * Get a policy * * Get a policy * */ @GET @Path("/v1/dlp/policies/{policyId}") @Produces({ "*/*" }) @Operation(summary = "Get a policy", tags={ }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Success", content = @Content(schema = @Schema(implementation = V1DLPPolicyResponse.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 V1DLPPolicyResponse v1DlpPoliciesPolicyIdGet(@HeaderParam("sessionToken") String sessionToken, @HeaderParam("keyManagerToken") String keyManagerToken, @PathParam("policyId") String policyId, @QueryParam("policyVersion")String policyVersion); /** * Updates a policy. Cannot be used for creation. * * Update the policy (name, type, contentTypes, scopes) and also the dictionaries for a policy. Warning: If you send empty list of dictionaries during the update operation, then all the dictionaries for this policy are deleted and policy is automatically disabled. Note: The policy should already exist. * */ @PUT @Path("/v1/dlp/policies/{policyId}") @Consumes({ "application/json" }) @Produces({ "*/*" }) @Operation(summary = "Updates a policy. Cannot be used for creation.", tags={ }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Success", content = @Content(schema = @Schema(implementation = V1DLPPolicyResponse.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 V1DLPPolicyResponse v1DlpPoliciesPolicyIdPut(V1DLPPolicyRequest body, @HeaderParam("sessionToken") String sessionToken, @HeaderParam("keyManagerToken") String keyManagerToken, @PathParam("policyId") String policyId); /** * Creates a policy * * Creates a new policy with dictionary references. At the time of policy creation, the caller should only provide - contentTypes, name, scopes and type. The rest of the information is populated automatically. Note - You need to enable the policy after creation to start enforcing the policy. * */ @POST @Path("/v1/dlp/policies") @Consumes({ "application/json" }) @Produces({ "application/json" }) @Operation(summary = "Creates a policy", tags={ }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Success", content = @Content(schema = @Schema(implementation = V1DLPPolicyResponse.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 V1DLPPolicyResponse v1DlpPoliciesPost(V1DLPPolicyRequest body, @HeaderParam("sessionToken") String sessionToken, @HeaderParam("keyManagerToken") String keyManagerToken); /** * Get all policies * * Get all policies * */ @GET @Path("/v3/dlp/policies") @Produces({ "*/*" }) @Operation(summary = "Get all policies", tags={ }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Success", content = @Content(schema = @Schema(implementation = V3DLPPoliciesCollectionResponse.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 V3DLPPoliciesCollectionResponse v3DlpPoliciesGet(@HeaderParam("sessionToken") String sessionToken, @HeaderParam("keyManagerToken") String keyManagerToken, @QueryParam("page")Integer page, @QueryParam("limit")Integer limit); /** * Delete a policy * * Delete a policy. Note: Only disabled policy can be deleted * */ @POST @Path("/v3/dlp/policies/{policyId}/delete") @Produces({ "*/*" }) @Operation(summary = "Delete a policy", tags={ }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Success", content = @Content(schema = @Schema(implementation = V3DLPPolicyResponse.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 V3DLPPolicyResponse v3DlpPoliciesPolicyIdDeletePost(@HeaderParam("sessionToken") String sessionToken, @HeaderParam("keyManagerToken") String keyManagerToken, @PathParam("policyId") String policyId); /** * Disables a policy. * * Disables a policy. * */ @POST @Path("/v3/dlp/policies/{policyId}/disable") @Produces({ "*/*" }) @Operation(summary = "Disables a policy.", tags={ }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Success", content = @Content(schema = @Schema(implementation = V3DLPPolicyResponse.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 V3DLPPolicyResponse v3DlpPoliciesPolicyIdDisablePost(@HeaderParam("sessionToken") String sessionToken, @HeaderParam("keyManagerToken") String keyManagerToken, @PathParam("policyId") String policyId); /** * Enables a policy. * * Enables a policy. * */ @POST @Path("/v3/dlp/policies/{policyId}/enable") @Produces({ "*/*" }) @Operation(summary = "Enables a policy.", tags={ }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Success", content = @Content(schema = @Schema(implementation = V3DLPPolicyResponse.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 V3DLPPolicyResponse v3DlpPoliciesPolicyIdEnablePost(@HeaderParam("sessionToken") String sessionToken, @HeaderParam("keyManagerToken") String keyManagerToken, @PathParam("policyId") String policyId); /** * Get a policy * * Get a policy * */ @GET @Path("/v3/dlp/policies/{policyId}") @Produces({ "*/*" }) @Operation(summary = "Get a policy", tags={ }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Success", content = @Content(schema = @Schema(implementation = V3DLPPolicyResponse.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 V3DLPPolicyResponse v3DlpPoliciesPolicyIdGet(@HeaderParam("sessionToken") String sessionToken, @HeaderParam("keyManagerToken") String keyManagerToken, @PathParam("policyId") String policyId, @QueryParam("policyVersion")String policyVersion); /** * Updates a policy. Cannot be used for creation. * * Update the policy (name, type, contentTypes, scopes) and also the dictionaries for a policy. Warning: If you send empty list of dictionaries during the update operation, then all the dictionaries for this policy are deleted and policy is automatically disabled. Note: The policy should already exist. * */ @POST @Path("/v3/dlp/policies/{policyId}/update") @Consumes({ "application/json" }) @Produces({ "*/*" }) @Operation(summary = "Updates a policy. Cannot be used for creation.", tags={ }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Success", content = @Content(schema = @Schema(implementation = V3DLPPolicyResponse.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 V3DLPPolicyResponse v3DlpPoliciesPolicyIdUpdatePost(V3DLPPolicyRequest body, @HeaderParam("sessionToken") String sessionToken, @HeaderParam("keyManagerToken") String keyManagerToken, @PathParam("policyId") String policyId); /** * Creates a policy * * Creates a new policy with dictionary references. At the time of policy creation, the caller should only provide - contentTypes, name, scopes and type. The rest of the information is populated automatically. Note - You need to enable the policy after creation to start enforcing the policy. * */ @POST @Path("/v3/dlp/policies") @Consumes({ "application/json" }) @Produces({ "application/json" }) @Operation(summary = "Creates a policy", tags={ }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Success", content = @Content(schema = @Schema(implementation = V3DLPPolicyResponse.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 V3DLPPolicyResponse v3DlpPoliciesPost(V3DLPPolicyRequest body, @HeaderParam("sessionToken") String sessionToken, @HeaderParam("keyManagerToken") String keyManagerToken); }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy