client-api/src/main/java/com/streamsets/datacollector/client/api/StoreApi.java
public PipelineFragmentEnvelopeJson createDraftPipelineFragment (
      String fragmentId,
      String description,
      List<StageConfigurationJson> stageInstances
  ) throws ApiException {
    Object postBody = stageInstances;
    byte[] postBinaryBody = null;

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

    // create path and map variables
    String path = "/v1/fragment/{fragmentId}".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("", "description", description));
    queryParams.addAll(apiClient.parameterToPairs("", "draft", true));

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

    final String[] contentTypes = {

    };
    final String contentType = apiClient.selectHeaderContentType(contentTypes);

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

    TypeRef returnType = new TypeRef<PipelineFragmentEnvelopeJson>() {};
    return apiClient.invokeAPI(path, "PUT", queryParams, postBody, postBinaryBody, headerParams, formParams,
        accept, contentType, authNames, returnType);
  }
public PipelineFragmentEnvelopeJson createDraftPipelineFragment (
      String fragmentId,
      String description,
      List<StageConfigurationJson> stageInstances
  ) throws ApiException {
    Object postBody = stageInstances;
    byte[] postBinaryBody = null;

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

    // create path and map variables
    String path = "/v1/fragment/{fragmentId}".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("", "description", description));
    queryParams.addAll(apiClient.parameterToPairs("", "draft", true));

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

    final String[] contentTypes = {

    };
    final String contentType = apiClient.selectHeaderContentType(contentTypes);

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

    TypeRef returnType = new TypeRef<PipelineFragmentEnvelopeJson>() {};
    return apiClient.invokeAPI(path, "PUT", queryParams, postBody, postBinaryBody, headerParams, formParams,
        accept, contentType, authNames, returnType);
  }
Add a new Pipeline Fragment Configuration to the store

@param fragmentId Frgament Id
@param description Description
@return PipelineFragmentEnvelopeJson