Skip to content

Bulk updating documents #40

Closed

Description

@jimlambie

It is currently possible to send an array of documents to the API for creation, but not to send an array of documents to be updated.

Currently to update a document the ID must be passed in the request URL and the update query as the body.

POST /1.0/library/notices/1234 HTTP/1.1
Host: api.example.com
content-type: application/json
Authorization: Bearer 171c8c12-6e9b-47a8-be29-0524070b0c65

{ "status": "published"  }

It would be useful to allow sending an array of IDs to be updated:

POST /1.0/library/notices/1234,5678,9012,3456 HTTP/1.1
Host: api.example.com
content-type: application/json
Authorization: Bearer 171c8c12-6e9b-47a8-be29-0524070b0c65

{ "status": "published"  }

Activity

  1. added this to the 1.4.0 milestone on Mar 18, 2016
  2. jimlambie commented on Mar 18, 2016

    @jimlambie
    ContributorAuthor

    Or perhaps even better (more RESTful?):

    PUT /1.0/library/notices HTTP/1.1
    Host: api.example.com
    content-type: application/json
    Authorization: Bearer 171c8c12-6e9b-47a8-be29-0524070b0c65
    
    {
      ids: [1234,5678,9012,3456], 
      update: { "status": "published" }
    }
    
  3. vorpalhex commented on Mar 18, 2016

    @vorpalhex

    👍

  4. modified the milestones: 1.5.0, 1.4.0 on Mar 24, 2016
  5. mingard commented on Mar 29, 2016

    @mingard
    Contributor

    Worth implementing initializeOrderedBulkOp in anticipation for large scale write operations on a DB under read load?

  6. jimlambie commented on Mar 31, 2016

    @jimlambie
    ContributorAuthor

    @mingard please open a separate issue for the Bulk operations 🍰

  7. jimlambie commented on Apr 10, 2016

    @jimlambie
    ContributorAuthor

    Closed by 22950a2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions