GuidesRecipesAPI ReferenceChangelogDiscussions
Log In


Submit a job using files as inputs

modzyClient.submitJobFile(String modelId, String versionId, List<InputStream> streamSource)

Submits a job based on an InputStream source. It includes files or any other readable stream.


modelIdjava.lang.StringModel identifier provided by Modzy."ed542963de"
versionIdjava.lang.StringThe model’s version number. It follows the semantic versioning format."1.0.1"
streamSourcejava.util.List<>A list of inputs to processList<InputStream> inputs = new ArrayList<>(); inputs.add( new FileInputStream("/tmp/some/path"));


com.modzy.sdk.model.Job object with the job status obtained from the server


List<InputStream> inputs = new ArrayList<>();
inputs.add( new FileInputStream("/tmp/some-file") );
Job job = modzyClient.submitJobFile("ed542963de", "1.0.1", inputs);

More specific customization options are provided by the method [modzyClient.getJobClient.submitJob]{doc:javamodzyclientsubmitjob}

JobInput<InputStream> jobInput = new JobInputStream();
Map<String,InputStream> mapSource = new HashMap<>();
mapSource.put("input.txt", new FileInputStream( "/usr/inputs/some_file.txt" ));
jobInput.addSource("my-input", mapSource);
Job job = modzyClient.submitJob("ed542963de", "1.0.1", jobInput, false);