Skip to content

Commit ebdc0eb

Browse files
committed
Add connector API examples
1 parent 16be4de commit ebdc0eb

20 files changed

+135
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# summary: connector/apis/update-connector-last-sync-api.asciidoc:115
2+
# method_request: PUT _connector/my-connector/_last_sync
3+
# description: ''
4+
# type: request
5+
value: "{\n \"last_access_control_sync_error\": \"Houston, we have a problem!\"\
6+
,\n \"last_access_control_sync_scheduled_at\": \"2023-11-09T15:13:08.231Z\",\n\
7+
\ \"last_access_control_sync_status\": \"pending\",\n \"last_deleted_document_count\"\
8+
: 42,\n \"last_incremental_sync_scheduled_at\": \"2023-11-09T15:13:08.231Z\"\
9+
,\n \"last_indexed_document_count\": 42,\n \"last_sync_error\": \"Houston,\
10+
\ we have a problem!\",\n \"last_sync_scheduled_at\": \"2024-11-09T15:13:08.231Z\"\
11+
,\n \"last_sync_status\": \"completed\",\n \"last_synced\": \"2024-11-09T15:13:08.231Z\"\
12+
\n}"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# summary: connector/apis/create-connector-api.asciidoc:20
2+
# method_request: PUT _connector/my-connector
3+
# description: ''
4+
# type: request
5+
value: "{\n \"index_name\": \"search-google-drive\",\n \"name\": \"My Connector\"\
6+
,\n \"service_type\": \"google_drive\"\n}"
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# summary: connector/apis/create-connector-api.asciidoc:111
2+
# method_request: PUT _connector/my-connector
3+
# description: ''
4+
# type: request
5+
value: "{\n \"index_name\": \"search-google-drive\",\n \"name\": \"My Connector\"\
6+
,\n \"description\": \"My Connector to sync data to Elastic index from Google Drive\"\
7+
,\n \"service_type\": \"google_drive\",\n \"language\": \"english\"\n}"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# summary: connector/apis/set-connector-sync-job-error-api.asciidoc:56
2+
# method_request: PUT _connector/_sync_job/my-connector-sync-job/_error
3+
# description: ''
4+
# type: request
5+
value: "{\n \"error\": \"some-error\"\n}"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# summary: connector/apis/create-connector-sync-job-api.asciidoc:15
2+
# method_request: POST _connector/_sync_job
3+
# description: ''
4+
# type: request
5+
value: "{\n \"id\": \"connector-id\",\n \"job_type\": \"full\",\n \"trigger_method\"\
6+
: \"on_demand\"\n}"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# summary: connector/apis/update-connector-api-key-id-api.asciidoc:86
2+
# method_request: PUT _connector/my-connector/_api_key_id
3+
# description: ''
4+
# type: request
5+
value: "{\n \"api_key_id\": \"my-api-key-id\",\n \"api_key_secret_id\": \"my-connector-secret-id\"\
6+
\n}"
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# summary: connector/apis/update-connector-configuration-api.asciidoc:308
2+
# method_request: PUT _connector/my-spo-connector/_configuration
3+
# description: ''
4+
# type: request
5+
value: "{\n \"values\": {\n \"tenant_id\": \"my-tenant-id\",\n \"\
6+
tenant_name\": \"my-sharepoint-site\",\n \"client_id\": \"foo\",\n \
7+
\ \"secret_value\": \"bar\",\n \"site_collections\": \"*\"\n }\n}"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# summary: connector/apis/update-connector-configuration-api.asciidoc:335
2+
# method_request: PUT _connector/my-spo-connector/_configuration
3+
# description: ''
4+
# type: request
5+
value: "{\n \"values\": {\n \"secret_value\": \"foo-bar\"\n }\n}"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# summary: connector/apis/update-connector-error-api.asciidoc:75
2+
# method_request: PUT _connector/my-connector/_error
3+
# description: ''
4+
# type: request
5+
value: "{\n \"error\": \"Houston, we have a problem!\"\n}"
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# summary: connector/apis/update-connector-features-api.asciidoc:90
2+
# method_request: PUT _connector/my-connector/_features
3+
# description: ''
4+
# type: request
5+
value: "{\n \"features\": {\n \"document_level_security\": {\n \"enabled\"\
6+
: true\n },\n \"incremental_sync\": {\n \"enabled\": true\n },\n \
7+
\ \"sync_rules\": {\n \"advanced\": {\n \"enabled\": false\n \
8+
\ },\n \"basic\": {\n \"enabled\": true\n }\n }\n }\n}"

0 commit comments

Comments
 (0)