YouTrack InCloud 2018.3 Help

Issues of a Sprint

This endpoint lets you perform basic operations with cards: read issues on a board, add them to a sprint, or remove them.

Resource

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

Returned entity

Issue. For details, see the Supported Fields section of the Issues description.

Supported methods

Read Issues of a Sprint

Get a list of issues that are assigned to a sprint with a specific ID.

Request syntax:

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

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 entity attributes 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/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" }

Add an Issue to a Sprint

Add an issue with a specific ID to a specific sprint.

Request syntax:

POST <YouTrack baseURL>/api/agiles/<boardID>/sprints/<sprintID>/issues?{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 entity attributes to return in the response.

To add an existing issue to a specific sprint, you must provide an entity ID, "id" of the issue in the body of the POST request.

Sample request:

curl -X POST \ 'https://example.myjetbrains.com/youtrack/api/agiles/108-4/sprints/109-7/issues?fields=reporter%28login,name%29,idReadable,id,project%28id,name,leader%28login,name%29%29,summary,description' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -H 'cache-control: no-cache' \ -d '{"id":"2-30"}'

Sample response body:

{ "description": "This issue relates to an issue created with the rest api.", "project": { "leader": { "login": "root", "name": "John Smith" }, "name": "Sample Project", "id": "0-0" }, "summary": "This issue relates to a rest api issue", "reporter": { "login": "john.doe", "name": "John Doe" }, "idReadable": "SP-31", "id": "2-30" }

Remove an Issue from a Sprint

Delete a apecific sprint from an agile board configuration.

Request syntax:

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

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.

<issueID>

string

An entity ID of the issue to remove from the sprint.

Sample request:

curl -X DELETE \ https://example.myjetbrains.com/youtrack/api/agiles/108-4/sprints/109-7/issues/2-30 \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -H 'cache-control: no-cache'
Last modified: 16 November 2018