> ## Documentation Index
> Fetch the complete documentation index at: https://docs.siftstack.com/llms.txt
> Use this file to discover all available pages before exploring further.

# jobs

> sift/jobs/v1/jobs.proto

<a name="sift_jobs_v1_jobs-proto" />

<a name="sift_jobs_v1_jobs-proto-services" />

## Services

*RPC methods exposed by this API.*

### JobService

| Method    | Request                               | Response                                | Description                                                                                                                                                                                                                                                                                  |
| :-------- | :------------------------------------ | :-------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ListJobs  | [ListJobsRequest](#listjobsrequest)   | [ListJobsResponse](#listjobsresponse)   | List jobs.                                                                                                                                                                                                                                                                                   |
| CancelJob | [CancelJobRequest](#canceljobrequest) | [CancelJobResponse](#canceljobresponse) | Requests cancellation of an active job. If the job hasn't started yet, it will be cancelled immediately. Jobs that are already finished, failed, or cancelled are not affected. Cancelled jobs have implementation-based behavior, but in every case it's valid to cancel a job at any time. |
| RetryJob  | [RetryJobRequest](#retryjobrequest)   | [RetryJobResponse](#retryjobresponse)   | Requests a retry of a job. Jobs that are finished, in progress or in the process of being cancelled are not affected.                                                                                                                                                                        |

<a name="sift_jobs_v1_jobs-proto-messages" />

## Messages

*Data models used across requests/responses.*

### CancelJobRequest

| Field   | Type   | Label | Description |
| :------ | :----- | :---- | :---------- |
| job\_id | string |       |             |

### CancelJobResponse

*This message has no fields.*

### DataExportJobDetails

| Field        | Type                                                                    | Label | Description |
| :----------- | :---------------------------------------------------------------------- | :---- | :---------- |
| request      | [sift.exports.v1.ExportDataRequest](#sift-exports-v1-exportdatarequest) |       |             |
| storage\_key | string                                                                  |       |             |

### DataExportStatusDetails

| Field          | Type   | Label | Description |
| :------------- | :----- | :---- | :---------- |
| error\_message | string |       |             |

### DataImportJobDetails

| Field            | Type   | Label | Description |
| :--------------- | :----- | :---- | :---------- |
| data\_import\_id | string |       |             |

### DataImportStatusDetails

| Field             | Type   | Label | Description |
| :---------------- | :----- | :---- | :---------- |
| points\_processed | uint64 |       |             |
| points\_total     | uint64 |       |             |

### Job

| Field                  | Type                                  | Label | Description |
| :--------------------- | :------------------------------------ | :---- | :---------- |
| job\_id                | string                                |       |             |
| organization\_id       | string                                |       |             |
| created\_by\_user\_id  | string                                |       |             |
| modified\_by\_user\_id | string                                |       |             |
| created\_date          | google.protobuf.Timestamp             |       |             |
| modified\_date         | google.protobuf.Timestamp             |       |             |
| started\_date          | google.protobuf.Timestamp             |       |             |
| completed\_date        | google.protobuf.Timestamp             |       |             |
| job\_type              | [JobType](#jobtype)                   |       |             |
| job\_status            | [JobStatus](#jobstatus)               |       |             |
| job\_status\_details   | [JobStatusDetails](#jobstatusdetails) |       |             |
| job\_details           | [JobDetails](#jobdetails)             |       |             |

### JobDetails

| Field                           | Type                                                  | Label | Description |
| :------------------------------ | :---------------------------------------------------- | :---- | :---------- |
| oneof details. rule\_evaluation | [RuleEvaluationJobDetails](#ruleevaluationjobdetails) |       |             |
| oneof details. data\_import     | [DataImportJobDetails](#dataimportjobdetails)         |       |             |
| oneof details. data\_export     | [DataExportJobDetails](#dataexportjobdetails)         |       |             |

### JobStatusDetails

| Field                          | Type                                                        | Label | Description |
| :----------------------------- | :---------------------------------------------------------- | :---- | :---------- |
| oneof status. rule\_evaluation | [RuleEvaluationStatusDetails](#ruleevaluationstatusdetails) |       |             |
| oneof status. data\_import     | [DataImportStatusDetails](#dataimportstatusdetails)         |       |             |
| oneof status. data\_export     | [DataExportStatusDetails](#dataexportstatusdetails)         |       |             |

### ListJobsRequest

| Field            | Type   | Label | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| :--------------- | :----- | :---- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| page\_size       | uint32 |       | The maximum number of jobs to return. The service may return fewer than this value. If unspecified, at most 50 jobs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. Optional.                                                                                                                                                                                                                                                                                                                       |
| page\_token      | string |       | A page token, received from a previous `ListJobs` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListJobs` must match the call that provided the page token. Optional.                                                                                                                                                                                                                                                                                                              |
| filter           | string |       | A [Common Expression Language (CEL)](https://github.com/google/cel-spec) filter string. Available fields to filter by are: `job_id`, `created_by_user_id`, `modified_by_user_id`, `created_date`, `modified_date`, `started_date`, `completed_date`, and `job_status` For further information about how to use CELs, please refer to [this guide](https://github.com/google/cel-spec/blob/master/doc/langdef.md#standard-definitions). For more information about the fields used for filtering, please refer to this definition. Optional. |
| organization\_id | string |       | This field is only required if your user belongs to multiple organizations.                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| order\_by        | string |       | How to order the retrieved jobs. Formatted as a comma-separated string i.e. "FIELD\_NAME\[ desc],...". Available fields to order\_by are `created_date`, `modified_date`, `started_date`, `completed_date`, `job_status`. If left empty, items are ordered by `created_date` in descending order (newest-first). For more information about the format of this field, read [this](https://google.aip.dev/132#ordering) Example: "created\_date desc,modified\_date"                                                                         |

### ListJobsResponse

| Field             | Type        | Label    | Description |
| :---------------- | :---------- | :------- | :---------- |
| jobs              | [Job](#job) | repeated |             |
| next\_page\_token | string      |          |             |

### RetryJobRequest

| Field   | Type   | Label | Description |
| :------ | :----- | :---- | :---------- |
| job\_id | string |       |             |

### RetryJobResponse

| Field | Type        | Label | Description |
| :---- | :---------- | :---- | :---------- |
| job   | [Job](#job) |       |             |

### RuleEvaluationJobDetails

| Field      | Type   | Label | Description |
| :--------- | :----- | :---- | :---------- |
| report\_id | string |       |             |

### RuleEvaluationStatusDetails

*This message has no fields.*

<a name="sift_jobs_v1_jobs-proto-enums" />

## Enums

*Allowed constant values used in message fields.*

### JobStatus

| Name                           | Number | Description |
| :----------------------------- | :----- | :---------- |
| JOB\_STATUS\_UNSPECIFIED       | 0      |             |
| JOB\_STATUS\_CREATED           | 1      |             |
| JOB\_STATUS\_RUNNING           | 2      |             |
| JOB\_STATUS\_FINISHED          | 3      |             |
| JOB\_STATUS\_FAILED            | 4      |             |
| JOB\_STATUS\_CANCELLED         | 5      |             |
| JOB\_STATUS\_CANCEL\_REQUESTED | 6      |             |

### JobType

| Name                        | Number | Description |
| :-------------------------- | :----- | :---------- |
| JOB\_TYPE\_UNSPECIFIED      | 0      |             |
| JOB\_TYPE\_RULE\_EVALUATION | 1      |             |
| JOB\_TYPE\_DATA\_IMPORT     | 2      |             |
| JOB\_TYPE\_DATA\_EXPORT     | 3      |             |
