# Operations with Specific ProjectTimeTrackingSettings

This resource lets you configure the time tracking settings for the specific project.
|  Resource  |     ```GENERIC /api/admin/projects/{projectID}/timeTrackingSettings ```    |
| --- | --- |
|  Returned entity  |  [ProjectTimeTrackingSettings](api-entity-ProjectTimeTrackingSettings.html). For the description of the entity attributes, see [Supported Fields](#ProjectTimeTrackingSettings-supported-fields) section.  |
|  Supported methods  |      * `GET`: [Read a Specific ProjectTimeTrackingSettings](#get-ProjectTimeTrackingSettings-method).    * `POST`: [Update a Specific ProjectTimeTrackingSettings](#update-ProjectTimeTrackingSettings-method).    |

## ProjectTimeTrackingSettings attributes

Represents time tracking settings of the project.

### Related Resources

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

* [Project Time Tracking Settings](resource-api-admin-projects-projectID-timeTrackingSettings.html)

### Attributes

This table describes attributes of the `ProjectTimeTrackingSettings` 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 project time tracking settings. `Read-only`.  |
|  enabled  |  Boolean  |  When `true`, the time tracking in the project is enabled. Otherwise, `false`.  |
|  estimate  |  [ProjectCustomField](api-entity-ProjectCustomField.html)  |  The custom field that is used for estimation in the project. The field must be attached to the project. `Can be null`.  |
|  timeSpent  |  [ProjectCustomField](api-entity-ProjectCustomField.html)  |  The custom field that is used for estimation in the project. The field must be attached to the project. `Can be null`.  |
|  workItemTypes  |  [Array of WorkItemTypes](api-entity-WorkItemType.html)  |  A collection of work item types that are used in the project.  |
|  project  |  [Project](api-entity-Project.html)  |  Reference to the project, to which these settings belong to. `Read-only`. `Can be null`.  |
|  attributes  |  [Array of WorkItemProjectAttributes](api-entity-WorkItemProjectAttribute.html)  |  The list of work item attributes available in this project.  |

## Read a Specific ProjectTimeTrackingSettings

Read the time tracking settings of the project.

### Required permissions

Requires permissions: Read Project Basic

### Request syntax

```GENERIC
GET /api/admin/projects/{projectID}/timeTrackingSettings?{fields}
```

|  null  |  The database ID of ProjectTimeTrackingSettings  |
| --- | --- |

### Request parameters

|  Parameter  |  Type  |  Description  |
| --- | --- | --- |
|  fields  |  String  |  A list of ProjectTimeTrackingSettings 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/admin/projects/0-3/timeTrackingSettings?fields=enabled,estimate(field(id,name),id),timeSpent(field(id,name),id),workItemTypes(id,name,autoAttached)
```

#### Sample response body

```JSON
{
  "enabled": true,
  "workItemTypes": [
    {
      "name": "Development",
      "autoAttached": true,
      "id": "65-0",
      "$type": "WorkItemType"
    },
    {
      "name": "Testing",
      "autoAttached": true,
      "id": "65-1",
      "$type": "WorkItemType"
    },
    {
      "name": "Documentation",
      "autoAttached": false,
      "id": "65-2",
      "$type": "WorkItemType"
    }
  ],
  "estimate": null,
  "timeSpent": {
    "field": {
      "name": "Spent time",
      "id": "58-10",
      "$type": "CustomField"
    },
    "id": "104-1",
    "$type": "PeriodProjectCustomField"
  },
  "$type": "ProjectTimeTrackingSettings"
}
```

## Update a Specific ProjectTimeTrackingSettings

Update the time tracking settings of the project.

### Required permissions

Requires permissions: Update Project

### Request syntax

```GENERIC
POST /api/admin/projects/{projectID}/timeTrackingSettings?{fields}
```

|  null  |  The database ID of ProjectTimeTrackingSettings  |
| --- | --- |

### Request parameters

|  Parameter  |  Type  |  Description  |
| --- | --- | --- |
|  fields  |  String  |  A list of ProjectTimeTrackingSettings 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/admin/projects/0-3/timeTrackingSettings?fields=enabled,estimate(field(id,name),id)
```

#### Sample request body

```JSON
{
  "estimate": {
    "field": {
      "id": "58-21"
    },
    "id": "104-4"
  }
}
```

#### Sample response body

```JSON
{
  "enabled": true,
  "estimate": {
    "field": {
      "name": "Estimation",
      "id": "58-21",
      "$type": "CustomField"
    },
    "id": "104-4",
    "$type": "PeriodProjectCustomField"
  },
  "$type": "ProjectTimeTrackingSettings"
}
```

