YouTrack Standalone 2020.6 Help

Import Workitems

PUT rest/import/issue/{issue}/workitems

Import work items to selected issue.

PUT rest/import/issue/{issue}/workitems

Parameters:

Name

Type

Description

issue

issue id

ID of an issue to which work items should be added.

In the request code you should provide the following parameters for each work item to be imported (a work item is designated with <workItem> tag):

  • <author> — login name of the user who will be set as the author of the work item

  • <date> — date and time of the new work item in Unix Epoch time format

  • <duration> — duration of the new work item, in minutes

  • <description> — activity description

For a sample code please see below.

Sample

Request

PUT https://example.com/youtrack/rest/import/issue/HBR-63/workitems Cookie: $Version=0; JSESSIONID=i3p6eke3gf1o1s3zqdlz31ozf; $Path=/; jetbrains.charisma.main.security.PRINCIPAL=NDgxMzQ5NGQxMzdlMTYzMWJiYTMwMWQ1YWNhYjZlN2JiN2FhNzRjZTExODVkNDU2NTY1ZWY1MWQ3Mzc2NzdiMjpyb290; $Path=/ <workItems> <workItem> <author login="john.smith"></author> <date>1353316956611</date> <duration>240</duration> <description>first work item</description> </workItem> <workItem> <author login="bob"></author> <date>1353316957711</date> <duration>300</duration> <description>something</description> </workItem> </workItems>

Response

HTTP/1.1 200 OK Vary: Accept-Encoding Set-Cookie: JSESSIONID=1s62zlm564r6si3dgnzayivmv;Path=/ Expires: Thu, 01 Jan 1970 00:00:00 GMT Content-Type: application/xml; charset=UTF-8 Cache-Control: no-cache, no-store, no-transform, must-revalidate Content-Length: 107 <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <importReport> <item imported="true"/> </importReport>
Last modified: 30 March 2021