How to retrieve sprint velocity and story points from Jira REST API

I’m building a command line tool in Java that needs to pull scrum metrics from Jira using their REST API. I can’t figure out which endpoint gives me the committed vs delivered story points for finished sprints.

I’ve been looking through the documentation but nothing seems to return velocity chart data or the breakdown of what was planned versus what actually got done in each sprint.

Currently I’m making basic HTTP requests with username/password authentication. Does anyone know the specific API call I need to make to get this sprint performance data? I just need the story point totals for completed sprints.

Use the Agile REST API endpoints to get what you need. Hit /rest/agile/1.0/sprint/{sprintId}/issue for sprint issues - this lets you pull story points from the custom field (usually customfield_10004, but depends on your setup). For velocity charts, use /rest/greenhopper/1.0/rapid/charts/velocity?rapidViewId={boardId}. I’d grab sprint details first with /rest/agile/1.0/board/{boardId}/sprint. You’ll need to compare what was committed at sprint start vs. what actually got done by the end. Make sure your API tokens have the right permissions - velocity data access is often restricted.

While the greenhopper endpoints can work, they often lack documentation and may cease to function without notice, which happened to me last year. A more stable approach is to use the documented Agile API calls. First, get the sprint details with /rest/agile/1.0/board/{boardId}/sprint and then retrieve the issues for completed sprints using /rest/agile/1.0/sprint/{sprintId}/issue. To determine committed versus delivered story points, you will need to access issue history or sprint report data. Typically, story points are found in a field like customfield_10002, but this can vary, so it’s wise to check with /rest/api/2/field for your specific setup. Although this involves more API calls, it ensures you have accurate data for calculating velocity.

yeah, the /rest/greenhopper/1.0/rapid/charts/velocity endpoint should do the trick. just make sure you have the rapidview ID. had luck with it while pulling sprint info recently. also check permissions based on your JIRA config.