YouTrack Standalone 2020.6 Help

Operations with Specific GeneralUserProfile

This resource lets you read and update general settings in the YouTrack profile of the specified user.

Resource

/api/users/{userID}/profiles/general

Returned entity

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

Supported methods

GeneralUserProfile attributes

Represents the user profile in YouTrack.

This table describes attributes of the GeneralUserProfile 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

dateFieldFormat

DateFormatDescriptor

Format in which dates are shown to this user.

timezone

TimeZoneDescriptor

Timezone of the user.

locale

LocaleDescriptor

Personal locale selected by the user.

Read a Specific GeneralUserProfile

Get profile with general settings of the user's profile.

Required permissions

Requires Read Self to read own profile and Read User Full to read profile of another user.

Request syntax

GET /api/users/{userID}/profiles/general?{fields}

Request parameters

Parameter

Type

Description

fields

String

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

Sample

Sample request

https://example.myjetbrains.com/youtrack/api/users/1-2/profiles/general?fields=id,dateFieldFormat(id,presentation,pattern,datePattern),timezone(id,presentation,offset),locale(id,name,community,language,locale)

Sample response body

{ "locale": { "name": "English", "locale": "en_US", "community": false, "id": "en_US", "language": "en", "$type": "LocaleDescriptor" }, "timezone": { "presentation": "Central European Summer Time (UTC/GMT +2 hours)", "id": "Europe/Berlin", "offset": 120, "$type": "TimeZoneDescriptor" }, "dateFieldFormat": { "pattern": "d MMM yyyy HH:mm", "presentation": "Default date format (31 Dec 2000 23:59)", "datePattern": "d MMM yyyy", "id": "", "$type": "DateFormatDescriptor" }, "id": "generalProfile", "$type": "GeneralUserProfile" }

Update a Specific GeneralUserProfile

Change settings in the specific user profile.

Required permissions

Requires Update Self to update own profile and Update User to update profile of another user.

Request syntax

POST /api/users/{userID}/profiles/general?{fields}

Request parameters

Parameter

Type

Description

fields

String

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

Sample

Let's change the time zone for the specific user.

Sample request

https://example.myjetbrains.com/youtrack/api/users/1-2/profiles/general?fields=id,timezone(id,presentation,offset)

Sample request body

{ "timezone": { "id": "Europe/Berlin" } }

Sample response body

{ "timezone": { "presentation": "Central European Summer Time (UTC/GMT +2 hours)", "id": "Europe/Berlin", "offset": 180, "$type": "TimeZoneDescriptor" }, "id": "generalProfile", "$type": "GeneralUserProfile" }
Last modified: 30 March 2021