Git Product home page Git Product logo

Comments (4)

ndagrawal avatar ndagrawal commented on July 19, 2024 1
  • How many work items can I update with one PATCH request? 200.
  • What makes this better than asynchronously sending single PATCH request to update single work item one by one? As answered above by @arievs, this makes it more performant, since the round trip to database are reduced.
  • What is the recommended way of error handling when one or some of the operations in the batch update PATCH request failed (error code: 400, 307, etc.)? So you will get the error code: 500 for all the requests that have failed. You will have to parse it accordingly.

If you have 3 work items to be updated in your batch update call and if the first work item fails to update, then updates for the work items after that will fail.

Refer the section entitled "case where single request in batch api fails" in Work Item Batch Update API Doc

Thanks
Nilesh Agrawal
Software Engineer
Microsoft VSTS - Agile

from vsts-rest-api-specs.

arievs avatar arievs commented on July 19, 2024

Hello,

Thank for posting the question.

Batch update should definitely be better from performance perspective.
Can you please share some more information about the way you are running this request? What error exactly you are getting? How many fields you are updating? How large is your payload?

Thanks,
Artur Ievsieiev
Software Engineer
Microsoft VSTS - Agile

from vsts-rest-api-specs.

idiotleon avatar idiotleon commented on July 19, 2024

Thanks for your reply.

I only attempted PATCH requests with 3~5 work items. There is currently no error yet. But I want to maximize what the VSTS API can provide for me.

Actually I want to use throttle here to maximize the performance of my application. The size limit of the JSON determines how many work items one can send per PATCH request; how many work items one can send at one time determines the payload my application should deal with at one time (in my case, how many messages should I fetch and process from the corresponding service bus).

Right now my application would only update owners (GPM/GEM/PM/EM) of VSTS work items. The amount of operations involved are no more than 4 (usually 1) per VSTS work item.

By "error handling", what worries me most are situations similar with this: if I send 100 VSTS work item in one JSON file in one PATCH request (if the API is capable of handing that many) (to the BATCH update VSTS API), with 1 failed due to some reason. (According to the doc, the whole JSON would be sent back as responses), how should I parse and locate the error efficiently?

from vsts-rest-api-specs.

idiotleon avatar idiotleon commented on July 19, 2024

A little more background about my application:
My application will [For 1 team project][with help of Service Bus - Topic, Azure Storage - Table]

  1. process all VSTS work items that are both newly created and newly updated with areaPath;
  2. fetch owners according to the areaPath from the Azure Storage - Table;
  3. update with fields of owners in batch via VSTS batch update API.
    It is the last step that generated my current concern.

Till now, I do not know how many work items are created and updated with areaPath per day.

from vsts-rest-api-specs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.