REST API command to find the next available work item ID (or the highest used ID)?
I need a single HTTP command to return data that includes the next available work item ID or highest used ID for the currently logged-in repository.
showing 5 of 8
show 3 more comments
|
Be the first one to answer this question!
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.
Comments
Just for interest's sake, what would you use that information for?
and not to be a downer, but I don't think that info is available. query for the highest is by project area, not server wide. and could change instantaneously anyhow.
"for x := 1 to maxworkitemid do..."
Sam, what is the query by project area?
Note that the work item ID's are unique across the entire repository ... not per project area. So if a work item in some project area is number 15347, then that is the only work item in the repository that can have that ID.
I know that, but I'll take any query I can get right now that gives me a reasonably close number. :) I am not looking for an available number to create, just a max number for testing the data. I could even overshoot and be ok, but the more I overshoot, the longer it will take to run the report.
you could query all the workitems in a project, sorted by id, highest to lowest. set the pagesize small, get the first page full and take the first.
https://jazz.net/forum/questions/146268/best-way-to-check-for-bad-links-via-the-rest-api
:)