Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Confusing API behaviour when fetching a list of sprints

Bree
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 5, 2022 edited

Greetings, 

We use: Atlassian Jira Project Management Software (v8.20.8#820008-sha1:881997c) 

We have an issue with inconsistent behaviour when calling the API of Jira. 

We try to send requests to the endpoint

`/rest/greenhopper/1.0/integration/teamcalendars/sprint/list`

To retrieve a list of sprints.  

 

 

Request 1: 

```

curl -H "Authorization: Bearer $JIRA_TOKEN" "https://jira.example.com/rest/greenhopper/1.0/integration/teamcalendars/sprint/list?jql=project=13480"    

```

 

Returns: 

```

{
"errorMessages": [
"Sprint doesn't exist."
],
"errors": {}
}

```

 

Request 2: 

```

curl -H "Authorization: Bearer $JIRA_TOKEN" "https://jira.example.com/rest/greenhopper/1.0/integration/teamcalendars/sprint/list?jql=project=13480+and+Sprint+not+in+closedSprints()"

```

 

Returns: 

```

{
"jodaTimeZoneId": "Europe/Berlin",
"sprints": [
{
"id": 8566,
"start": "28042022075600",
"end": "11052022075600",
"name": "xxxxxxxxxxxxxxxxxxx",
"closed": false,
"editable": true,
"projects": [
{
"key": "xxxxxxxxxxxxx",
"name": "xxxxxxxxxxxxxxxxxxxx"
}
],
"viewBoardsUrl": "https://jira.example.com/secure/GHGoToBoard.jspa?sprintId=8566"
}
]
}

```

 

 

For other projects  a  JQL query `?jql=project=<ID>`  just works fine. 

Does anyone have an Idea why the behviour is that strange? 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, team ’25 europe, early bird extension, conference discount, barcelona, hybrid event, AI teamwork, early bird pass, digital access, collaboration conference, atlassian events, register now, developer conference

1 week left to save on your Team '25 Europe pass

Still thinking about joining us for Team '25 Europe? Early bird has been extended for just one week! Now’s the time to lock in your lowest rate. Use code TEU25COMM-20 to save 20% at checkout. Hurry, this only lasts for 1 more week.

Learn more
AUG Leaders

Atlassian Community Events