# Operations with Specific Sprint

This resource lets you work with sprints of the specific agile board.
|  Resource  |     ```GENERIC /api/agiles/{agileID}/sprints/{sprintID} ```    |
| --- | --- |
|  Returned entity  |  [Sprint](api-entity-Sprint.html). For the description of the entity attributes, see [Supported Fields](#Sprint-supported-fields) section.  |
|  Supported methods  |      * `GET`: [Read a Specific Sprint](#get-Sprint-method).    * `DELETE`: [Delete a Specific Sprint](#delete-Sprint-method).    * `POST`: [Update a Specific Sprint](#update-Sprint-method).    |

## Sprint attributes

Represents a sprint that is associated with an agile board. Each sprint can include issues from one or more projects.

### Related Resources

Below you can find the list of resources that let you work with this entity.

* [Sprints](resource-api-agiles-agileID-sprints.html)

* [Issue Sprints](resource-api-issues-issueID-sprints.html)

### Attributes

This table describes attributes of the `Sprint` entity.

* To receive an attribute in the response from the server, specify it explicitly in the `fields` request parameter.

* To update an attribute, provide it in the body of a POST request.

|  Field  |  Type  |  Description  |
| --- | --- | --- |
|  id  |  String  |  The ID of the sprint. `Read-only`.  |
|  agile  |  [Agile](api-entity-Agile.html)  |  The agile board that the sprint belongs to. `Read-only`. `Can be null`.  |
|  name  |  String  |  Name of the sprint.  |
|  goal  |  String  |  Goal of the sprint. `Can be null`.  |
|  start  |  Long  |  The timestamp in milliseconds indicating the start date of the sprint. Stored as a unix timestamp at UTC. `Can be null`.  |
|  finish  |  Long  |  The timestamp in milliseconds indicating the end date of the sprint. Stored as a unix timestamp at UTC. `Can be null`.  |
|  archived  |  Boolean  |  Indicates whether the sprint is archived.  |
|  isDefault  |  Boolean  |  If `true`, then new issues that match a column on this board are automatically added to this sprint.  |
|  issues  |  [Array of Issues](api-entity-Issue.html)  |  Issues that are present on this sprint.  |
|  unresolvedIssuesCount  |  Int  |  Number of unresolved issues on this sprint. `Read-only`.  |
|  previousSprint  |  [Sprint](api-entity-Sprint.html)  |  If you provide this attribute when you create a new sprint, then all unresolved issues from this sprint will be moved to the newly created sprint.  |

## Read a Specific Sprint

Get settings of the specific sprint of the agile board.

To get the current sprint of the board, use `current` instead of the sprint ID.

Sample request URI:

```PLAINTEXT
https://example.youtrack.cloud/api/agiles/108-4/sprints/current?fields=id,archived,start,finish,goal,isDefault,name,previousSprint(finish,name,id),unresolvedIssuesCount
```

### Required permissions

The user must have permissions to read the board.

### Request syntax

```GENERIC
GET /api/agiles/{agileID}/sprints/{sprintID}?{fields}
```

|  {sprintID}  |  Database ID of the sprint.  |
| --- | --- |

### Request parameters

|  Parameter  |  Type  |  Description  |
| --- | --- | --- |
|  fields  |  String  |  A list of Sprint attributes that should be returned in the response. If no field is specified, only the `entityID` is returned.  |

### Sample

#### Sample request

```CURL
https://example.youtrack.cloud/api/agiles/108-4/sprints/109-8?fields=id,archived,start,finish,goal,isDefault,name,previousSprint(finish,name,id),unresolvedIssuesCount
```

#### Sample response body

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

## Delete a Specific Sprint

Delete the specific sprint from agile board.

### Required permissions

The user must have permissions to update the board.

### Request syntax

```GENERIC
DELETE /api/agiles/{agileID}/sprints/{sprintID}
```

|  {sprintID}  |  Database ID of the sprint.  |
| --- | --- |

### Request parameters

|  Parameter  |  Type  |  Description  |
| --- | --- | --- |
|  fields  |  String  |  A list of Sprint attributes that should be returned in the response. If no field is specified, only the `entityID` is returned.  |

### Sample

#### Sample request

```CURL
https://example.youtrack.cloud/api/agiles/108-4/sprints/109-23
```

## Update a Specific Sprint

Update the specific sprint of the agile board.

To update the current sprint of the board, use `current` instead of the sprint ID.

Sample request URI:

`https://example.youtrack.cloud/api/agiles/108-4/sprints/current?fields=id,archived,start,finish,goal,isDefault,name,previousSprint(finish,name,id),unresolvedIssuesCount`

### Required permissions

The user must have permissions to update the board.

### Request syntax

```GENERIC
POST /api/agiles/{agileID}/sprints/{sprintID}?{fields}
```

|  {sprintID}  |  Database ID of the sprint.  |
| --- | --- |

### Request parameters

|  Parameter  |  Type  |  Description  |
| --- | --- | --- |
|  fields  |  String  |  A list of Sprint attributes that should be returned in the response. If no field is specified, only the `entityID` is returned.  |

### Sample

#### Sample request

```CURL
https://example.youtrack.cloud/api/agiles/108-4/sprints/109-10?fields=id,goal,isDefault,start,finish,name,previousSprint(start,finish,name,id),unresolvedIssuesCount
```

#### Sample request body

```JSON
{
  "goal": "Revise the list of public resources and entities",
  "name": "Sprint 5: Public resources revision",
  "start": 1569880800000,
  "finish": 1572476400000
}
```

#### Sample response body

```JSON
{
  "isDefault": false,
  "start": 1569880800000,
  "unresolvedIssuesCount": 0,
  "previousSprint": null,
  "finish": 1572476400000,
  "goal": "Revise the list of public resources and entities",
  "name": "Sprint 5: Public resources revision",
  "id": "109-10",
  "$type": "Sprint"
}
```

