Class SplitAPI


  • public class SplitAPI
    extends Object
    Class wrapper for Split Admin API
    Author:
    Bilal Al-Shshany
    • Method Detail

      • execHTTPRequest

        public io.split.jenkins.plugins.HTTPResponse execHTTPRequest​(String httpRequest,
                                                                     String URL,
                                                                     String body)
      • executeHTTP

        public io.split.jenkins.plugins.HTTPResponse executeHTTP​(String httpVerb,
                                                                 String URL,
                                                                 String body)
                                                          throws org.apache.http.client.ClientProtocolException,
                                                                 IOException
        Throws:
        org.apache.http.client.ClientProtocolException
        IOException
      • getWorkspaceId

        public String getWorkspaceId​(String workspaceName)
      • createFeatureFlag

        public int createFeatureFlag​(String workspaceId,
                                     String trafficTypeName,
                                     String featureFlagName,
                                     String description)
      • addFeatureFlagToEnvironment

        public int addFeatureFlagToEnvironment​(String workspaceId,
                                               String environmentName,
                                               String featureFlagName,
                                               String definition)
      • killFeatureFlag

        public int killFeatureFlag​(String workspaceId,
                                   String environmentName,
                                   String featureFlagName)
      • deleteFeatureFlag

        public int deleteFeatureFlag​(String workspaceId,
                                     String featureFlagName)
      • addTargetListToFeatureFlag

        public int addTargetListToFeatureFlag​(String workspaceId,
                                              String environmentName,
                                              String featureFlagName,
                                              String treatmentName,
                                              String targetlistKey)
      • getFeatureFlagDefinition

        public String getFeatureFlagDefinition​(String workspaceId,
                                               String featureFlagName,
                                               String environmentName)
      • createFeatureFlagFromYAML

        public int createFeatureFlagFromYAML​(String workspaceId,
                                             String environmentName,
                                             String trafficTypeName,
                                             String YAMLFile)
      • deleteFeatureFlagDefinition

        public int deleteFeatureFlagDefinition​(String workspaceId,
                                               String environmentName,
                                               String featureFlagName)
      • checkIfEnvironmentExist

        public boolean checkIfEnvironmentExist​(String workspaceId,
                                               String environmentName)