> For the complete documentation index, see [llms.txt](https://docs.truedat.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.truedat.io/v8.8/api-integrations/connectors-management-apis/jobs.md).

# Jobs

## Search available job filters

> Searches available job filters.

```json
{"openapi":"3.0.0","info":{"title":"td-cx","version":"Truedat 8.9.0"},"paths":{"/api/job_filters/search":{"post":{"description":"Searches available job filters.","operationId":"TdCxWeb.JobFilterController.search","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobFilterSearchRequest"}}},"description":"Job filter search request","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobFilterSearchResponse"}}},"description":"Job filter search response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxUnauthorizedResponse"}}},"description":"Unauthorized"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxUnprocessableEntityResponse"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Search available job filters","tags":["Jobs"]}}},"components":{"schemas":{"JobFilterSearchRequest":{"additionalProperties":true,"properties":{"filters":{"additionalProperties":true,"description":"Current filters","nullable":true,"type":"object"},"must":{"additionalProperties":true,"description":"Must conditions","nullable":true,"type":"object"}},"title":"JobFilterSearchRequest","type":"object"},"JobFilterSearchResponse":{"additionalProperties":false,"properties":{"data":{"additionalProperties":{"additionalProperties":false,"properties":{"buckets":{"items":{"additionalProperties":false,"properties":{"count":{"type":"integer"},"key":{"type":"string"}},"required":["key"],"type":"object"},"type":"array"},"values":{"items":{"type":"string"},"type":"array"}},"required":["buckets","values"],"type":"object"},"description":"Aggregated filter values (keyed by filter field)","type":"object"}},"required":["data"],"title":"JobFilterSearchResponse","type":"object"},"TdCxUnauthorizedResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxUnauthorizedResponse","type":"object"},"TdCxUnprocessableEntityResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxUnprocessableEntityResponse","type":"object"},"TdCxInternalServerErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxInternalServerErrorResponse","type":"object"}}}}
```

## Search jobs

> Searches jobs.

```json
{"openapi":"3.0.0","info":{"title":"td-cx","version":"Truedat 8.9.0"},"paths":{"/api/jobs/search":{"post":{"description":"Searches jobs.","operationId":"TdCxWeb.JobController.search","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobSearchRequest"}}},"description":"Job search request","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobSearchResponse"}}},"description":"Job search response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxUnauthorizedResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxForbiddenResponse"}}},"description":"Forbidden"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Search jobs","tags":["Jobs"]}}},"components":{"schemas":{"JobSearchRequest":{"additionalProperties":true,"properties":{"filters":{"additionalProperties":true,"description":"Filter criteria","nullable":true,"type":"object"},"must":{"additionalProperties":true,"description":"Must conditions","nullable":true,"type":"object"},"page":{"default":0,"description":"Page number (0-indexed)","nullable":true,"type":"integer"},"query":{"description":"Search query text","nullable":true,"type":"string"},"size":{"default":50,"description":"Page size","maximum":100,"minimum":1,"nullable":true,"type":"integer"}},"title":"JobSearchRequest","type":"object"},"JobSearchResponse":{"additionalProperties":false,"properties":{"data":{"description":"List of jobs matching the search","items":{"$ref":"#/components/schemas/Job"},"type":"array"}},"required":["data"],"title":"JobSearchResponse","type":"object"},"Job":{"additionalProperties":false,"properties":{"_embedded":{"additionalProperties":false,"nullable":true,"properties":{"events":{"items":{"additionalProperties":true,"type":"object"},"nullable":true,"type":"array"},"source":{"properties":{"active":{"nullable":true,"type":"boolean"},"external_id":{"type":"string"},"id":{"type":"integer"},"type":{"type":"string"}},"required":["id","external_id","type"],"type":"object"}},"type":"object"},"end_date":{"description":"End timestamp","format":"date-time","nullable":true,"type":"string"},"external_id":{"description":"Job external identifier","type":"string"},"id":{"description":"Job internal ID","nullable":true,"type":"integer"},"inserted_at":{"description":"Creation timestamp","format":"date-time","nullable":true,"type":"string"},"message":{"description":"Status message","nullable":true,"type":"string"},"source":{"additionalProperties":false,"nullable":true,"properties":{"external_id":{"type":"string"},"type":{"type":"string"}},"required":["external_id","type"],"type":"object"},"source_id":{"description":"Source internal ID","nullable":true,"type":"integer"},"start_date":{"description":"Start timestamp","format":"date-time","nullable":true,"type":"string"},"status":{"description":"Job status","nullable":true,"type":"string"},"type":{"description":"Job type","nullable":true,"type":"string"},"updated_at":{"description":"Last update timestamp","format":"date-time","nullable":true,"type":"string"}},"required":["external_id"],"title":"Job","type":"object"},"TdCxUnauthorizedResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxUnauthorizedResponse","type":"object"},"TdCxForbiddenResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxForbiddenResponse","type":"object"},"TdCxInternalServerErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxInternalServerErrorResponse","type":"object"}}}}
```

## Reindex all jobs

> Starts a background job to reindex all jobs in the search index

```json
{"openapi":"3.0.0","info":{"title":"td-cx","version":"Truedat 8.9.0"},"paths":{"/api/jobs/search/reindex_all":{"get":{"description":"Starts a background job to reindex all jobs in the search index","operationId":"TdCxWeb.SearchController.reindex_all","parameters":[],"responses":{"202":{"description":"Accepted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxUnauthorizedResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxForbiddenResponse"}}},"description":"Forbidden"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Reindex all jobs","tags":["Jobs"]}}},"components":{"schemas":{"TdCxUnauthorizedResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxUnauthorizedResponse","type":"object"},"TdCxForbiddenResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxForbiddenResponse","type":"object"},"TdCxInternalServerErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxInternalServerErrorResponse","type":"object"}}}}
```

## Get a job by external ID

> Fetches a job by external ID.

```json
{"openapi":"3.0.0","info":{"title":"td-cx","version":"Truedat 8.9.0"},"paths":{"/api/jobs/{external_id}":{"get":{"description":"Fetches a job by external ID.","operationId":"TdCxWeb.JobController.show","parameters":[{"description":"Job external ID","in":"path","name":"external_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobShowResponse"}}},"description":"Job"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxUnauthorizedResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxForbiddenResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxNotFoundResponse"}}},"description":"Not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Get a job by external ID","tags":["Jobs"]}}},"components":{"schemas":{"JobShowResponse":{"additionalProperties":false,"properties":{"data":{"$ref":"#/components/schemas/Job"}},"required":["data"],"title":"JobShowResponse","type":"object"},"Job":{"additionalProperties":false,"properties":{"_embedded":{"additionalProperties":false,"nullable":true,"properties":{"events":{"items":{"additionalProperties":true,"type":"object"},"nullable":true,"type":"array"},"source":{"properties":{"active":{"nullable":true,"type":"boolean"},"external_id":{"type":"string"},"id":{"type":"integer"},"type":{"type":"string"}},"required":["id","external_id","type"],"type":"object"}},"type":"object"},"end_date":{"description":"End timestamp","format":"date-time","nullable":true,"type":"string"},"external_id":{"description":"Job external identifier","type":"string"},"id":{"description":"Job internal ID","nullable":true,"type":"integer"},"inserted_at":{"description":"Creation timestamp","format":"date-time","nullable":true,"type":"string"},"message":{"description":"Status message","nullable":true,"type":"string"},"source":{"additionalProperties":false,"nullable":true,"properties":{"external_id":{"type":"string"},"type":{"type":"string"}},"required":["external_id","type"],"type":"object"},"source_id":{"description":"Source internal ID","nullable":true,"type":"integer"},"start_date":{"description":"Start timestamp","format":"date-time","nullable":true,"type":"string"},"status":{"description":"Job status","nullable":true,"type":"string"},"type":{"description":"Job type","nullable":true,"type":"string"},"updated_at":{"description":"Last update timestamp","format":"date-time","nullable":true,"type":"string"}},"required":["external_id"],"title":"Job","type":"object"},"TdCxUnauthorizedResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxUnauthorizedResponse","type":"object"},"TdCxForbiddenResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxForbiddenResponse","type":"object"},"TdCxNotFoundResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxNotFoundResponse","type":"object"},"TdCxInternalServerErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxInternalServerErrorResponse","type":"object"}}}}
```

## List jobs for a source

> Returns jobs for a source.

```json
{"openapi":"3.0.0","info":{"title":"td-cx","version":"Truedat 8.9.0"},"paths":{"/api/sources/{source_external_id}/jobs":{"get":{"description":"Returns jobs for a source.","operationId":"TdCxWeb.JobController.index","parameters":[{"description":"Source external ID","in":"path","name":"source_external_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobIndexResponse"}}},"description":"Jobs"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxUnauthorizedResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxForbiddenResponse"}}},"description":"Forbidden"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"List jobs for a source","tags":["Jobs"]}}},"components":{"schemas":{"JobIndexResponse":{"additionalProperties":false,"properties":{"data":{"description":"List of jobs for the source","items":{"$ref":"#/components/schemas/Job"},"type":"array"}},"required":["data"],"title":"JobIndexResponse","type":"object"},"Job":{"additionalProperties":false,"properties":{"_embedded":{"additionalProperties":false,"nullable":true,"properties":{"events":{"items":{"additionalProperties":true,"type":"object"},"nullable":true,"type":"array"},"source":{"properties":{"active":{"nullable":true,"type":"boolean"},"external_id":{"type":"string"},"id":{"type":"integer"},"type":{"type":"string"}},"required":["id","external_id","type"],"type":"object"}},"type":"object"},"end_date":{"description":"End timestamp","format":"date-time","nullable":true,"type":"string"},"external_id":{"description":"Job external identifier","type":"string"},"id":{"description":"Job internal ID","nullable":true,"type":"integer"},"inserted_at":{"description":"Creation timestamp","format":"date-time","nullable":true,"type":"string"},"message":{"description":"Status message","nullable":true,"type":"string"},"source":{"additionalProperties":false,"nullable":true,"properties":{"external_id":{"type":"string"},"type":{"type":"string"}},"required":["external_id","type"],"type":"object"},"source_id":{"description":"Source internal ID","nullable":true,"type":"integer"},"start_date":{"description":"Start timestamp","format":"date-time","nullable":true,"type":"string"},"status":{"description":"Job status","nullable":true,"type":"string"},"type":{"description":"Job type","nullable":true,"type":"string"},"updated_at":{"description":"Last update timestamp","format":"date-time","nullable":true,"type":"string"}},"required":["external_id"],"title":"Job","type":"object"},"TdCxUnauthorizedResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxUnauthorizedResponse","type":"object"},"TdCxForbiddenResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxForbiddenResponse","type":"object"},"TdCxInternalServerErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxInternalServerErrorResponse","type":"object"}}}}
```

## Create a job for a source

> Creates a job for a source.

```json
{"openapi":"3.0.0","info":{"title":"td-cx","version":"Truedat 8.9.0"},"paths":{"/api/sources/{source_external_id}/jobs":{"post":{"description":"Creates a job for a source.","operationId":"TdCxWeb.JobController.create","parameters":[{"description":"Source external ID","in":"path","name":"source_external_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobCreateRequest"}}},"description":"Job","required":false},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobShowResponse"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxUnauthorizedResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxForbiddenResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxNotFoundResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxUnprocessableEntityResponse"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Create a job for a source","tags":["Jobs"]}}},"components":{"schemas":{"JobCreateRequest":{"additionalProperties":false,"properties":{"job":{"additionalProperties":false,"properties":{"parameters":{"additionalProperties":true,"description":"Job parameters","nullable":true,"type":"object"},"type":{"description":"Job type","type":"string"}},"required":["type"],"type":"object"}},"required":["job"],"title":"JobCreateRequest","type":"object"},"JobShowResponse":{"additionalProperties":false,"properties":{"data":{"$ref":"#/components/schemas/Job"}},"required":["data"],"title":"JobShowResponse","type":"object"},"Job":{"additionalProperties":false,"properties":{"_embedded":{"additionalProperties":false,"nullable":true,"properties":{"events":{"items":{"additionalProperties":true,"type":"object"},"nullable":true,"type":"array"},"source":{"properties":{"active":{"nullable":true,"type":"boolean"},"external_id":{"type":"string"},"id":{"type":"integer"},"type":{"type":"string"}},"required":["id","external_id","type"],"type":"object"}},"type":"object"},"end_date":{"description":"End timestamp","format":"date-time","nullable":true,"type":"string"},"external_id":{"description":"Job external identifier","type":"string"},"id":{"description":"Job internal ID","nullable":true,"type":"integer"},"inserted_at":{"description":"Creation timestamp","format":"date-time","nullable":true,"type":"string"},"message":{"description":"Status message","nullable":true,"type":"string"},"source":{"additionalProperties":false,"nullable":true,"properties":{"external_id":{"type":"string"},"type":{"type":"string"}},"required":["external_id","type"],"type":"object"},"source_id":{"description":"Source internal ID","nullable":true,"type":"integer"},"start_date":{"description":"Start timestamp","format":"date-time","nullable":true,"type":"string"},"status":{"description":"Job status","nullable":true,"type":"string"},"type":{"description":"Job type","nullable":true,"type":"string"},"updated_at":{"description":"Last update timestamp","format":"date-time","nullable":true,"type":"string"}},"required":["external_id"],"title":"Job","type":"object"},"TdCxUnauthorizedResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxUnauthorizedResponse","type":"object"},"TdCxForbiddenResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxForbiddenResponse","type":"object"},"TdCxNotFoundResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxNotFoundResponse","type":"object"},"TdCxUnprocessableEntityResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxUnprocessableEntityResponse","type":"object"},"TdCxInternalServerErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxInternalServerErrorResponse","type":"object"}}}}
```
