-
Notifications
You must be signed in to change notification settings - Fork 102
Connector SyncJob API spec #2503
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 5 commits
95d7e3d
51c021d
6a35f12
6d40597
7cbe82d
952436e
fcc4833
ba2f719
5a2cf04
b73b1e2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"connector_sync_job.cancel": { | ||
"documentation": { | ||
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/cancel-connector-sync-job-api.html", | ||
"description": "Cancels a connector sync job." | ||
}, | ||
"stability": "experimental", | ||
"visibility": "public", | ||
"headers": { | ||
"accept": ["application/json"] | ||
}, | ||
"url": { | ||
"paths": [ | ||
{ | ||
"path": "/_connector/_sync_job/{connector_sync_job_id}/_cancel", | ||
"methods": ["PUT"], | ||
"parts": { | ||
"connector_sync_job_id": { | ||
"type": "string", | ||
"description": "The unique identifier of the connector sync job to be canceled" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"connector_sync_job.delete": { | ||
"documentation": { | ||
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-connector-sync-job-api.html", | ||
"description": "Deletes a connector sync job." | ||
}, | ||
"stability": "experimental", | ||
"visibility": "public", | ||
"headers": { | ||
"accept": ["application/json"] | ||
}, | ||
"url": { | ||
"paths": [ | ||
{ | ||
"path": "/_connector/_sync_job/{connector_sync_job_id}", | ||
"methods": ["DELETE"], | ||
"parts": { | ||
"connector_sync_job_id": { | ||
"type": "string", | ||
"description": "The unique identifier of the connector sync job to be deleted." | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"connector_sync_job.get": { | ||
"documentation": { | ||
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/get-connector-sync-job-api.html", | ||
"description": "Returns the details about a connector sync job." | ||
}, | ||
"stability": "experimental", | ||
"visibility": "public", | ||
"headers": { | ||
"accept": ["application/json"] | ||
}, | ||
"url": { | ||
"paths": [ | ||
{ | ||
"path": "/_connector/_sync_job/{connector_sync_job_id}", | ||
"methods": ["GET"], | ||
"parts": { | ||
"connector_sync_job_id": { | ||
"type": "string", | ||
"description": "The unique identifier of the connector sync job to be returned." | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"connector_sync_job.list": { | ||
"documentation": { | ||
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/list-connector-sync-jobs-api.html", | ||
"description": "Lists all connector sync jobs." | ||
}, | ||
"stability": "experimental", | ||
"visibility": "public", | ||
"headers": { | ||
"accept": ["application/json"] | ||
}, | ||
"url": { | ||
"paths": [ | ||
{ | ||
"path": "/_connector/_sync_job", | ||
"methods": ["GET"] | ||
} | ||
] | ||
}, | ||
"params": { | ||
"from": { | ||
"type": "int", | ||
"default": 0, | ||
"description": "Starting offset (default: 0)" | ||
}, | ||
"size": { | ||
"type": "int", | ||
"default": 100, | ||
"description": "specifies a max number of results to get (default: 100)" | ||
}, | ||
"status": { | ||
"type": "string", | ||
"description": "Sync job status, which sync jobs are fetched for" | ||
}, | ||
"connector_id": { | ||
"type": "string", | ||
"description": "Id of the connector to fetch the sync jobs for" | ||
}, | ||
"job_type": { | ||
"type": "list", | ||
"description": "A comma-separated list of job types" | ||
} | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"connector_sync_job.post": { | ||
"documentation": { | ||
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/create-connector-sync-job-api.html", | ||
"description": "Creates a connector sync job." | ||
}, | ||
"stability": "experimental", | ||
"visibility": "public", | ||
"headers": { | ||
"accept": ["application/json"], | ||
"content_type": ["application/json"] | ||
}, | ||
"url": { | ||
"paths": [ | ||
{ | ||
"path": "/_connector/_sync_job", | ||
"methods": ["POST"] | ||
} | ||
] | ||
}, | ||
"body": { | ||
"description": "The connector sync job data.", | ||
"required": true | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
/* | ||
* Licensed to Elasticsearch B.V. under one or more contributor | ||
* license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright | ||
* ownership. Elasticsearch B.V. licenses this file to you under | ||
* the Apache License, Version 2.0 (the "License"); you may | ||
* not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
import { Id } from '@_types/common' | ||
import { long } from '@_types/Numeric' | ||
import { Dictionary } from '@spec_utils/Dictionary' | ||
import { UserDefinedValue } from '@spec_utils/UserDefinedValue' | ||
import { | ||
ConnectorConfiguration, | ||
FilteringConfig, | ||
IngestPipelineParams, | ||
SyncStatus | ||
} from '../../connector/_types/Connector' | ||
|
||
interface SyncJobConnectorReference { | ||
configuration: ConnectorConfiguration | ||
filtering: FilteringConfig | ||
id: Id | ||
index_name: string | ||
language?: string | ||
pipeline: IngestPipelineParams | ||
service_type: string | ||
} | ||
|
||
enum SyncJobType { | ||
full, | ||
incremental, | ||
access_control | ||
} | ||
|
||
enum TriggerMethod { | ||
on_demand, | ||
scheduled | ||
} | ||
|
||
export interface ConnectorSyncJob { | ||
cancelation_requested_at?: string | ||
jedrazb marked this conversation as resolved.
Show resolved
Hide resolved
|
||
canceled_at?: string | ||
completed_at?: string | ||
connector: SyncJobConnectorReference | ||
created_at: string | ||
deleted_document_count: long | ||
error?: string | ||
id: Id | ||
indexed_document_count: long | ||
indexed_document_volume: long | ||
job_type: SyncJobType | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same for trigger_method There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What I mean is, in this class There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ahh I see what you mean! For If the usage of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thanks :) I think it's more coherent this way from the clients perspective, to always provide enums where there's fixed values There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I addressed that feedback in the updated PR :) |
||
last_seen?: string | ||
metadata: Dictionary<string, UserDefinedValue> | ||
started_at?: string | ||
status: SyncStatus | ||
total_document_count?: long | ||
jedrazb marked this conversation as resolved.
Show resolved
Hide resolved
|
||
trigger_method: TriggerMethod | ||
worker_hostname?: string | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* Licensed to Elasticsearch B.V. under one or more contributor | ||
* license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright | ||
* ownership. Elasticsearch B.V. licenses this file to you under | ||
* the Apache License, Version 2.0 (the "License"); you may | ||
* not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
import { RequestBase } from '@_types/Base' | ||
import { Id } from '@_types/common' | ||
|
||
/** | ||
* Cancels a connector sync job. | ||
* @rest_spec_name connector_sync_job.cancel | ||
* @availability stack since=8.12.0 stability=experimental | ||
* @availability serverless stability=experimental visibility=public | ||
* @doc_id connector-sync-job-cancel | ||
*/ | ||
export interface Request extends RequestBase { | ||
path_parts: { | ||
/** | ||
* The unique identifier of the connector sync job | ||
*/ | ||
connector_sync_job_id: Id | ||
} | ||
} |
Uh oh!
There was an error while loading. Please reload this page.