File tree 6 files changed +151
-25
lines changed
tests/CTS/requests/ingestion
6 files changed +151
-25
lines changed Original file line number Diff line number Diff line change @@ -83,3 +83,11 @@ orderKeys:
83
83
description : Ascending or descending sort order.
84
84
default : desc
85
85
enum : [asc, desc]
86
+
87
+ watch :
88
+ name : watch
89
+ in : query
90
+ description : When provided, the push operation will be synchronous and the API will wait for the ingestion to be finished before responding.
91
+ required : false
92
+ schema :
93
+ type : boolean
Original file line number Diff line number Diff line change @@ -606,3 +606,24 @@ Policies:
606
606
type : integer
607
607
minimum : 1
608
608
maximum : 10
609
+
610
+ PushTaskPayload :
611
+ title : pushTaskPayload
612
+ type : object
613
+ properties :
614
+ action :
615
+ $ref : ' ../../../common/schemas/Batch.yml#/action'
616
+ records :
617
+ type : array
618
+ items :
619
+ title : pushTaskRecords
620
+ type : object
621
+ additionalProperties : true
622
+ required :
623
+ - objectID
624
+ properties :
625
+ objectID :
626
+ $ref : ' ../../../common/parameters.yml#/objectID'
627
+ required :
628
+ - action
629
+ - records
Original file line number Diff line number Diff line change
1
+ post :
2
+ summary : Push a `batch` request payload through the Pipeline
3
+ description : Push a `batch` request payload through the Pipeline. You can check the status of your request with the observability endpoints.
4
+ operationId : push
5
+ x-acl :
6
+ - addObject
7
+ - deleteIndex
8
+ - editSettings
9
+ x-timeouts :
10
+ connect : 180000
11
+ read : 180000
12
+ write : 180000
13
+ parameters :
14
+ - $ref : ' ../../common/parameters.yml#/IndexName'
15
+ - $ref : ' ../common/parameters.yml#/watch'
16
+ requestBody :
17
+ description : Request body of a Search API `batch` request that will be pushed in the Connectors pipeline.
18
+ content :
19
+ application/json :
20
+ schema :
21
+ $ref : ' ../common/schemas/task.yml#/PushTaskPayload'
22
+ required : true
23
+ responses :
24
+ ' 200 ' :
25
+ description : OK
26
+ content :
27
+ application/json :
28
+ schema :
29
+ $ref : ' ../common/schemas/common.yml#/WatchResponse'
30
+ ' 400 ' :
31
+ $ref : ' ../../common/responses/BadRequest.yml'
Original file line number Diff line number Diff line change @@ -14,36 +14,13 @@ post:
14
14
write : 180000
15
15
parameters :
16
16
- $ref : ' ../../../common/parameters.yml#/pathTaskID'
17
- - name : watch
18
- in : query
19
- description : When provided, the push operation will be synchronous and the API will wait for the ingestion to be finished before responding.
20
- required : false
21
- schema :
22
- type : boolean
17
+ - $ref : ' ../../../common/parameters.yml#/watch'
23
18
requestBody :
24
19
description : Request body of a Search API `batch` request that will be pushed in the Connectors pipeline.
25
20
content :
26
21
application/json :
27
22
schema :
28
- title : pushTaskPayload
29
- type : object
30
- properties :
31
- action :
32
- $ref : ' ../../../../common/schemas/Batch.yml#/action'
33
- records :
34
- type : array
35
- items :
36
- title : pushTaskRecords
37
- type : object
38
- additionalProperties : true
39
- required :
40
- - objectID
41
- properties :
42
- objectID :
43
- $ref : ' ../../../../common/parameters.yml#/objectID'
44
- required :
45
- - action
46
- - records
23
+ $ref : ' ../../../common/schemas/task.yml#/PushTaskPayload'
47
24
required : true
48
25
responses :
49
26
' 200 ' :
Original file line number Diff line number Diff line change @@ -112,6 +112,9 @@ paths:
112
112
/{path} :
113
113
$ref : ' ../common/paths/customRequest.yml'
114
114
115
+ /1/push/{indexName} :
116
+ $ref : ' paths/push.yml'
117
+
115
118
# authentications API.
116
119
/1/authentications :
117
120
$ref : ' paths/authentications/authentications.yml'
Original file line number Diff line number Diff line change
1
+ [
2
+ {
3
+ "testName" : " global push" ,
4
+ "parameters" : {
5
+ "indexName" : " foo" ,
6
+ "pushTaskPayload" : {
7
+ "action" : " addObject" ,
8
+ "records" : [
9
+ {
10
+ "key" : " bar" ,
11
+ "foo" : " 1" ,
12
+ "objectID" : " o"
13
+ },
14
+ {
15
+ "key" : " baz" ,
16
+ "foo" : " 2" ,
17
+ "objectID" : " k"
18
+ }
19
+ ]
20
+ }
21
+ },
22
+ "request" : {
23
+ "path" : " /1/push/foo" ,
24
+ "method" : " POST" ,
25
+ "body" : {
26
+ "action" : " addObject" ,
27
+ "records" : [
28
+ {
29
+ "key" : " bar" ,
30
+ "foo" : " 1" ,
31
+ "objectID" : " o"
32
+ },
33
+ {
34
+ "key" : " baz" ,
35
+ "foo" : " 2" ,
36
+ "objectID" : " k"
37
+ }
38
+ ]
39
+ }
40
+ }
41
+ },
42
+ {
43
+ "testName" : " global push with watch mode" ,
44
+ "parameters" : {
45
+ "indexName" : " bar" ,
46
+ "pushTaskPayload" : {
47
+ "action" : " addObject" ,
48
+ "records" : [
49
+ {
50
+ "key" : " bar" ,
51
+ "foo" : " 1" ,
52
+ "objectID" : " o"
53
+ },
54
+ {
55
+ "key" : " baz" ,
56
+ "foo" : " 2" ,
57
+ "objectID" : " k"
58
+ }
59
+ ]
60
+ },
61
+ "watch" : true
62
+ },
63
+ "request" : {
64
+ "path" : " /1/push/bar" ,
65
+ "method" : " POST" ,
66
+ "queryParameters" : {
67
+ "watch" : " true"
68
+ },
69
+ "body" : {
70
+ "action" : " addObject" ,
71
+ "records" : [
72
+ {
73
+ "key" : " bar" ,
74
+ "foo" : " 1" ,
75
+ "objectID" : " o"
76
+ },
77
+ {
78
+ "key" : " baz" ,
79
+ "foo" : " 2" ,
80
+ "objectID" : " k"
81
+ }
82
+ ]
83
+ }
84
+ }
85
+ }
86
+ ]
You can’t perform that action at this time.
0 commit comments