yorkie-team/yorkie

Introduce Bulk GET REST API for retrieving multiple documents at once

devleejb opened this issue · 0 comments

What would you like to be added:
Currently, in the CodePair service, the Yorkie REST API is used to determine the modification time of documents. However, the existing Yorkie REST API only supports fetching information of specific documents individually, which results in multiple API calls when retrieving a list of documents upon entering a Workspace.

To improve this process and reduce the number of API calls, it is proposed to introduce a Bulk GET REST API.

This enhancement is inspired by the Bulk REST API provided by Kibana as referenced here:

Why is this needed:
To optimize the process of retrieving document information by enabling the fetching of multiple documents at once, thereby reducing the number of API calls required and enhancing the overall performance and user experience.

yorkie-team/codepair#173

API Definition:

  • Path: /yorkie.v1.AdminService/GetBulkDocuments
  • Request Body:
      {
          "projectName": "string", // Currently, it is not possible to determine the project based on the ProjectSecretKey
          "data": [
              // For future search scalability, create objects
              {
                "id": "string" 
              },
              {
                "id": "string"
              }
          ]
      }
  • Response Body:
    ListDocumentsResponse in admin.proto