Developer Portal for YouTrack and Hub 2021.3 Help

Sub-articles

This resource lets you work with the sub-articles of the current article.

Resource

/api/articles/{articleID}/childArticles

Returned entity

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

Supported methods

Article attributes

Represents an article.

Extends BaseArticle

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

reporter

User

The user who created the article. Can be null.

visibility

Visibility

Visibility settings of the article. These settings describe who is allowed to see the article. Can be null.

summary

String

The summary, or the title of the article. Can be null.

content

String

The content of the article. Can be null.

attachments

Array of ArticleAttachments

The list of files attached to the article.

project

Project

The project where the article belongs. Read-only.

parentArticle

Article

The parent article of the current one. Can be null.

childArticles

Array of Articles

The list of sub-articles of the current one.

hasChildren

Boolean

When true, the article has sub-articles. Read-only.

updatedBy

User

The user who last updated the article. Read-only. Can be null.

updated

Long

The timestamp when the article was last updated. Read-only. Can be null.

created

Long

The timestamp when the article was created. Read-only. Can be null.

idReadable

String

The article ID. Read-only.

ordinal

Long

The position of the article in the tree. Read-only.

comments

Array of ArticleComments

The list of comments to the article.

hasStar

Boolean

true if the current user added the "Star" tag to this article. Otherwise, false.

externalArticle

ExternalArticle

The reference to the article or a similar object in the originating third-party system. Read-only. Can be null.

Read a List of Articles

Get the list of sub-articles of the current one.

Required permissions

Requires the Read Article permission for the parent article and the sub-articles. If article visibility is limited to some users or groups, the current user should be a part of this set or have the Override Visibility Restrictions permission. For the article reporter only the Create Article permission is required.

Request syntax

GET /api/articles/{articleID}/childArticles?{fields}&{$top}&{$skip}

Request parameters

Parameter

Type

Description

fields

String

A list of Article attributes that should be returned in the response. If no field is specified,only the entityID 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

Sample request

https://example.myjetbrains.com/youtrack/api/articles/NP-A-7/childArticles?fields=id,summary,idReadable

Sample response body

[ { "idReadable": "NP-A-1", "summary": "The Basics of the Process", "id": "226-0", "$type": "Article" } ]

Add a New Article

Add a new sub-article to the current article.

Required permissions

Requires the Update Article permission for both articles.

Request syntax

POST /api/articles/{articleID}/childArticles?{fields}&{muteUpdateNotifications}

Request parameters

Parameter

Type

Description

fields

String

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

muteUpdateNotifications

Boolean

Set this parameter to true if no notifications should be sent on changes made by this request. This doesn't mute notifications sent by any workflow rules. Using this parameter requires Apply Commands Silently permission in all projects affected by the request. Available since 2021.3.

Sample

To link an existing article as a sub-article to the current one, include the database ID of the sub-article in the body of the request.

Sample request

https://example.myjetbrains.com/youtrack/api/articles/NP-A-7/childArticles?fields=id,idReadable,summary

Sample request body

{ "idReadable": "NP-A-5", "id": "226-4", "$type": "Article" }

Sample response body

{ "idReadable": "NP-A-5", "summary": "Documentation", "id": "226-4", "$type": "Article" }
Last modified: 14 September 2021