Skip to content

Commit e4d259b

Browse files
committed
Add information to the tasks object
1 parent 50abe49 commit e4d259b

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

reference/api/tasks.mdx

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,49 @@ The `details` object is set to `null` for `snapshotCreation` tasks.
187187
| **`type`** | The [error type](/reference/errors/overview#errors) |
188188
| **`link`** | A link to the relevant section of the documentation |
189189

190+
### `network`
191+
192+
<NoticeTag type="experimental" label="experimental" />
193+
194+
**Type**: Object<br />
195+
**Description**: If the task was replicated from another remote or to other remotes, `network` will contain information about the remote task uids corresponding to this task. Otherwise, missing in task object.
196+
197+
`network` either has a single key that is either `origin` or `remotes`.
198+
199+
| Name | Description |
200+
| :-------------| :----------------------------------------------------------------------|
201+
| **`origin`** | The task and remote from which this task was replicated **from** |
202+
| **`remotes`** | This task was replicated **to** these tasks and remotes |
203+
204+
`origin` is itself an object with keys:
205+
206+
| Name | Description |
207+
| :--------------- | :--------------------------------------------|
208+
| **`remoteName`** | The name of the [remote](/reference/api/network) |
209+
| **`taskUid`** | The uid of the task of origin |
210+
211+
`remotes` is itself an object whose keys are the [remotes](/reference/api/network) and values an object with a single key that is either `task_uid` or `error`:
212+
213+
| Name | Description |
214+
| :------------- | :---------------------------------------------------------------------------------------------|
215+
| **`task_uid`** | The uid of the replicated task |
216+
| **`error`** | A human-readable error message indicating why the task could not be replicated to that remote |
217+
218+
<Note>
219+
This is an experimental feature. Use the Meilisearch Cloud UI or the experimental features endpoint to activate it:
220+
221+
```sh
222+
curl \
223+
-X PATCH 'MEILISEARCH_URL/experimental-features/' \
224+
-H 'Content-Type: application/json' \
225+
--data-binary '{
226+
"network": true
227+
}'
228+
```
229+
</Note>
230+
231+
232+
190233
### `duration`
191234

192235
**Type**: String<br />

0 commit comments

Comments
 (0)