YouTrack Standalone 2020.3 Help

Operations with Specific WorkTimeSettings

This resource lets you configure the system-wide work time settings.

Resource

/api/admin/timeTrackingSettings/workTimeSettings

Returned entity

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

Supported methods

WorkTimeSettings attributes

Work schedule settings.

This table describes attributes of the WorkTimeSettings entity.

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

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

Field

Type

Description

minutesADay

Int

Number of minutes per working day. For example, for an 8-hour day, it would be 480.

workDays

Array of Ints

The indexes of the days of the week that are counted as working days. Sunday's index is 0, Monday's index is 1 and so on.

firstDayOfWeek

Int

Index of the first day of week. It depends on server locale. Read-only.

daysAWeek

Int

Number of working days a week. Read-only.

Read a Specific WorkTimeSettings

Read the system work time settings.

Required permissions

Requires Read Work Item permission.

Request syntax

GET /api/admin/timeTrackingSettings/workTimeSettings?{fields}

Request parameters

Parameter

Type

Description

fields

String

A list of WorkTimeSettings attributes that should be returned in the response. If no field is specified,only the entityID is returned

Sample

Sample request URI

https://example.myjetbrains.com/youtrack/api/admin/timeTrackingSettings/workTimeSettings?fields=id,name,workDays,firstDayOfWeek

Sample response body

{ "workDays": [ 0, 1, 2, 3, 4, 5 ], "firstDayOfWeek": 0, "id": "64-0" }

Update a Specific WorkTimeSettings

Update the work time settings.

Request syntax

POST /api/admin/timeTrackingSettings/workTimeSettings?{fields}

Request parameters

Parameter

Type

Description

fields

String

A list of WorkTimeSettings attributes that should be returned in the response. If no field is specified,only the entityID is returned

Sample

Sample request URI

https://example.myjetbrains.com/youtrack/api/admin/timeTrackingSettings/workTimeSettings?fields=id,name,workDays,firstDayOfWeek,minutesADay

Sample request body

{ "workDays": [1,2,3,4,5], "firstDayOfWeek": 1, "minutesADay":450 }

Sample response body

{ "workDays": [ 1, 2, 3, 4, 5 ], "minutesADay": 450, "firstDayOfWeek": 0, "id": "64-0", "$type": "WorkTimeSettings" }
Last modified: 28 October 2020