YouTrack Standalone 2017.2 Help

Get Available Work Items of Issue

GET /rest/issue/{issue}/timetracking/workitem/

Get the list of available work items for a particular issue.

GET /rest/issue/{issue}/timetracking/workitem/

Parameters:

Name

Type

Description

issue

issue id

Issue ID of an issue for which you'd like to get a list of all available work items.

Response parameters:

For each work item in response code, you will get the following parameters:

Parameter

Type

Description

<id>

string

Unique ID of a work item. This ID should be used in request methods to edit or delete a work item.

<date>

ms

Date of the work item (the number of milliseconds since January 1, 1970, 00:00:00 GMT represented by this date). When a work item is created, the time part of the work item date is replaced with the timestamp for midnight in the time zone of the current user.

<duration>

minutes

Duration of the work item in minutes.

<description>

string

Description of the work item.

<author>

string

User login name of the author of the work item. In addition, we provide the URL to user's profile.

Also, for each work item we provide unique URL to access this work item (as 'URL' attribute for the <workItem> parameter). See the section below for samples.

Samples

Sample 1

Request

GET https://example.com/youtrack/rest/issue/HBR-63/timetracking/workitem Cookie: $Version=0; JSESSIONID=i3p6eke3gf1o1s3zqdlz31ozf; $Path=/; jetbrains.charisma.main.security.PRINCIPAL=NDgxMzQ5NGQxMzdlMTYzMWJiYTMwMWQ1YWNhYjZlN2JiN2FhNzRjZTExODVkNDU2NTY1ZWY1MWQ3Mzc2NzdiMjpyb290; $Path=/

Response

HTTP/1.1 200 OK Vary: Accept-Encoding Content-Type: application/xml; charset=UTF-8 Cache-Control: no-cache, no-store, no-transform, must-revalidate Content-Length: 727 <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <workItems> <workItem url="https://example.com/youtrack/rest/issue/HBR-63/timetracking/workitem/101-1"> <id>101-1</id> <date>1480204800000</date> <duration>240</duration> <description>first work item</description> <author login="root" url="https://example.com/youtrack/rest/admin/user/root"/> </workItem> <workItem url="https://example.com/youtrack/rest/issue/HBR-63/timetracking/workitem/101-2"> <id>101-2</id> <date>1467936000000</date> <duration>480</duration> <description>second work item</description> <author login="root" url="https://example.com/youtrack/rest/admin/user/root"/> </workItem> </workItems>

Sample 2

Request

GET https://example.com/youtrack/rest/issue/HBR-63/timetracking/workitem Cookie: $Version=0; JSESSIONID=i3p6eke3gf1o1s3zqdlz31ozf; $Path=/; jetbrains.charisma.main.security.PRINCIPAL=NDgxMzQ5NGQxMzdlMTYzMWJiYTMwMWQ1YWNhYjZlN2JiN2FhNzRjZTExODVkNDU2NTY1ZWY1MWQ3Mzc2NzdiMjpyb290; $Path=/

Response

HTTP/1.1 200 OK Vary: Accept-Encoding Content-Type: application/xml; charset=UTF-8 Cache-Control: no-cache, no-store, no-transform, must-revalidate Content-Length: 409 <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <workItems> <workItem url="https://example.com/youtrack/rest/issue/HBR-63/timetracking/workitem/101-1"> <id>101-1</id> <date>1511046000000</date> <duration>230</duration> <description>first work item edited</description> <author login="root" url="https://example.com/youtrack/rest/admin/user/root"/> </workItem> </workItems>
Last modified: 7 March 2019