Skip to content

Commit f4be9c1

Browse files
committed
feat(specs): add watch to pushTask ingestion
1 parent de3180e commit f4be9c1

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

specs/ingestion/paths/tasks/v2/pushTask.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ post:
1010
- editSettings
1111
parameters:
1212
- $ref: '../../../common/parameters.yml#/pathTaskID'
13+
- name: watch
14+
in: query
15+
description: When provided, the push operation will be synchronous and the API will wait for the ingestion to be finished before responding.
16+
required: false
17+
schema:
18+
type: boolean
1319
requestBody:
1420
description: Request body of a Search API `batch` request that will be pushed in the Connectors pipeline.
1521
content:

tests/CTS/requests/ingestion/pushTask.json

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,46 @@
3737
]
3838
}
3939
}
40+
},
41+
{
42+
"testName": "allows for watch query parameter",
43+
"parameters": {
44+
"taskID": "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
45+
"watch": true,
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+
},
62+
"request": {
63+
"path": "/2/tasks/6c02aeb1-775e-418e-870b-1faccd4b2c0f/push?watch=true",
64+
"method": "POST",
65+
"body": {
66+
"action": "addObject",
67+
"records": [
68+
{
69+
"key": "bar",
70+
"foo": "1",
71+
"objectID": "o"
72+
},
73+
{
74+
"key": "baz",
75+
"foo": "2",
76+
"objectID": "k"
77+
}
78+
]
79+
}
80+
}
4081
}
4182
]

0 commit comments

Comments
 (0)