Skip to content

Commit ea0411c

Browse files
lcawll-trotta
andauthored
Add specification for set connector sync job stats (#3368)
* Add specification for set connector sync job stats * fix conflicts * restore old changes --------- Co-authored-by: Laura Trotta <laura.trotta@elastic.co>
1 parent 3d0ea68 commit ea0411c

File tree

7 files changed

+318
-10
lines changed

7 files changed

+318
-10
lines changed

output/openapi/elasticsearch-openapi.json

Lines changed: 75 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: 133 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_update_stats": {
247-
"request": [
248-
"Missing request & response"
249-
],
250-
"response": []
251-
},
252246
"enrich.delete_policy": {
253247
"request": [
254248
"Request: missing json spec query parameter 'master_timeout'"

output/typescript/types.ts

Lines changed: 15 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
@@ -96,6 +96,7 @@ connector-sync-job-delete,https://www.elastic.co/guide/en/elasticsearch/referenc
9696
connector-sync-job-get,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/get-connector-sync-job-api.html
9797
connector-sync-job-post,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/create-connector-sync-job-api.html
9898
connector-sync-job-list,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/list-connector-sync-jobs-api.html
99+
connector-sync-job-stats,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/set-connector-sync-job-stats-api.html
99100
connector-checkin,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/check-in-connector-api.html
100101
connector-delete,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/delete-connector-api.html
101102
connector-features,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/update-connector-features-api.html
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
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, Metadata } from '@_types/common'
21+
import { integer, long } from '@_types/Numeric'
22+
import { Duration } from '@_types/Time'
23+
24+
/**
25+
* Set the connector sync job stats.
26+
* Stats include: `deleted_document_count`, `indexed_document_count`, `indexed_document_volume`, and `total_document_count`.
27+
* You can also update `last_seen`.
28+
* This API is mainly used by the connector service for updating sync job information.
29+
*
30+
* To sync data using self-managed connectors, you need to deploy the Elastic connector service on your own infrastructure.
31+
* This service runs automatically on Elastic Cloud for Elastic managed connectors.
32+
* @rest_spec_name connector.sync_job_update_stats
33+
* @availability stack stability=experimental visibility=public
34+
* @doc_id connector-sync-job-stats
35+
*/
36+
export interface Request extends RequestBase {
37+
/**
38+
* The sync job to be created
39+
*/
40+
path_parts: {
41+
/**
42+
* The unique identifier of the connector sync job.
43+
*/
44+
connector_sync_job_id: Id
45+
}
46+
body: {
47+
/**
48+
* The number of documents the sync job deleted.
49+
*/
50+
deleted_document_count: long
51+
/**
52+
* The number of documents the sync job indexed.
53+
*/
54+
indexed_document_count: long
55+
/**
56+
* The total size of the data (in MiB) the sync job indexed.
57+
*/
58+
indexed_document_volume: long
59+
/**
60+
* The timestamp to use in the `last_seen` property for the connector sync job.
61+
*/
62+
last_seen?: Duration
63+
/**
64+
* The connector-specific metadata.
65+
*/
66+
metadata?: Metadata
67+
/**
68+
* The total number of documents in the target index after the sync job finished.
69+
*/
70+
total_document_count?: integer
71+
}
72+
}
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)