client-api/src/main/java/com/streamsets/datacollector/client/api/StoreApi.java
public PipelineFragmentEnvelopeJson importPipelineFragment (
      String fragmentId,
      boolean draft,
      boolean includeLibraryDefinitions,
      PipelineFragmentEnvelopeJson fragmentEnvelope
  ) throws ApiException {
    Object postBody = fragmentEnvelope;
    byte[] postBinaryBody = null;

    // verify the required parameter 'fragmentId' is set
    if (fragmentId == null) {
      throw new ApiException(400, "Missing the required parameter 'fragmentId' when calling importPipelineFragment");
    }

    // verify the required parameter 'fragmentEnvelope' is set
    if (fragmentEnvelope == null) {
      throw new ApiException(
          400,
          "Missing the required parameter 'pipelineEnvelope' when calling importPipelineFragment"
      );
    }

    // create path and map variables
    String path = "/v1/fragment/{fragmentId}/import".replaceAll("\\{format\\}","json")
        .replaceAll("\\{" + "fragmentId" + "\\}", apiClient.escapeString(fragmentId.toString()));

    // query params
    List<Pair> queryParams = new ArrayList<Pair>();
    Map<String, String> headerParams = new HashMap<String, String>();
    Map<String, Object> formParams = new HashMap<String, Object>();

    queryParams.addAll(apiClient.parameterToPairs("", "draft", draft));
    queryParams.addAll(apiClient.parameterToPairs("", "includeLibraryDefinitions", includeLibraryDefinitions));

    final String[] accepts = {
        "application/json"
    };
    final String accept = apiClient.selectHeaderAccept(accepts);

    final String[] contentTypes = {
        "application/json"
    };
    final String contentType = apiClient.selectHeaderContentType(contentTypes);

    String[] authNames = new String[] { "basic" };


    TypeRef returnType = new TypeRef<PipelineFragmentEnvelopeJson>() {};
    return apiClient.invokeAPI(path, "POST", queryParams, postBody, postBinaryBody, headerParams, formParams,
        accept, contentType, authNames, returnType);
  }
public PipelineFragmentEnvelopeJson importPipelineFragment (
      String fragmentId,
      boolean draft,
      boolean includeLibraryDefinitions,
      PipelineFragmentEnvelopeJson fragmentEnvelope
  ) throws ApiException {
    Object postBody = fragmentEnvelope;
    byte[] postBinaryBody = null;

    // verify the required parameter 'fragmentId' is set
    if (fragmentId == null) {
      throw new ApiException(400, "Missing the required parameter 'fragmentId' when calling importPipelineFragment");
    }

    // verify the required parameter 'fragmentEnvelope' is set
    if (fragmentEnvelope == null) {
      throw new ApiException(
          400,
          "Missing the required parameter 'pipelineEnvelope' when calling importPipelineFragment"
      );
    }

    // create path and map variables
    String path = "/v1/fragment/{fragmentId}/import".replaceAll("\\{format\\}","json")
        .replaceAll("\\{" + "fragmentId" + "\\}", apiClient.escapeString(fragmentId.toString()));

    // query params
    List<Pair> queryParams = new ArrayList<Pair>();
    Map<String, String> headerParams = new HashMap<String, String>();
    Map<String, Object> formParams = new HashMap<String, Object>();

    queryParams.addAll(apiClient.parameterToPairs("", "draft", draft));
    queryParams.addAll(apiClient.parameterToPairs("", "includeLibraryDefinitions", includeLibraryDefinitions));

    final String[] accepts = {
        "application/json"
    };
    final String accept = apiClient.selectHeaderAccept(accepts);

    final String[] contentTypes = {
        "application/json"
    };
    final String contentType = apiClient.selectHeaderContentType(contentTypes);

    String[] authNames = new String[] { "basic" };


    TypeRef returnType = new TypeRef<PipelineFragmentEnvelopeJson>() {};
    return apiClient.invokeAPI(path, "POST", queryParams, postBody, postBinaryBody, headerParams, formParams,
        accept, contentType, authNames, returnType);
  }
Import Pipeline Fragment Configuration & Rules

@param fragmentId Fragment  Id
@return fragmentEnvelope