Skip to content

Commit 68dcbfb

Browse files
authored
Add specification for claim connector sync job (#3366)
1 parent 42573da commit 68dcbfb

File tree

7 files changed

+229
-10
lines changed

7 files changed

+229
-10
lines changed

output/openapi/elasticsearch-openapi.json

Lines changed: 59 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: 81 additions & 4 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: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -243,12 +243,6 @@
243243
],
244244
"response": []
245245
},
246-
"connector.sync_job_claim": {
247-
"request": [
248-
"Missing request & response"
249-
],
250-
"response": []
251-
},
252246
"connector.sync_job_error": {
253247
"request": [
254248
"Missing request & response"

output/typescript/types.ts

Lines changed: 11 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: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ common-options,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/
8787
community-id-processor,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/community-id-processor.html
8888
connector-sync-job-cancel,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/cancel-connector-sync-job-api.html
8989
connector-sync-job-checkin,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/check-in-connector-sync-job-api.html
90+
connector-sync-job-claim,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/claim-connector-sync-job-api.html
9091
collapse-search-results,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/collapse-search-results.html
9192
connector-sync-job-delete,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/delete-connector-sync-job-api.html
9293
connector-sync-job-get,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/get-connector-sync-job-api.html
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
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 { UserDefinedValue } from '@spec_utils/UserDefinedValue'
20+
import { RequestBase } from '@_types/Base'
21+
import { Id } from '@_types/common'
22+
23+
/**
24+
* Claim a connector sync job.
25+
* This action updates the job status to `in_progress` and sets the `last_seen` and `started_at` timestamps to the current time.
26+
* Additionally, it can set the `sync_cursor` property for the sync job.
27+
*
28+
* This API is not intended for direct connector management by users.
29+
* It supports the implementation of services that utilize the connector protocol to communicate with Elasticsearch.
30+
*
31+
* To sync data using self-managed connectors, you need to deploy the Elastic connector service on your own infrastructure.
32+
* This service runs automatically on Elastic Cloud for Elastic managed connectors.
33+
* @rest_spec_name connector.sync_job_claim
34+
* @availability stack stability=experimental visibility=public
35+
* @doc_id connector-sync-job-claim
36+
*/
37+
export interface Request extends RequestBase {
38+
path_parts: {
39+
/**
40+
* The unique identifier of the connector sync job.
41+
*/
42+
connector_sync_job_id: Id
43+
}
44+
body: {
45+
/**
46+
* The cursor object from the last incremental sync job.
47+
* This should reference the `sync_cursor` field in the connector state for which the job runs.
48+
*/
49+
sync_cursor?: UserDefinedValue
50+
/**
51+
* The host name of the current system that will run the job.
52+
*/
53+
worker_hostname: string
54+
}
55+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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+
20+
export class Response {
21+
body: {}
22+
}

0 commit comments

Comments
 (0)