Updates

The updates route gives information about the progress of the asynchronous processes.

Get an update status

GET

  1. /indexes/:index_uid/updates/:updateId

Get the status of an update in a given index.

Path variables

VariableDescription
index_uidThe index UID
updateIdThe update identifier

Example

cURL

JavaScript

Python

PHP

Ruby

Go

Rust

  1. curl \
  2. -X GET 'http://localhost:7700/indexes/movies/updates/1'
  1. client.index('movies').getUpdateStatus(1)
  1. client.index('movies').get_update_status(1)
  1. $client->index('movies')->getUpdateStatus(1);
  1. client.index('movies').get_update_status(1)
  1. client.Index("movies").GetUpdateStatus(1)
  1. // You can get the status of a `Progress` object:
  2. let status: Status = progress.get_status().await.unwrap();
  3. // Or you can use index to get an update status using its `update_id`:
  4. let status: Status = index.get_update(1).await.unwrap();

Response: 200 Ok

Here is an example response representing an update that has already been processed.

  1. {
  2. "status": "processed",
  3. "updateId": 1,
  4. "type": {
  5. "name": "DocumentsAddition",
  6. "number": 4
  7. },
  8. "duration": 0.076980613,
  9. "enqueuedAt": "2019-12-07T21:16:09.623944Z",
  10. "processedAt": "2019-12-07T21:16:09.703509Z"
  11. }

Get all update status

GET

  1. /indexes/:index_uid/updates

Get the status of all updates in a given index.

Path variables

VariableDescription
index_uidThe index UID

Example

cURL

JavaScript

Python

PHP

Ruby

Go

Rust

  1. curl \
  2. -X GET 'http://localhost:7700/indexes/movies/updates'
  1. client.index('movies').getAllUpdateStatus()
  1. client.index('movies').get_all_update_status()
  1. $client->index('movies')->getAllUpdateStatus();
  1. client.index('movies').get_all_update_status
  1. client.Index("movies").GetAllUpdateStatus()
  1. let status: Vec<ProgressStatus> = index.get_all_updates().await.unwrap();

Response: 200 Ok

Here is an example response representing an enqueued update.

  1. [
  2. {
  3. "status": "enqueued",
  4. "updateId": 0,
  5. "type": {
  6. "name": "DocumentsAddition",
  7. "number": 30
  8. },
  9. "enqueuedAt": "2021-02-14T14:07:09.364505700Z"
  10. }
  11. ]