Skip to main content

jobs

Creates, updates, deletes, gets or lists a jobs resource.

Overview

Namejobs
TypeResource
Idsumologic.archive.jobs

Fields

The following fields are returned by SELECT queries:

A paginated list of ingestion jobs for an Archive Source.

NameDatatypeDescription
idstringThe unique identifier of the ingestion job. (example: 4e214571-cf27-4114-93e6-69a98c017f3)
namestringThe name of the ingestion job.
createdAtstring (date-time)The creation timestamp in UTC of the ingestion job. (example: 2018-10-16T09:10:00Z)
createdBystringThe identifier of the user who created the ingestion job. (example: 0000000006743FDD)
endTimestring (date-time)The ending timestamp of the ingestion job. (example: 2018-10-16T10:10:00Z)
startTimestring (date-time)The starting timestamp of the ingestion job. (example: 2018-10-16T09:10:00Z)
statusstringThe status of the ingestion job, either Pending,Scanning,Ingesting,Failed, or Succeeded. (example: Scanning)
totalBytesIngestedinteger (int64)The total bytes ingested by the ingestion job.
totalObjectsIngestedinteger (int64)The total number of objects ingested by the ingestion job.
totalObjectsScannedinteger (int64)The total number of objects scanned by the ingestion job.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listArchiveJobsBySourceIdselectsourceId, regionlimit, tokenGet a list of all the ingestion jobs created on an Archive Source. The response is paginated with a default limit of 10 jobs per page.
createArchiveJobinsertsourceId, region, data__endTime, data__name, data__startTimeCreate an ingestion job to pull data from your S3 bucket.
deleteArchiveJobdeletesourceId, id, regionDelete an ingestion job with the given identifier from the organization. The delete operation is only possible for jobs with a Succeeded or Failed status.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
idstringThe identifier of the ingestion job to delete.
regionstringSumoLogic region (enum: [us2, au, ca, de, eu, fed, in, jp], default: us2)
sourceIdstringThe identifier of the Archive Source.
limitinteger (int32)Limit the number of jobs returned in the response. The number of jobs returned may be less than the limit.
tokenstringContinuation token to get the next page of results. A page object with the next continuation token is returned in the response body. Subsequent GET requests should specify the continuation token to get the next page of results. token is set to null when no more pages are left.

SELECT examples

Get a list of all the ingestion jobs created on an Archive Source. The response is paginated with a default limit of 10 jobs per page.

SELECT
id,
name,
createdAt,
createdBy,
endTime,
startTime,
status,
totalBytesIngested,
totalObjectsIngested,
totalObjectsScanned
FROM sumologic.archive.jobs
WHERE sourceId = '{{ sourceId }}' -- required
AND region = '{{ region }}' -- required
AND limit = '{{ limit }}'
AND token = '{{ token }}'
;

INSERT examples

Create an ingestion job to pull data from your S3 bucket.

INSERT INTO sumologic.archive.jobs (
data__name,
data__startTime,
data__endTime,
sourceId,
region
)
SELECT
'{{ name }}' /* required */,
'{{ startTime }}' /* required */,
'{{ endTime }}' /* required */,
'{{ sourceId }}',
'{{ region }}'
RETURNING
id,
name,
createdAt,
createdBy,
endTime,
startTime,
status,
totalBytesIngested,
totalObjectsIngested,
totalObjectsScanned
;

DELETE examples

Delete an ingestion job with the given identifier from the organization. The delete operation is only possible for jobs with a Succeeded or Failed status.

DELETE FROM sumologic.archive.jobs
WHERE sourceId = '{{ sourceId }}' --required
AND id = '{{ id }}' --required
AND region = '{{ region }}' --required
;