com.symphony.api.pod.SecurityApi Maven / Gradle / Ivy
package com.symphony.api.pod;
import com.symphony.api.model.CompanyCert;
import com.symphony.api.model.CompanyCertAttributes;
import com.symphony.api.model.CompanyCertDetail;
import com.symphony.api.model.CompanyCertInfoList;
import com.symphony.api.model.CompanyCertType;
import com.symphony.api.model.Error;
import com.symphony.api.model.StringId;
import com.symphony.api.model.SuccessResponse;
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;
/**
* Pod API
*
* This document refers to Symphony API calls that do not need encryption or decryption of content. - sessionToken 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 made no change to the system even if ome subset of the request would have succeeded. - If this contract cannot be met for any reason then this is an error and the response code will be 50X.
*
*/
@Path("/")
public interface SecurityApi {
/**
* Create a company trusted or untrusted certificate
*
*/
@POST
@Path("/v1/companycert/create")
@Consumes({ "application/json" })
@Produces({ "application/json" })
@Operation(summary = "Create a company trusted or untrusted certificate", tags={ })
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "Success", content = @Content(schema = @Schema(implementation = SuccessResponse.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 SuccessResponse v1CompanycertCreatePost(CompanyCert body, @HeaderParam("sessionToken") String sessionToken);
/**
* Delete a company certificate
*
*/
@POST
@Path("/v1/companycert/delete")
@Consumes({ "application/json" })
@Produces({ "application/json" })
@Operation(summary = "Delete a company certificate", tags={ })
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "Success", content = @Content(schema = @Schema(implementation = SuccessResponse.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 SuccessResponse v1CompanycertDeletePost(StringId body, @HeaderParam("sessionToken") String sessionToken);
/**
* Get the details of a company certificate
*
*/
@GET
@Path("/v1/companycert/{fingerPrint}/get")
@Produces({ "application/json" })
@Operation(summary = "Get the details of a company certificate", tags={ })
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "Success", content = @Content(schema = @Schema(implementation = CompanyCertDetail.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 CompanyCertDetail v1CompanycertFingerPrintGetGet(@PathParam("fingerPrint") String fingerPrint, @HeaderParam("sessionToken") String sessionToken);
/**
* Return a list of all certificates which were verified to the cert whose fingerprint is passed.
*
*/
@GET
@Path("/v1/companycert/{fingerPrint}/issuedBy")
@Produces({ "application/json" })
@Operation(summary = "Return a list of all certificates which were verified to the cert whose fingerprint is passed. ", tags={ })
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "Success", content = @Content(schema = @Schema(implementation = CompanyCertInfoList.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 CompanyCertInfoList v1CompanycertFingerPrintIssuedByGet(@PathParam("fingerPrint") String fingerPrint, @HeaderParam("sessionToken") String sessionToken);
/**
* Update a company certificate
*
*/
@POST
@Path("/v1/companycert/{fingerPrint}/update")
@Consumes({ "application/json" })
@Produces({ "application/json" })
@Operation(summary = "Update a company certificate", tags={ })
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "Success", content = @Content(schema = @Schema(implementation = SuccessResponse.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 SuccessResponse v1CompanycertFingerPrintUpdatePost(CompanyCertAttributes body, @HeaderParam("sessionToken") String sessionToken, @PathParam("fingerPrint") String fingerPrint);
/**
* List all trusted certs
*
*/
@GET
@Path("/v1/companycert/list")
@Produces({ "application/json" })
@Operation(summary = "List all trusted certs", tags={ })
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "Success", content = @Content(schema = @Schema(implementation = CompanyCertInfoList.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 CompanyCertInfoList v1CompanycertListGet(@HeaderParam("sessionToken") String sessionToken, @QueryParam("skip")Integer skip, @QueryParam("limit")Integer limit);
/**
* List all trusted certs
*
*/
@GET
@Path("/v1/companycert/podmanaged/list")
@Produces({ "application/json" })
@Operation(summary = "List all trusted certs", tags={ })
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "Success", content = @Content(schema = @Schema(implementation = CompanyCertInfoList.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 CompanyCertInfoList v1CompanycertPodmanagedListGet(@HeaderParam("sessionToken") String sessionToken, @QueryParam("skip")Integer skip, @QueryParam("limit")Integer limit);
/**
* List all certs of the given types
*
*/
@POST
@Path("/v1/companycert/type/list")
@Consumes({ "application/json" })
@Produces({ "application/json" })
@Operation(summary = "List all certs of the given types", tags={ })
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "Success", content = @Content(schema = @Schema(implementation = CompanyCertInfoList.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 CompanyCertInfoList v1CompanycertTypeListPost(List body, @HeaderParam("sessionToken") String sessionToken, @QueryParam("skip")Integer skip, @QueryParam("limit")Integer limit);
/**
* Create a company trusted or untrusted certificate. Different from V1 in that we reject expired certificates.
*
*/
@POST
@Path("/v2/companycert/create")
@Consumes({ "application/json" })
@Produces({ "application/json" })
@Operation(summary = "Create a company trusted or untrusted certificate. Different from V1 in that we reject expired certificates.", tags={ })
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "Success", content = @Content(schema = @Schema(implementation = CompanyCertDetail.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 CompanyCertDetail v2CompanycertCreatePost(CompanyCert body, @HeaderParam("sessionToken") String sessionToken);
}