Skip to content

Commit 9f0dc3d

Browse files
authored
Connector SyncJob API spec (#2503)
1 parent 6c80cd7 commit 9f0dc3d

21 files changed

+1952
-0
lines changed

output/openapi/elasticsearch-serverless-openapi.json

Lines changed: 393 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/schema/schema.json

Lines changed: 911 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/schema/validation-errors.json

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/typescript/types.ts

Lines changed: 80 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/_doc_ids/table.csv

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ cluster-stats,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/c
7878
cluster-update-settings,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/cluster-update-settings.html
7979
cluster,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/cluster.html
8080
common-options,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/common-options.html
81+
connector-sync-job-cancel,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/cancel-connector-sync-job-api.html
82+
connector-sync-job-delete,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/delete-connector-sync-job-api.html
83+
connector-sync-job-get,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/get-connector-sync-job-api.html
84+
connector-sync-job-post,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/create-connector-sync-job-api.html
85+
connector-sync-job-list,https://www.elastic.co/guide/en/elasticsearch/reference/{list}/list-connector-sync-jobs-api.html
8186
connector-checkin,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/check-in-connector-api.html
8287
connector-delete,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/delete-connector-api.html
8388
connector-get,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/get-connector-api.html
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"connector.sync_job_cancel": {
3+
"documentation": {
4+
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/cancel-connector-sync-job-api.html",
5+
"description": "Cancels a connector sync job."
6+
},
7+
"stability": "experimental",
8+
"visibility": "public",
9+
"headers": {
10+
"accept": ["application/json"]
11+
},
12+
"url": {
13+
"paths": [
14+
{
15+
"path": "/_connector/_sync_job/{connector_sync_job_id}/_cancel",
16+
"methods": ["PUT"],
17+
"parts": {
18+
"connector_sync_job_id": {
19+
"type": "string",
20+
"description": "The unique identifier of the connector sync job to be canceled"
21+
}
22+
}
23+
}
24+
]
25+
}
26+
}
27+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"connector.sync_job_delete": {
3+
"documentation": {
4+
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-connector-sync-job-api.html",
5+
"description": "Deletes a connector sync job."
6+
},
7+
"stability": "experimental",
8+
"visibility": "public",
9+
"headers": {
10+
"accept": ["application/json"]
11+
},
12+
"url": {
13+
"paths": [
14+
{
15+
"path": "/_connector/_sync_job/{connector_sync_job_id}",
16+
"methods": ["DELETE"],
17+
"parts": {
18+
"connector_sync_job_id": {
19+
"type": "string",
20+
"description": "The unique identifier of the connector sync job to be deleted."
21+
}
22+
}
23+
}
24+
]
25+
}
26+
}
27+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"connector.sync_job_get": {
3+
"documentation": {
4+
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/get-connector-sync-job-api.html",
5+
"description": "Returns the details about a connector sync job."
6+
},
7+
"stability": "experimental",
8+
"visibility": "public",
9+
"headers": {
10+
"accept": ["application/json"]
11+
},
12+
"url": {
13+
"paths": [
14+
{
15+
"path": "/_connector/_sync_job/{connector_sync_job_id}",
16+
"methods": ["GET"],
17+
"parts": {
18+
"connector_sync_job_id": {
19+
"type": "string",
20+
"description": "The unique identifier of the connector sync job to be returned."
21+
}
22+
}
23+
}
24+
]
25+
}
26+
}
27+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"connector.sync_job_list": {
3+
"documentation": {
4+
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/list-connector-sync-jobs-api.html",
5+
"description": "Lists all connector sync jobs."
6+
},
7+
"stability": "experimental",
8+
"visibility": "public",
9+
"headers": {
10+
"accept": ["application/json"]
11+
},
12+
"url": {
13+
"paths": [
14+
{
15+
"path": "/_connector/_sync_job",
16+
"methods": ["GET"]
17+
}
18+
]
19+
},
20+
"params": {
21+
"from": {
22+
"type": "int",
23+
"default": 0,
24+
"description": "Starting offset (default: 0)"
25+
},
26+
"size": {
27+
"type": "int",
28+
"default": 100,
29+
"description": "specifies a max number of results to get (default: 100)"
30+
},
31+
"status": {
32+
"type": "string",
33+
"description": "Sync job status, which sync jobs are fetched for"
34+
},
35+
"connector_id": {
36+
"type": "string",
37+
"description": "Id of the connector to fetch the sync jobs for"
38+
},
39+
"job_type": {
40+
"type": "list",
41+
"description": "A comma-separated list of job types"
42+
}
43+
}
44+
}
45+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"connector.sync_job_post": {
3+
"documentation": {
4+
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/create-connector-sync-job-api.html",
5+
"description": "Creates a connector sync job."
6+
},
7+
"stability": "experimental",
8+
"visibility": "public",
9+
"headers": {
10+
"accept": ["application/json"],
11+
"content_type": ["application/json"]
12+
},
13+
"url": {
14+
"paths": [
15+
{
16+
"path": "/_connector/_sync_job",
17+
"methods": ["POST"]
18+
}
19+
]
20+
},
21+
"body": {
22+
"description": "The connector sync job data.",
23+
"required": true
24+
}
25+
}
26+
}
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
/*
2+
* Licensed to Elasticsearch B.V. under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch B.V. licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
import { Id } from '@_types/common'
20+
import { long } from '@_types/Numeric'
21+
import { DateTime } from '@_types/Time'
22+
import { Dictionary } from '@spec_utils/Dictionary'
23+
import { UserDefinedValue } from '@spec_utils/UserDefinedValue'
24+
import {
25+
ConnectorConfiguration,
26+
FilteringConfig,
27+
IngestPipelineParams,
28+
SyncStatus
29+
} from './Connector'
30+
31+
interface SyncJobConnectorReference {
32+
configuration: ConnectorConfiguration
33+
filtering: FilteringConfig
34+
id: Id
35+
index_name: string
36+
language?: string
37+
pipeline?: IngestPipelineParams
38+
service_type: string
39+
}
40+
41+
export enum SyncJobType {
42+
full,
43+
incremental,
44+
access_control
45+
}
46+
47+
export enum SyncJobTriggerMethod {
48+
on_demand,
49+
scheduled
50+
}
51+
52+
export interface ConnectorSyncJob {
53+
cancelation_requested_at?: DateTime
54+
canceled_at?: DateTime
55+
completed_at?: DateTime
56+
connector: SyncJobConnectorReference
57+
created_at: DateTime
58+
deleted_document_count: long
59+
error?: string
60+
id: Id
61+
indexed_document_count: long
62+
indexed_document_volume: long
63+
job_type: SyncJobType
64+
last_seen?: DateTime
65+
metadata: Dictionary<string, UserDefinedValue>
66+
started_at?: DateTime
67+
status: SyncStatus
68+
total_document_count: long
69+
trigger_method: SyncJobTriggerMethod
70+
worker_hostname?: string
71+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/*
2+
* Licensed to Elasticsearch B.V. under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch B.V. licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
import { RequestBase } from '@_types/Base'
20+
import { Id } from '@_types/common'
21+
22+
/**
23+
* Cancels a connector sync job.
24+
* @rest_spec_name connector.sync_job_cancel
25+
* @availability stack since=8.12.0 stability=experimental
26+
* @availability serverless stability=experimental visibility=public
27+
* @doc_id connector-sync-job-cancel
28+
*/
29+
export interface Request extends RequestBase {
30+
path_parts: {
31+
/**
32+
* The unique identifier of the connector sync job
33+
*/
34+
connector_sync_job_id: Id
35+
}
36+
}

0 commit comments

Comments
 (0)