---
title: "Get information about the latest job to clear the persistent queue for a Source"
method: GET
path: "/system/inputs/{id}/pq"
tags: ["sources"]
---

# Get information about the latest job to clear the persistent queue for a Source

`GET /system/inputs/{id}/pq`

Get information about the latest job to clear the persistent queue (PQ) for the specified Source.

## Path parameters

- `id` string, required

## Response `200`

The latest clear-PQ job information for the specified Source.

- CountedJobInfo
  - `count` integer, required — number of items present in the items array
  - `items` JobInfo[], required — List of items in this response.
    - `args` union, required
      - RunnableJobCollection
        - `id` string — Unique ID for this Job
        - `description` string — Description
        - `type` 'collection' | 'executor' | 'scheduledSearch' — Job type
        - `ttl` string — Time to keep the job's artifacts on disk after job completion. This also affects how long a job is listed in the Job Inspector.
        - `ignoreGroupJobsLimit` boolean — When enabled, this job's artifacts are not counted toward the Worker Group's finished job artifacts limit. Artifacts will be removed only after the Collector's configured time to live.
        - `removeFields` string[] — List of fields to remove from Discover results. Wildcards (for example, aws*) are allowed. This is useful when discovery returns sensitive fields that should not be exposed in the Jobs user interface.
        - `resumeOnBoot` boolean — Resume the ad hoc job if a failure condition causes Stream to restart during job execution
        - `environment` string — Optionally, enable this config only on a specified Git branch. If empty, will be enabled everywhere.
        - `schedule` ScheduleTypeRunnableJobCollection — Configuration for a scheduled job
          - `enabled` boolean — Enable to configure scheduling for this Collector
          - `skippable` boolean — Skippable jobs can be delayed, up to their next run time, if the system is hitting concurrency limits
          - `resumeMissed` boolean — If Stream Leader (or single instance) restarts, run all missed jobs according to their original schedules
          - `cronSchedule` string — A cron schedule on which to run this job
          - `maxConcurrentRuns` number — The maximum number of instances of this scheduled job that may be running at any time
          - `run` RunSettingsTypeRunnableJobCollectionSchedule — Run settings
            - `type` 'collection' — Resource type identifier.
            - `rescheduleDroppedTasks` boolean — Reschedule tasks that failed with non-fatal errors
            - `maxTaskReschedule` number — Maximum number of times a task can be rescheduled
            - `logLevel` 'error' | 'warn' | 'info' | 'debug' | 'silly' — Level at which to set task logging
            - `jobTimeout` string — Maximum time the job is allowed to run. Time unit defaults to seconds if not specified (examples: 30, 45s, 15m). Enter 0 for unlimited time.
            - `mode` string, required — Job run mode. Preview will either return up to N matching results, or will run until capture time T is reached. Discovery will gather the list of files to turn into streaming tasks, without running the data collection job. Full Run will run the collection job.
            - `timeRangeType` string — Time range
            - `earliest` union — Earliest time to collect data for the selected timezone
              - …
            - `latest` union — Latest time to collect data for the selected timezone
              - …
            - `timestampTimezone` unknown
            - `timeWarning` BrokenEventProcessor
            - `expression` string — A filter for tokens in the provided collect path and/or the events being collected
            - `minTaskSize` string — Limits the bundle size for small tasks. For example, if your lower bundle size is 1MB, you can bundle up to five 200KB files into one task.
            - `maxTaskSize` string — Limits the bundle size for files above the lower task bundle size. For example, if your upper bundle size is 10MB, you can bundle up to five 2MB files into one task. Files greater than this size will be assigned to individual tasks.
        - `streamtags` string[] — Metadata tags used for categorization and filtering.
        - `workerAffinity` boolean — If enabled, tasks are created and run by the same Worker Node
        - `collector` union, required — Collector configuration
          - CollectorAzureBlob — AzureBlob collector configuration
            - `type` 'azure_blob', required — Collector type
            - `conf` union, required — Collector configuration
              - …
            - `destructive` boolean — Delete any files collected (where applicable)
            - `encoding` string — Character encoding to use when parsing ingested data.
          - CollectorCriblLake — CriblLake collector configuration
            - `type` 'cribl_lake', required — Collector type
            - `conf` object, required — Collector configuration
              - …
            - `destructive` boolean — Delete any files collected (where applicable)
            - `encoding` string — Character encoding to use when parsing ingested data.
          - CollectorDatabase — Database collector configuration
            - `type` 'database', required — Collector type
            - `conf` object, required — Collector configuration
              - …
            - `destructive` boolean — Delete any files collected (where applicable)
            - `encoding` string — Character encoding to use when parsing ingested data.
          - CollectorFilesystem — Filesystem collector configuration
            - `type` 'filesystem', required — Collector type
            - `conf` object, required — Collector configuration
              - …
            - `destructive` boolean — Delete any files collected (where applicable)
            - `encoding` string — Character encoding to use when parsing ingested data.
          - CollectorGoogleCloudStorage — GoogleCloudStorage collector configuration
            - `type` 'google_cloud_storage', required — Collector type
            - `conf` union, required — Collector configuration
              - …
            - `destructive` boolean — Delete any files collected (where applicable)
            - `encoding` string — Character encoding to use when parsing ingested data.
          - CollectorHealthCheck — HealthCheck collector configuration
            - `type` 'health_check', required — Collector type
            - `conf` union, required
              - …
            - `destructive` boolean — Delete any files collected (where applicable)
            - `encoding` string — Character encoding to use when parsing ingested data.
          - CollectorRest — Rest collector configuration
            - `type` 'rest', required — Collector type
            - `conf` union, required
              - …
            - `destructive` boolean — Delete any files collected (where applicable)
            - `encoding` string — Character encoding to use when parsing ingested data.
          - CollectorS3 — S3 collector configuration
            - `type` 's3', required — Collector type
            - `conf` union, required
              - …
            - `destructive` boolean — Delete any files collected (where applicable)
            - `encoding` string — Character encoding to use when parsing ingested data.
          - CollectorScript — Script collector configuration
            - `type` 'script', required — Collector type
            - `conf` object, required — Collector configuration
              - …
            - `destructive` boolean — Delete any files collected (where applicable)
            - `encoding` string — Character encoding to use when parsing ingested data.
          - CollectorSplunk — Splunk collector configuration
            - `type` 'splunk', required — Collector type
            - `conf` union, required — Collector configuration
              - …
            - `destructive` boolean — Delete any files collected (where applicable)
            - `encoding` string — Character encoding to use when parsing ingested data.
        - `input` InputTypeRunnableJobCollection
          - `type` 'collection' — Resource type identifier.
          - `breakerRulesets` string[] — A list of event-breaking rulesets that will be applied, in order, to the input data stream
          - `staleChannelFlushMs` number — How long (in milliseconds) the Event Breaker will wait for new data to be sent to a specific channel before flushing the data stream out, as is, to the Pipelines
          - `sendToRoutes` boolean — Send events to normal routing and event processing. Disable to select a specific Pipeline/Destination combination.
          - `preprocess` PreprocessType
            - `disabled` boolean, required — Disabled
            - `command` string — Command to feed the data through (via stdin) and process its output (stdout)
            - `args` string[] — Arguments to be added to the custom command
          - `throttleRatePerSec` string — Rate (in bytes per second) to throttle while writing to an output. Accepts values with multiple-byte units, such as KB, MB, and GB. (Example: 42 MB) Default value of 0 specifies no throttling.
          - `metadata` MetadataConfInputCollection[] — Fields to add to events from this input
            - `name` string, required — Name of the metadata field.
            - `value` string, required — JavaScript expression to compute field's value, enclosed in quotes or backticks. (Can evaluate to a constant.)
          - `pipeline` string — Pipeline to process results
          - `output` string — Destination to send results to
        - `run` object, required
          - `rescheduleDroppedTasks` boolean — Reschedule tasks that failed with non-fatal errors
          - `maxTaskReschedule` number — Maximum number of times a task can be rescheduled
          - `logLevel` 'error' | 'warn' | 'info' | 'debug' | 'silly' — Level at which to set task logging
          - `jobTimeout` string — Maximum time the job is allowed to run. Time unit defaults to seconds if not specified (examples: 30, 45s, 15m). Enter 0 for unlimited time.
          - `mode` 'list' | 'preview' | 'run', required — Job run mode. Preview will either return up to N matching results, or will run until capture time T is reached. Discovery will gather the list of files to turn into streaming tasks, without running the data collection job. Full Run will run the collection job.
          - `timeRangeType` 'absolute' | 'relative' — Time range
          - `earliest` union — Earliest time to collect data for the selected timezone
            - number
            - string
          - `latest` union — Latest time to collect data for the selected timezone
            - number
            - string
          - `timestampTimezone` string — Timezone to use for Earliest and Latest times
          - `timeWarning` BrokenEventProcessor
          - `expression` string — A filter for tokens in the provided collect path and/or the events being collected
          - `minTaskSize` string — Limits the bundle size for small tasks. For example, if your lower bundle size is 1MB, you can bundle up to five 200KB files into one task.
          - `maxTaskSize` string — Limits the bundle size for files above the lower task bundle size. For example, if your upper bundle size is 10MB, you can bundle up to five 2MB files into one task. Files greater than this size will be assigned to individual tasks.
          - `discoverToRoutes` boolean — Send discover results to Routes
          - `capture` object — Capture Settings
            - `duration` number — Amount of time to keep capture open, in seconds
            - `maxEvents` number — Maximum number of events to capture
            - `level` 0 | 1 | 2 | 3 — Where to capture
        - `__template_streamtags` string — Binds 'streamtags' to a variable for dynamic value resolution. Set to variable ID (pack-scoped) or 'cribl.'/'edge.' prefixed ID (group-scoped). Variable value overrides 'streamtags' at runtime.
      - RunnableJobExecutor
        - `id` string — Unique ID for this Job
        - `description` string — Description
        - `type` 'collection' | 'executor' | 'scheduledSearch' — Job type
        - `ttl` string — Time to keep the job's artifacts on disk after job completion. This also affects how long a job is listed in the Job Inspector.
        - `ignoreGroupJobsLimit` boolean — When enabled, this job's artifacts are not counted toward the Worker Group's finished job artifacts limit. Artifacts will be removed only after the Collector's configured time to live.
        - `removeFields` string[] — List of fields to remove from Discover results. Wildcards (for example, aws*) are allowed. This is useful when discovery returns sensitive fields that should not be exposed in the Jobs user interface.
        - `resumeOnBoot` boolean — Resume the ad hoc job if a failure condition causes Stream to restart during job execution
        - `environment` string — Optionally, enable this config only on a specified Git branch. If empty, will be enabled everywhere.
        - `schedule` ScheduleTypeRunnableJobCollection — Configuration for a scheduled job
          - `enabled` boolean — Enable to configure scheduling for this Collector
          - `skippable` boolean — Skippable jobs can be delayed, up to their next run time, if the system is hitting concurrency limits
          - `resumeMissed` boolean — If Stream Leader (or single instance) restarts, run all missed jobs according to their original schedules
          - `cronSchedule` string — A cron schedule on which to run this job
          - `maxConcurrentRuns` number — The maximum number of instances of this scheduled job that may be running at any time
          - `run` RunSettingsTypeRunnableJobCollectionSchedule — Run settings
            - `type` 'collection' — Resource type identifier.
            - `rescheduleDroppedTasks` boolean — Reschedule tasks that failed with non-fatal errors
            - `maxTaskReschedule` number — Maximum number of times a task can be rescheduled
            - `logLevel` 'error' | 'warn' | 'info' | 'debug' | 'silly' — Level at which to set task logging
            - `jobTimeout` string — Maximum time the job is allowed to run. Time unit defaults to seconds if not specified (examples: 30, 45s, 15m). Enter 0 for unlimited time.
            - `mode` string, required — Job run mode. Preview will either return up to N matching results, or will run until capture time T is reached. Discovery will gather the list of files to turn into streaming tasks, without running the data collection job. Full Run will run the collection job.
            - `timeRangeType` string — Time range
            - `earliest` union — Earliest time to collect data for the selected timezone
              - …
            - `latest` union — Latest time to collect data for the selected timezone
              - …
            - `timestampTimezone` unknown
            - `timeWarning` BrokenEventProcessor
            - `expression` string — A filter for tokens in the provided collect path and/or the events being collected
            - `minTaskSize` string — Limits the bundle size for small tasks. For example, if your lower bundle size is 1MB, you can bundle up to five 200KB files into one task.
            - `maxTaskSize` string — Limits the bundle size for files above the lower task bundle size. For example, if your upper bundle size is 10MB, you can bundle up to five 2MB files into one task. Files greater than this size will be assigned to individual tasks.
        - `streamtags` string[] — Metadata tags used for categorization and filtering.
        - `executor` ExecutorTypeRunnableJobExecutor, required
          - `type` string, required — The type of executor to run
          - `storeTaskResults` boolean — Determines whether or not to write task results to disk
          - `conf` ExecutorSpecificSettingsTypeRunnableJobExecutorExecutor — Executor-specific settings
        - `run` object, required
          - `rescheduleDroppedTasks` boolean — Reschedule tasks that failed with non-fatal errors
          - `maxTaskReschedule` number — Maximum number of times a task can be rescheduled
          - `logLevel` 'error' | 'warn' | 'info' | 'debug' | 'silly' — Level at which to set task logging
          - `jobTimeout` string — Maximum time the job is allowed to run. Time unit defaults to seconds if not specified (examples: 30, 45s, 15m). Enter 0 for unlimited time.
        - `__template_streamtags` string — Binds 'streamtags' to a variable for dynamic value resolution. Set to variable ID (pack-scoped) or 'cribl.'/'edge.' prefixed ID (group-scoped). Variable value overrides 'streamtags' at runtime.
      - RunnableJobScheduledSearch
        - `id` string — Unique ID for this Job
        - `description` string — Description
        - `type` 'collection' | 'executor' | 'scheduledSearch', required — Job type
        - `ttl` string — Time to keep the job's artifacts on disk after job completion. This also affects how long a job is listed in the Job Inspector.
        - `ignoreGroupJobsLimit` boolean — When enabled, this job's artifacts are not counted toward the Worker Group's finished job artifacts limit. Artifacts will be removed only after the Collector's configured time to live.
        - `removeFields` string[] — List of fields to remove from Discover results. Wildcards (for example, aws*) are allowed. This is useful when discovery returns sensitive fields that should not be exposed in the Jobs user interface.
        - `resumeOnBoot` boolean — Resume the ad hoc job if a failure condition causes Stream to restart during job execution
        - `environment` string — Optionally, enable this config only on a specified Git branch. If empty, will be enabled everywhere.
        - `schedule` ScheduleTypeRunnableJobCollection — Configuration for a scheduled job
          - `enabled` boolean — Enable to configure scheduling for this Collector
          - `skippable` boolean — Skippable jobs can be delayed, up to their next run time, if the system is hitting concurrency limits
          - `resumeMissed` boolean — If Stream Leader (or single instance) restarts, run all missed jobs according to their original schedules
          - `cronSchedule` string — A cron schedule on which to run this job
          - `maxConcurrentRuns` number — The maximum number of instances of this scheduled job that may be running at any time
          - `run` RunSettingsTypeRunnableJobCollectionSchedule — Run settings
            - `type` 'collection' — Resource type identifier.
            - `rescheduleDroppedTasks` boolean — Reschedule tasks that failed with non-fatal errors
            - `maxTaskReschedule` number — Maximum number of times a task can be rescheduled
            - `logLevel` 'error' | 'warn' | 'info' | 'debug' | 'silly' — Level at which to set task logging
            - `jobTimeout` string — Maximum time the job is allowed to run. Time unit defaults to seconds if not specified (examples: 30, 45s, 15m). Enter 0 for unlimited time.
            - `mode` string, required — Job run mode. Preview will either return up to N matching results, or will run until capture time T is reached. Discovery will gather the list of files to turn into streaming tasks, without running the data collection job. Full Run will run the collection job.
            - `timeRangeType` string — Time range
            - `earliest` union — Earliest time to collect data for the selected timezone
              - …
            - `latest` union — Latest time to collect data for the selected timezone
              - …
            - `timestampTimezone` unknown
            - `timeWarning` BrokenEventProcessor
            - `expression` string — A filter for tokens in the provided collect path and/or the events being collected
            - `minTaskSize` string — Limits the bundle size for small tasks. For example, if your lower bundle size is 1MB, you can bundle up to five 200KB files into one task.
            - `maxTaskSize` string — Limits the bundle size for files above the lower task bundle size. For example, if your upper bundle size is 10MB, you can bundle up to five 2MB files into one task. Files greater than this size will be assigned to individual tasks.
        - `streamtags` string[] — Metadata tags used for categorization and filtering.
        - `savedQueryId` string, required — Identifies which search query to run
        - `__template_streamtags` string — Binds 'streamtags' to a variable for dynamic value resolution. Set to variable ID (pack-scoped) or 'cribl.'/'edge.' prefixed ID (group-scoped). Variable value overrides 'streamtags' at runtime.
    - `id` string, required — Unique identifier for the job.
    - `keep` boolean — If <code>true</code>, retain the job and its artifacts instead of deleting according to the time-to-live or retention policy. The job persists until it is manually deleted.
    - `stats` object, required — Counters and metrics collected during job execution.
    - `status` JobStatus, required — Status of a job, including its current state and failure reason.
      - `reason` TaskErrorDetail — Task error details. May include a nested <code>reason</code> for wrapped errors and additional properties from the original error.
        - `message` string, required — Human-readable error message.
        - `name` string — Error name, if available.
        - `reason` TaskErrorInfo — Serialized error object that describes why a job entered its current <code>state</code>. Includes <code>message</code> and may include a nested <code>reason</code> for wrapped errors.
          - `message` string, required — Human-readable error message.
          - `name` string — Error name, if available.
          - `stack` string — Truncated stack trace of the error.
        - `stack` string — Truncated stack trace of the error.
      - `state` 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9, required — State of the Job
    - `workerOwner` string — The GUID of the worker node that owns this artifact, set when the job ran on a Captain while the leader was offline. When present, the leader proxies read access to the artifact; mutating actions (replay, delete, stop) are not supported.

## Other responses

- `401` — Authentication failed (missing or invalid credentials or Bearer token).
- `500` — Unexpected server error.

---

[API](https://skmtc.net/criblio/apis/cribl-api-reference.md) · [All operations](https://skmtc.net/criblio/apis/cribl-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/criblio/cribl-api-reference/versions/e9bef570d106/schema)
