Ver Fonte

[Connectors API] Add delete connector sync job docs (#103407)

Add delete connector sync job API endpoint documentation.
Tim Grein há 1 ano atrás
pai
commit
0d6d21c813

+ 2 - 1
docs/reference/connector/apis/connector-apis.asciidoc

@@ -37,12 +37,13 @@ You can use these APIs to create, cancel, delete and update sync jobs.
 Use the following APIs to manage sync jobs:
 
 * <<create-connector-sync-job-api>>
+* <<delete-connector-sync-job-api>
 * <<list-connector-sync-jobs-api>>
 
-
 include::create-connector-api.asciidoc[]
 include::create-connector-sync-job-api.asciidoc[]
 include::delete-connector-api.asciidoc[]
+include::delete-connector-sync-job-api.asciidoc[]
 include::get-connector-api.asciidoc[]
 include::list-connectors-api.asciidoc[]
 include::list-connector-sync-jobs-api.asciidoc[]

+ 54 - 0
docs/reference/connector/apis/delete-connector-sync-job-api.asciidoc

@@ -0,0 +1,54 @@
+[[delete-connector-sync-job-api]]
+=== Delete connector sync job API
+
+preview::[]
+
+++++
+<titleabbrev>Delete connector sync job</titleabbrev>
+++++
+
+Removes a connector sync job and its associated data.
+This is a destructive action that is not recoverable.
+
+[[delete-connector-sync-job-api-request]]
+==== {api-request-title}
+
+`DELETE _connector/_sync_job/<connector_sync_job_id>`
+
+[[delete-connector-sync-job-api-prereq]]
+==== {api-prereq-title}
+
+* To sync data using connectors, it's essential to have the Elastic connectors service running.
+
+[[delete-connector-sync-job-api-path-params]]
+==== {api-path-parms-title}
+
+`<connector_sync_job_id>`::
+(Required, string)
+
+[[delete-connector-sync-job-api-response-codes]]
+==== {api-response-codes-title}
+
+`400`::
+The `connector_sync_job_id` was not provided.
+
+`404`::
+No connector sync job matching `connector_sync_job_id` could be found.
+
+[[delete-connector-sync-job-api-example]]
+==== {api-examples-title}
+
+The following example deletes the connector sync job with ID `my-connector-sync-job-id`:
+
+[source,console]
+----
+DELETE _connector/_sync_job/my-connector-sync-job-id
+----
+// TEST[skip:there's no way to clean up after this code snippet, as we don't know the ids of sync jobs ahead of time]
+
+[source,console-result]
+----
+{
+    "acknowledged": true
+}
+----