YouTrack Standalone 2018.3 Help

System Time Tracking Settings

This resource lets you read and manage the time tracking settings of your service.

Resource

/api/admin/timeTrackingSettings

Returned entity

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

Supported methods

Supported Fields

This table describes attributes of the TextIndexSettings entity.

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

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

Field

Type

Description

workItemTypes

List<WorkItemType>

Collection of available work item types. For details, see Work Item Types section.

workTimeSettings

WorkTimeSettings

Settings for work item types.

id

String

The ID of the returned entity.

Read Time Tracking Settings

Get text index settings of the service.

Request syntax

GET /api/admin/TimeTrackingSettings[?fields=<fields>]

Request parameters:

Parameter

Type

Description

fields

string

A list of TimeTrackingSettings fields that should be returned in the response. If no fields specified, only the entity ID is returned.

Sample request

curl -X GET \ 'https://example.myjetbrains.com/youtrack/api/admin/textIndexSettings?fields=documentsToIndex,indexingInProgress,languages%28active,disabled,id%29,id' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer perm:am9obi5kb2U=.UG9zdG1hbiBKb2huIERvZQ==.jJe0eYhhkV271j1lCpfknNYOEakNk7' \ -H 'Cache-Control: no-cache' \ -H 'Content-Type: application/json'

Sample response body

Update Time Tracking Settings

Update time tracking settings of the service.

Request syntax

POST /api/admin/TimeTrackingSettings[?fields=<fields>]

Request parameters:

Parameter

Type

Description

fields

string

A list of TimeTrackingSettings fields that should be returned in the response. If no fields specified, only an entity ID is returned.

Sample request

curl -X GET \ 'https://example.myjetbrains.com/youtrack/api/admin/textIndexSettings?fields=documentsToIndex,indexingInProgress,languages%28active,disabled,id%29,id' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer perm:am9obi5kb2U=.UG9zdG1hbiBKb2huIERvZQ==.jJe0eYhhkV271j1lCpfknNYOEakNk7' \ -H 'Cache-Control: no-cache' \ -H 'Content-Type: application/json'

Sample response body

Work Time Settings

Manage settings for work time.

Resource

/api/admin/timeTrackingSettings/workTimeSettings

Returned entity

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

Supported methods

Supported Fields

This table describes attributes of the WorkTimeSettings entity.

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

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

Field

Type

Description

daysAWeek

Int

A number of working days per working week.

firstDayOfWeek

Int

Set the first day of a working week. Possible values: from 0 (Sunday) to 6 (Saturday).

minutesADay

Int

A period of time in minutes that is counted as a working day.

workDays

List

A comma-separated list of week days that are counted as working days. A working day in the list is an integer number - a consequtive number from zero for Sunday to 6 for Saturday.

For example, a Monday to Friday working week is represented like this: "workDays":[1,2,3,4,5]

id

String

Unique entity ID.

Read the Work Time Settings

Get the system work time settings.

Request syntax

GET /api/admin/timeTrackingSettings/workTimeSettings[?fields=<fields>]

Request parameters

Parameter

Type

Description

fields

string

Optional. Lets you specify a subset of attributes to return for each WorkTimeSettings entity in the response. If no fields specified, only the entity ID is returned.

Sample request

curl -X GET \ 'https://example.myjetbrains.com/youtrack/api/admin/timeTrackingSettings/workTimeSettings?fields=id,name,workDays,firstDayOfWeek' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer perm:am9obi5kb2U=.UG9zdG1hbiBKb2huIERvZQ==.jJe0eYhhkV271j1lCpfknNYOEakNk7' \ -H 'Cache-Control: no-cache' \ -H 'Content-Type: application/json'

Sample response body

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

Update Work Time Settings

Update the system work time settings.

Request syntax

POST /api/admin/timeTrackingSettings/workTimeSettings[?fields=<fields>]

Request parameters

Parameter

Type

Description

fields

string

Optional. Lets you specify a subset of attributes to return for each entity in the response. If no fields specified, only the entity ID is returned.

Sample request

curl -X POST \ 'https://example.myjetbrains.com/youtrack/api/admin/timeTrackingSettings/workTimeSettings?fields=id,name,workDays,firstDayOfWeek,minutesADay' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer perm:am9obi5kb2U=.UG9zdG1hbiBKb2huIERvZQ==.jJe0eYhhkV271j1lCpfknNYOEakNk7' \ -H 'Cache-Control: no-cache' \ -H 'Content-Type: application/json' \ -H 'Postman-Token: c8252f14-dd3c-4767-8133-d9a6f2feb920' \ -d '{ "workDays": [1,2,3,4,5], "firstDayOfWeek": 1, "minutesADay":450 }'

Work Item Types

Manage types of work items.

Resource

/api/admin/timeTrackingSettings/workItemTypes

Returned entity

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

Supported methods

Supported sub-resources

/api/admin/timeTrackingSettings/workItemTypes/<workItemTypeID>

Supported Fields

This table describes attributes of the WorkItemType entity.

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

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

