YouTrack Standalone 2018.3 Help

Sprints of an Agile Board

Resource

/api/agiles/<boardID>/sprints

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 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 Sprints of an Agile Board

Get a collection of sprints of a specific agile board.

Request syntax:

GET <YouTrack baseURL>/api/agiles/<boardID>/sprints?{fields}&{$skip}&{$top}

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.

fields

string

Optional list of fields to return in the response.

$skip

int

Optional. Lets you set a number of returned entities to skip before returning the first one.

$top

int

Optional. Lets you specify the maximum number of entries that are returned in the response.

Sample request:

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

Sample response body:

[ { "start": null, "goal": null, "finish": null, "archived": false, "unresolvedIssuesCount": 0, "previousSprint": null, "name": "First sprint", "isDefault": false, "id": "109-5" }, { "start": 1540159200000, "goal": "Open most requested resources", "finish": 1541372400000, "archived": false, "unresolvedIssuesCount": 0, "previousSprint": null, "name": "Sprint 2: Add more resources", "isDefault": false, "id": "109-7" } ]

Create a New Sprint

Create a new sprint for a specific agile board.

Request syntax:

POST <YouTrack baseURL>/api/agiles/<boardID>/sprints[?{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.

fields

string

Optional list of fields to return in the response.

To create a sprint, you must provide only the name attribute in the body of the POST request. Other attributes are optional.

Sample request:

curl -X POST \ 'https://example.myjetbrains.com/youtrack/api/agiles/108-4/sprints?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' \ -d '{"name":"Sprint 5: Only the name matters"}'

Sample response body:

{ "start": null, "goal": null, "finish": null, "archived": false, "unresolvedIssuesCount": 0, "previousSprint": null, "name": "Sprint 5: Only the name matters", "isDefault": false, "id": "109-10" }
Last modified: 7 March 2019