Developer Portal for YouTrack and Hub Help

Operations with Specific ProjectTimeTrackingSettings

This resource lets you configure the time tracking settings for the specific project.

Resource

/api/admin/projects/{projectID}/timeTrackingSettings

Returned entity

ProjectTimeTrackingSettings. For the description of the entity attributes, see Supported Fields section.

Supported methods

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.

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

The custom field that is used for estimation in the project. The field must be attached to the project. Can be null.

timeSpent

ProjectCustomField

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

A collection of work item types that are used in the project.

project

Project

Reference to the project, to which these settings belong to. Read-only. Can be null.

attributes

Array of WorkItemProjectAttributes

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

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

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

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

{ "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

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

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

https://example.youtrack.cloud/api/admin/projects/0-3/timeTrackingSettings?fields=enabled,estimate(field(id,name),id)

Sample request body

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

Sample response body

{ "enabled": true, "estimate": { "field": { "name": "Estimation", "id": "58-21", "$type": "CustomField" }, "id": "104-4", "$type": "PeriodProjectCustomField" }, "$type": "ProjectTimeTrackingSettings" }
Last modified: 7 November 2024