Field

Type

Description

autoAttached

Boolean

When true, this work item type is automatically attached to all new projects. By defaul, true.

name

String

A name of the work item type.

usages

ProjectTimeTrackingSettings

A mutable collection of ProjectTimeTrackingSettings that shows in which time tracking settings instances this type is used. By a time tracking settings instance we mean an entity that stores time tracking configuration of a project.

id

String

Unique entity ID.

Read a List of Work Item Types

Get a list of available work item types.

Request syntax

GET /api/admin/timeTrackingSettings/workItemTypes[?fields=<fields>&$top&$skip]

Request parameters

Parameter

Type

Description

fields

string

Optional. Lets you specify a subset of attributes to return for each WorkItemType entity in the response. If no fields specified, only the entity ID is returned.

$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/admin/timeTrackingSettings/workItemTypes?fields=id,name,url&$top=2' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer perm:am9obi5kb2U=.UG9zdG1hbiBKb2huIERvZQ==.jJe0eYhhkV271j1lCpfknNYOEakNk7' \ -H 'Cache-Control: no-cache' \ -H 'Content-Type: application/json'

Sample response body

[ { "name": "Development", "id": "65-0" }, { "name": "Testing", "id": "65-1" } ]

Create a Work Item Type

Create a new work item type to a project with a specific ID.

Request syntax

POST /api/admin/timeTrackingSettings/workItemTypes[?fields=<fields>]

Request parameters

Parameter

Type

Description

fields

string

Optional. Lets you specify a subset of attributes to return for each WorkItemType entity in the response. If no fields specified, only the entity ID is returned.

In the body of the request you must specify a name attribute for the new work item type.

Sample request

curl -X POST \ 'https://example.myjetbrains.com/youtrack/api/admin/timeTrackingSettings/workItemTypes' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer perm:am9obi5kb2U=.UG9zdG1hbiBKb2huIERvZQ==.jJe0eYhhkV271j1lCpfknNYOEakNk7' \ -H 'Cache-Control: no-cache' \ -H 'Content-Type: application/json' \ -d '{"name" : "Research"}'

Operations with a Work Item Type

This resource lets you read, update, and delete a specific work item type.

Resource

/api/admin/timeTrackingSettings/workItemTypes/<workItemTypeID>

Returned entity

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

Supported methods

Read a Work Item Type

Read a work item type with a specific ID.

Request syntax

GET /api/admin/timeTrackingSettings/workItemTypes/<workItemTypeID>[?fields=<fields>]

Request parameters

Parameter

Type

Description

workItemTypeID

string

A unique entity ID of a work item type, attributes of which you request to get.

fields

string

Optional. Lets you specify a subset of attributes to return for each WorkItemType entity in the response. If no fields specified, only the entity ID is returned.

Sample request

curl -X GET \ 'https://example.myjetbrains.com/youtrack/api/admin/timeTrackingSettings/workItemTypes/65-0?fields=id,name&' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer perm:am9obi5kb2U=.UG9zdG1hbiBKb2huIERvZQ==.jJe0eYhhkV271j1lCpfknNYOEakNk7' \ -H 'Cache-Control: no-cache' \ -H 'Content-Type: application/json'

Sample response body

{ "name": "Development", "id": "65-0" }

Update a Work Item Type

Update a work item type with a specific ID.

Request syntax

POST /api/admin/timeTrackingSettings/workItemTypes/<workItemTypeID>[?fields=<fields>]

Request parameters

Parameter

Type

Description

fields

string

Optional. Lets you specify a subset of attributes to return for each WorkItemType entity in the response. If no fields specified, only the entity ID is returned.

Sample request

curl -X POST \ 'https://example.myjetbrains.com/youtrack/api/admin/timeTrackingSettings/workItemTypes/65-3?fields=name,id' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer perm:am9obi5kb2U=.UG9zdG1hbiBKb2huIERvZQ==.jJe0eYhhkV271j1lCpfknNYOEakNk7' \ -H 'Cache-Control: no-cache' \ -H 'Content-Type: application/json' \ -H 'Postman-Token: 09bc5a57-8475-4175-9ba8-a266e0777650' \ -d '{ "name" : "R-n-D" }'

Sample response body

{ "name": "R-n-D", "id": "65-3" }

Delete a Work Item Type

Delete a work item type with a specific ID.

Request syntax

DELETE /api/admin/timeTrackingSettings/workItemTypes/<workItemTypeID>

Request parameters

Parameter

Type

Description

workItemTypeID

string

A unique ID of a work itm type that you want to detach from the project.

Sample request

curl -X DELETE \ 'https://example.myjetbrains.com/youtrack/api/admin/timeTrackingSettings/workItemTypes/65-3' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer perm:am9obi5kb2U=.UG9zdG1hbiBKb2huIERvZQ==.jJe0eYhhkV271j1lCpfknNYOEakNk7' \ -H 'Cache-Control: no-cache' \ -H 'Content-Type: application/json'
Last modified: 12 October 2018