YouTrack Standalone 2018.3 Help

Operations with a Sprint

Resource

/api/agiles/<boardID>/sprints/<sprintID>

Returned entity

Sprint. For details, see the Supported Fields.

Supported methods

Sub-resources

Supported Fields

Field

Type

Description

agile

Agile

An entity that contains attributes of the agile board configuration to which the specified sprint belongs.

archived

Boolean

When true, the sprint is archived. Otherwise, the sprint is active. By default, false.

finish

Long

Timestamp of the moment when the sprint ends.

goal

String

A goal of the sprint.

isDefault

Boolean

When true, the sprint is considered a default sprint of the agile board. Any time you add a card to the board without providing a particular sprint, a card is added automatically to a default sprint. By default, false.

issues

Issue

A collection of issues assigned to the sprint.

name

String

A name of the sprint. A mandatory parameter that is required to create a sprint.

previousSprint

Sprint

An entity that contains attributes of a sprint that is considered as the previous one.

start

Long

A timestamp of the moment when the sprint starts.

unresolvedIssuesCount

Int

A number of issues in an unresolved state that are assigned to the sprint.

id

String

An entity ID of the sprint.

Read a Sprint of an Agile Board

Get a sprint with a specific ID.

Request syntax:

GET <YouTrack baseURL>/api/agiles/<boardID>/sprints/<sprintID>?{fields}

Request parameters:

Parameter

Type

Description

<YouTrack baseURL>

string

The baseURL of your YouTrack service.

<boardID>

string

Unique ID of the agile board in the YouTrack service.

<sprintID>

string

An entity ID of the sprint to get.

fields

string

Optional list of fields to return in the response.

Sample request:

curl -X GET \ 'https://example.myjetbrains.com/youtrack/api/agiles/108-4/sprints/109-8?fields=id,archived,start,finish,goal,isDefault,name,previousSprint%28finish,name,id%29,unresolvedIssuesCount' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -H 'cache-control: no-cache'

Sample response body:

{ "start": 1541372400000, "goal": "Prepare the bug-fix release", "finish": 1542582000000, "archived": false, "unresolvedIssuesCount": 0, "previousSprint": null, "name": "Sprint 3: Bug-fix release", "isDefault": false, "id": "109-8" }

Update a Sprint

Update a sprint with a specific ID.

Request syntax:

POST <YouTrack baseURL>/api/agiles/<boardID>/sprints/<sprintID>?{fields}

Request parameters:

Parameter

Type

Description

<YouTrack baseURL>

string

The baseURL of your YouTrack service.

<boardID>

string

Unique ID of the agile board in the YouTrack service.

<sprintID>

string

An entity ID of the sprint to update.

fields

string

Optional list of fields to return in the response.

Sample request:

curl -X POST \ 'https://example.myjetbrains.com/youtrack/api/agiles/108-4/sprints/109-10?fields=id,goal,isDefault,name,previousSprint%28start,finish,name,id%29,unresolvedIssuesCount' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -H 'cache-control: no-cache' \ -d '{ "goal": "Revise the list of public resources and entities", "name": "Sprint 5: Public resources revision" }'

Sample response body:

{ "goal": "Revise the list of public resources and entities", "unresolvedIssuesCount": 0, "previousSprint": null, "name": "Sprint 5: Public resources revision", "isDefault": false, "id": "109-10" }

Delete a Sprint

Delete a apecific sprint from an agile board configuration.

Request syntax:

DELETE <YouTrack baseURL>/api/agiles/<boardID>/sprints/<sprintID>

Request parameters:

Parameter

Type

Description

<YouTrack baseURL>

string

The baseURL of your YouTrack service.

<boardID>

string

Unique ID of the agile board in the YouTrack service.

<sprintID>

string

An entity ID of the sprint to get.

Sample request:

curl -X DELETE \ https://example.myjetbrains.com/youtrack/api/agiles/108-4/sprints/109-11 \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -H 'cache-control: no-cache'
Last modified: 7 March 2019