Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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.

0 votes

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. 


but they won't be sequential. 

but more importantly, why are you traipsing thru all the workitems? this is very negative behavior for a system.
 

showing 5 of 8 show 3 more comments

Be the first one to answer this question!

Register or log in to post your answer.

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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,952
× 481

Question asked: Mar 21 '14, 12:56 p.m.

Question was seen: 3,920 times

Last updated: Mar 21 '14, 2:36 p.m.

Confirmation Cancel Confirm