Skip to content

In 24.1+, you can use the job_instance__sys query target to query job instances.

In v23.2+, you can use the job_history__sys and job_task_history__sys query targets to query job history records and SDK job task history records in your Vault.

The job_instance__sys query target contains job information. Each record represents a single scheduled, queued, or running job instance.

This metadata is only available via VQL query and cannot be retrieved using the standard metadata API.

The following fields are queryable for the job_instance__sys object:

NameDescription
idThe ID of the job.
job_name__sysThe name of the job.
job_metadata__sysThe name of the Job Metadata instance for SDK jobs.
job_type__sysThe job type.
job_title__sysThe title of the job.
status__sysThe status of the job.
created_by__sysThe ID of the user who created the job instance.
queue_date__sysThe DateTime when the job started in the queue.
run_date__sysThe DateTime when the job ran.

Get metadata for SDK job instances:

SELECT id, job_status__sys FROM job_instance__sys WHERE job_type__sys = 'sdk_job'

The job_history__sys query target contains job history information. Each record represents a single completed job instance.

The job_history__sys query target exposes the job_task_history__sysr relationship. This is an inbound reference to an SDK job history record’s task instances.

This metadata is only available via VQL query and cannot be retrieved using the standard metadata API.

The following fields are queryable for the job_history__sys object:

NameDescription
idThe ID of the job.
job_name__sysThe name of the job.
job_metadata__sysThe name of the Job Metadata instance for SDK jobs.
job_type__sysThe job type.
job_title__sysThe title of the job.
status__sysThe status of the job.
schedule_date__sysThe scheduled DateTime of the job.
queue_date__sysThe DateTime when the job started in the queue.
start_date__sysThe DateTime when the job started.
finish_date__sysThe DateTime when the job finished.

Get metadata for SDK job histories:

SELECT id, job_name__sys, job_type__sys, status__sys, schedule_date__sys, queue_date__sys FROM job_history__sys WHERE job_type__sys = 'sdk_job'

Get metadata for job histories including task history:

SELECT id, job_name__sys, (SELECT task_id__sys FROM job_task_history__sysr) FROM job_history__sys

The job_task_history__sys query target contains SDK job task history information. Each record represents a task in a completed SDK job history instance.

The job_task_history__sys query target exposes the job_history__sysr relationship. This is an outbound reference to the corresponding job history record.

This metadata is only available via VQL query and cannot be retrieved using the standard metadata API.

The following fields are queryable for the job_task_history__sys object:

NameDescription
task_id__sysThe ID of the job task.
job_history__sysThe ID of the parent job.
status__sysThe result status of the job task.
queue_date__sysThe DateTime when the job task started in the queue.
start_date__sysThe DateTime when the job task started.
finish_date__sysThe DateTime when the job task ended.

Get metadata for job task histories:

SELECT task_id__sys, job_history__sys, status__sys, queue_date__sys, start_date__sys,finish_date__sys FROM job_task_history__sys

Get metadata for job task histories, including the name of the corresponding job:

SELECT task_id__sys, job_history__sysr.job_name__sys, status__sys, queue_date__sys, start_date__sys, finish_date__sys FROM job_task_history__sys