@RequestMapping(value = "/{instanceId}", method = RequestMethod.GET, produces = "application/json")
	@ResponseStatus(HttpStatus.OK)
	public JobInstanceInfoResource getJobInstance(@PathVariable long instanceId) {
		try {
			JobInstance jobInstance = jobService.getJobInstance(instanceId);
			String jobName = jobInstance.getJobName();

			try {
				List<JobExecution> jobExecutions = (List<JobExecution>) jobService.getJobExecutionsForJobInstance(
						jobInstance.getJobName(), jobInstance.getId());
				List<JobExecutionInfo> jobExecutionInfos = new ArrayList<JobExecutionInfo>();
				for (JobExecution jobExecution : jobExecutions) {
					jobExecutionInfos.add(new JobExecutionInfo(jobExecution, timeZone));
				}
				return jobInstanceInfoResourceAssembler.toResource(new JobInstanceInfo(jobInstance, jobExecutionInfos));
			}
			catch (NoSuchJobException e) {
				throw new NoSuchBatchJobException(jobName);
			}
		}
		catch (NoSuchJobInstanceException e) {
			throw new NoSuchBatchJobInstanceException(instanceId);
		}
	}
Return job instance info by the given instance id.

@param instanceId job instance id
@return job instance info
spring-xd-dirt/src/main/java/org/springframework/xd/dirt/rest/BatchJobInstancesController.java