Interface RiskApi

  • All Superinterfaces:
    ApiService

    @Path("/api/v1/risks")
    @Produces("application/json")
    @Consumes("application/json")
    public interface RiskApi
    extends ApiService
    Operations on risk.
    • Method Detail

      • serviceName

        default java.lang.String serviceName()
        Specified by:
        serviceName in interface ApiService
      • getRisk

        @GET
        @Path("/{riskId:.*/Risk}")
        Risk getRisk​(@PathParam("riskId")
                     java.lang.String riskId)
        Returns the release risk score.
        Parameters:
        riskId - the full identifier of release risk score.
        Returns:
        risk.
      • getRisk

        Risk getRisk​(Release release)
        Returns the release risk score.
        Parameters:
        release - the release from which you want risk score.
        Returns:
        risk.
      • getRiskGlobalThresholds

        @GET
        @Path("/config")
        RiskGlobalThresholds getRiskGlobalThresholds()
        Returns the global risk thresholds configuration.
        Returns:
        global risk thresholds.
      • updateRiskGlobalThresholds

        @PUT
        @Path("/config")
        RiskGlobalThresholds updateRiskGlobalThresholds​(RiskGlobalThresholds thresholds)
        Update the global risk thresholds configuration.
        Parameters:
        thresholds - the updated global risk thresholds.
        Returns:
        global risk thresholds.
      • getRiskProfiles

        @GET
        @Path("/profiles")
        java.util.List<RiskProfile> getRiskProfiles()
        Returns list of all risk profile configurations.
        Returns:
        risk profiles list
      • getRiskProfile

        @GET
        @Path("/profiles/{riskProfileId:.*/RiskProfile[^/]*|new}")
        RiskProfile getRiskProfile​(@PathParam("riskProfileId")
                                   java.lang.String riskProfileId)
        Returns the risk profile for the given identifier.
        Parameters:
        riskProfileId - the full identifier of risk profile.
        Returns:
        risk profile.
      • getRiskProfileByTitle

        RiskProfile getRiskProfileByTitle​(java.lang.String title)
        Returns the risk profile with the given title.
        Parameters:
        title - title of the risk profile.
        Returns:
        risk profile.
      • updateRiskProfile

        @PUT
        @Path("/profiles/{riskProfileId:.*/RiskProfile[^/]*}")
        RiskProfile updateRiskProfile​(@PathParam("riskProfileId")
                                      java.lang.String riskProfileId,
                                      RiskProfile riskProfile)
        Update the risk profile.
        Parameters:
        riskProfileId - the full identifier of risk profile.
        riskProfile - the updated risk profile.
        Returns:
        the updated risk profile.
      • updateRiskProfile

        RiskProfile updateRiskProfile​(RiskProfile riskProfile)
        Update the risk profile.
        Parameters:
        riskProfile - the updated risk profile.
        Returns:
        the updated risk profile.
      • createRiskProfile

        @POST
        @Path("/profiles")
        RiskProfile createRiskProfile​(RiskProfile riskProfile)
        Create risk profile.
        Parameters:
        riskProfile - the new risk profile.
        Returns:
        risk profile.
      • deleteRiskProfile

        @DELETE
        @Path("/profiles/{riskProfileId:.*/RiskProfile[^/]*}")
        void deleteRiskProfile​(@PathParam("riskProfileId")
                               java.lang.String riskProfileId)
        Delete risk profile.
        Parameters:
        riskProfileId - the full identifier of risk profile.
      • deleteRiskProfile

        void deleteRiskProfile​(RiskProfile riskProfile)
        Delete risk profile.
        Parameters:
        riskProfile - the risk profile you would like to delete.
      • copyRiskProfile

        @POST
        @Path("/profiles/{riskProfileId:.*/RiskProfile[^/]*}/copy")
        RiskProfile copyRiskProfile​(@PathParam("riskProfileId")
                                    java.lang.String riskProfileId)
        Make copy of risk profile with given id.
        Parameters:
        riskProfileId - the full identifier of risk profile.
        Returns:
        risk profile.
      • copyRiskProfile

        RiskProfile copyRiskProfile​(RiskProfile riskProfile)
        Make copy of given risk profile.
        Parameters:
        riskProfile - the risk profile from which a copy will be created.
        Returns:
        risk profile.
      • getAllRiskAssessors

        @GET
        @Path("/assessors")
        java.util.List<RiskAssessor> getAllRiskAssessors()
        Returns the list of all risk assessor.
        Returns:
        list of all risk assessor.