---
type: api
title: Get a connector sync job
url: https://www.elastic.co/elastic/docs-builder/docs/4641/api/doc/elasticsearch/v8/operation/operation-connector-sync-job-get
resource: https://www.elastic.co/elastic/docs-builder/docs/4641/api/doc/elasticsearch/v8/operation/operation-connector-sync-job-get
products:
  - Elasticsearch
---

# Get a connector sync job

Authentication: required

Availability: Beta since 8.12

## Paths

- `GET` `/_connector/_sync_job/{connector_sync_job_id}`

#### Path parameters

- `connector_sync_job_id` (string) — required
  The unique identifier of the connector sync job

## Response

`application/json`

- `cancelation_requested_at` (union oneOf)
  One of: `string` or `number`
- `canceled_at` (union oneOf)
  One of: `string` or `number`
- `completed_at` (union oneOf)
  One of: `string` or `number`
- `connector` (object)
  - `configuration` (object)
  - `filtering` (object)
    - `advanced_snippet` (object)
      - `created_at` (union oneOf)
        One of: `string` or `number`
      - `updated_at` (union oneOf)
        One of: `string` or `number`
      - `value` (object)
    - `rules` (object[])
      - `created_at` (union oneOf)
        One of: `string` or `number`
      - `field` (string)
      - `id` (string)
      - `order` (number)
      - `policy` (enum)
        Values: `exclude`, `include`
      - `rule` (enum)
        Values: `contains`, `ends_with`, `equals`, `regex`, `starts_with`, `>`, `<`
      - `updated_at` (union oneOf)
        One of: `string` or `number`
      - `value` (string)
    - `validation` (object)
      - `errors` (object[])
        - `ids` (string[])
        - `messages` (string[])
      - `state` (enum)
        Values: `edited`, `invalid`, `valid`
  - `id` (string)
  - `index_name` (string)
  - `language` (string)
  - `pipeline` (object)
    - `extract_binary_content` (boolean)
    - `name` (string)
    - `reduce_whitespace` (boolean)
    - `run_ml_inference` (boolean)
  - `service_type` (string)
  - `sync_cursor` (object)
- `created_at` (union oneOf)
  One of: `string` or `number`
- `deleted_document_count` (number)
- `error` (string)
- `id` (string)
- `indexed_document_count` (number)
- `indexed_document_volume` (number)
- `job_type` (enum)
  Values: `full`, `incremental`, `access_control`
- `last_seen` (union oneOf)
  One of: `string` or `number`
- `metadata` (map string to object)
- `started_at` (union oneOf)
  One of: `string` or `number`
- `status` (enum)
  Values: `canceling`, `canceled`, `completed`, `error`, `in_progress`, `pending`, `suspended`
- `total_document_count` (number)
- `trigger_method` (enum)
  Values: `on_demand`, `scheduled`
- `worker_hostname` (string)
## Code examples

#### Console

```console
GET _connector/_sync_job/my-connector-sync-job
```

#### JavaScript

```javascript
const response = await client.connector.syncJobGet({
  connector_sync_job_id: "my-connector-sync-job",
});
```

#### Python

```python
resp = client.connector.sync_job_get(
    connector_sync_job_id="my-connector-sync-job",
)
```

#### curl

```curl
curl -X GET "$ELASTICSEARCH_URL/_connector/_sync_job/my-connector-sync-job" \
  -H "Authorization: ApiKey $ELASTIC_API_KEY"
```

#### Java

```java
client.connector().syncJobGet(s -> s
    .connectorSyncJobId("my-connector-sync-job")
);
```

#### PHP

```php
$resp = $client->connector()->syncJobGet([
    "connector_sync_job_id" => "my-connector-sync-job",
]);
```

#### Ruby

```ruby
response = client.connector.sync_job_get(
  connector_sync_job_id: "my-connector-sync-job"
)
```

## Response examples

#### 200

`application/json`

Generated from the API spec. Values are representative. Unions use the first variant; deeply nested or large bodies may omit fields.

```json
{
  "cancelation_requested_at": "string",
  "canceled_at": "string",
  "completed_at": "string",
  "connector": {
    "configuration": {
      "key": {
        "category": "string",
        "default_value": 0,
        "depends_on": [
          {
            "field": "string"
          }
        ],
        "display": "textbox",
        "label": "string",
        "options": [
          {
            "label": "string"
          }
        ],
        "order": 0,
        "placeholder": "string",
        "required": false,
        "sensitive": false,
        "tooltip": "string",
        "type": "str",
        "ui_restrictions": [
          "string"
        ],
        "validations": [],
        "value": {}
      }
    },
    "filtering": {
      "advanced_snippet": {
        "created_at": "string",
        "updated_at": "string",
        "value": {}
      },
      "rules": [
        {
          "field": "string",
          "id": "string",
          "order": 0,
          "policy": "exclude",
          "rule": "contains",
          "value": "string"
        }
      ],
      "validation": {
        "errors": [
          {}
        ],
        "state": "edited"
      }
    },
    "id": "string",
    "index_name": "string",
    "language": "string",
    "pipeline": {
      "extract_binary_content": false,
      "name": "string",
      "reduce_whitespace": false,
      "run_ml_inference": false
    },
    "service_type": "string",
    "sync_cursor": {}
  },
  "created_at": "string",
  "deleted_document_count": 0,
  "error": "string",
  "id": "string",
  "indexed_document_count": 0,
  "indexed_document_volume": 0,
  "job_type": "full",
  "last_seen": "string",
  "metadata": {
    "key": {}
  },
  "started_at": "string",
  "status": "canceling",
  "total_document_count": 0,
  "trigger_method": "on_demand",
  "worker_hostname": "string"
}
```

