Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,300,000
Community Members
 
Community Events
165
Community Groups

Confusing API behaviour when fetching a list of sprints

Edited
Bree I'm New Here May 05, 2022

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

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you