YouTrack Standalone 2018.3 Help

Operations with a Project

This resource lets you operate with an existing project with a specific ID.

Resource

api/admin/projects/<projectID>

Returned entity

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

Supported methods

Sub-resources

api/admin/projects/<projectID>

Read Settings of a Project

Get the settings of a specific project.

Request syntax:

GET <YouTrack baseURL>/api/admin/projects/<projectID>?fields=<string>

Request parameters:

Parameter

Description

<YouTrack baseURL>

The baseURL of your YouTrack service.

<projectID>

Unique ID of the project in the YouTrack service.

fields

Optional list of fields to return in the response.

Sample request:

curl -X GET \ 'https://example.myjetbrains.com/youtrack/api/admin/projects/0-6?fields=id,name,shortName,leader%28login,name,id%29,description,createdBy%28login,name,id%29' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer perm:am9obi5kb2U=.UG9zdG1hbiBKb2huIERvZQ==.jJe0eYhhkV271j1lCpfknNYOEakNk7' \ -H 'Cache-Control: no-cache' \ -H 'Content-Type: application/json'

Sample response:

{ "description": "A new project created from rest api", "shortName": "RP", "leader": { "login": "john.doe", "name": "John Doe", "id": "1-2" }, "createdBy": { "login": "john.doe", "name": "John Doe", "id": "1-2" }, "name": "Rest Project", "id": "0-6" }

Update a Project

Update the settings of a specific project.

Request syntax:

POST <YouTrack baseURL>/api/admin/projects/{projectID}?fields=<string>

Parameter

Description

<YouTrack baseURL>

The baseURL of your YouTrack service.

{projectID}

Unique ID of the project in the YouTrack service.

fields

Optional list of fields to return in the response.

In the body of request, provide the parameters of the project that you need to change. See the

Sample request

The following request updates Project leader attribute, and project's description.

curl -X POST \ 'https://example.myjetbrains.com/youtrack/api/admin/projects/0-6?fields=id,name,shortName,leader%28login,name,id%29,description,createdBy%28login,name,id%29' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer perm:am9obi5kb2U=.UG9zdG1hbiBKb2huIERvZQ==.jJe0eYhhkV271j1lCpfknNYOEakNk7' \ -H 'Cache-Control: no-cache' \ -H 'Content-Type: application/json' \ -d '{ "leader":{"id":"1-1"}, "description":"A project created using REST API" }'

Sample response

{ "description": "A project created using REST API", "shortName": "RP", "leader": { "login": "root", "name": "John Smith", "id": "1-1" }, "createdBy": { "login": "john.doe", "name": "John Doe", "id": "1-2" }, "name": "Rest Project", "id": "0-6" }
Last modified: 12 October 2018