Developer Portal for YouTrack and Hub Help

Articles

This resource lets you access articles in the YouTrack knowledge base.

Resource

/api/articles

Returned entity

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

Supported methods

Supported sub-resources

Article attributes

Represents an article.

Related Resources

Below you can find the list of resources that let you work with this entity.

Extends BaseArticle

Attributes

This table describes attributes of the Article entity.

  • To receive an attribute in the response from the server, specify it explicitly in the fields request parameter.

  • To update an attribute, provide it in the body of a POST request.

Field

Type

Description

id

String

The ID of the article. Read-only.

attachments

Array of ArticleAttachments

The list of files attached to the article.

childArticles

Array of Articles

The list of sub-articles of the current one.

comments

Array of ArticleComments

The list of comments to the article.

content

String

The content of the article. Can be null.

created

Long

The timestamp in milliseconds indicating the moment when the article was created. Stored as a unix timestamp at UTC. Read-only.

externalArticle

ExternalArticle

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

hasChildren

Boolean

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

hasStar

Boolean

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

idReadable

String

The article ID. Read-only.

ordinal

Long

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

parentArticle

Article

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

pinnedComments

Array of ArticleComments

The list of comments that are pinned in the article. Read-only.

project

Project

The project where the article belongs. Read-only.

reporter

User

The user who created the article. Can be null.

summary

String

The article title. Can be null.

tags

Array of Tags

The list of tags that are added to the article.

updated

Long

The timestamp in milliseconds indicating the last update of the article. Stored as a unix timestamp at UTC. Read-only.

updatedBy

User

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

visibility

Visibility

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

Read a List of Articles

Get all articles.

Request syntax

GET /api/articles?{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. If you don't set the $top value, the server limits the maximum number of returned entries.

The server returns a maximum of 42 entries for most resources that return collections. For more information, see Pagination.

Sample

Sample request

https://example.youtrack.cloud/api/articles?fields=hasStar,content,created,updated,id,idReadable,reporter(name),summary,project(shortName),content

Sample response body

[ { "created": 1593001508713, "project": { "shortName": "NP", "$type": "Project" }, "idReadable": "NP-A-1", "updated": 1605620052796, "hasStar": true, "content": "## Write it all down\n\nA knowledge base is a great tool for sharing information. When you record your experiences and insights regularly, other members of your team reap the rewards.\n\n## Enrich the content\n\n", "summary": "Getting Started with Articles in YouTrack", "reporter": { "name": "John Smith", "$type": "User" }, "id": "226-0", "$type": "Article" }, { "created": 1600164662730, "project": { "shortName": "NP", "$type": "Project" }, "idReadable": "NP-A-2", "updated": 1623318580842, "hasStar": true, "content": "TBD", "summary": "Business Case Rules", "reporter": { "name": "John Smith", "$type": "User" }, "id": "226-1", "$type": "Article" }, { "created": 1600169758095, "project": { "shortName": "NP", "$type": "Project" }, "idReadable": "NP-A-4", "updated": 1604575656224, "hasStar": true, "content": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.", "summary": "Test", "reporter": { "name": "John Smith", "$type": "User" }, "id": "226-3", "$type": "Article" }, { "created": 1600170167871, "project": { "shortName": "NP", "$type": "Project" }, "idReadable": "NP-A-5", "updated": 1604577543956, "hasStar": true, "content": "| Project | Stage |\n| --- | --- |\n| | |\n| | |\n| https://example.youtrack.cloud/articles/NP-A-5/Table | |\n| abc | |\n\n\n\n\n\nNP-A-4", "summary": "Table", "reporter": { "name": "John Smith", "$type": "User" }, "id": "226-4", "$type": "Article" }, { "created": 1603980307415, "project": { "shortName": "NP", "$type": "Project" }, "idReadable": "NP-A-6", "updated": 1603981160205, "hasStar": true, "content": "The guidelines for testing issue IDs.", "summary": "Test issue IDs", "reporter": { "name": "John Smith", "$type": "User" }, "id": "226-5", "$type": "Article" }, { "created": 1604071292824, "project": { "shortName": "NP", "$type": "Project" }, "idReadable": "NP-A-7", "updated": 1604071292824, "hasStar": true, "content": "The feature is ready for testing.", "summary": "Let's test!", "reporter": { "name": "John Smith", "$type": "User" }, "id": "226-6", "$type": "Article" } ]

Add a New Article

Create new article.

Required fields: id - the database ID of the article that will be linked as a sub-article to the current one.

Required permissions

Requires permissions: Create Article

Request syntax

POST /api/articles?{fields}&{draftId}&{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.

draftId

String

ID of a draft to publish as a new article. If no draftId is provided, the article is created from scratch. In this case, you must specify the project in the request payload.

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

Sample request

https://example.youtrack.cloud/api/articles?fields=hasStar,content,created,updated,id,idReadable,reporter(id,name),summary,project(id,shortName),content

Sample request body

{ "project": { "shortName": "NP", "id": "81-1" }, "summary": "Let Us Document Our Process", "reporter": { "name": "John Smith", "id": "24-0" }, "content": "Here are the guidelines for the development team:\n1. Cooperation.\n2. Collaboration.\n3. Appreciation." }

Sample response body

{ "created": 1629812236934, "idReadable": "NP-A-8", "updated": 1629812236934, "hasStar": true, "project": { "shortName": "NP", "id": "81-1", "$type": "Project" }, "summary": "Let Us Document Our Process", "reporter": { "name": "John Smith", "id": "24-0", "$type": "User" }, "content": "Here are the guidelines for the development team:\n1. Cooperation.\n2. Collaboration.\n3. Appreciation.", "id": "226-15", "$type": "Article" }
Last modified: 15 March 2024